Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Collision detection integration  (Read 10176 times)

0 Members and 2 Guests are viewing this topic.

Stormboy

  • Newbie
  • *
  • Posts: 10
  • Don't let anything stop you in life. Just move on.
    • View Profile
Collision detection integration
« on: March 28, 2014, 01:58:20 pm »
Hi,
I was just thinking, it would be great if the Collision class (the one that's in the forum wiki) was integrated into an SFML module (Graphics maybe?). This is just my idea, so what do you guys think of it?

 :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Collision detection integration
« Reply #1 on: March 28, 2014, 02:00:44 pm »
Collision detection is clearly out of scope for SFML.
Laurent Gomila - SFML developer

Stormboy

  • Newbie
  • *
  • Posts: 10
  • Don't let anything stop you in life. Just move on.
    • View Profile
Re: Collision detection integration
« Reply #2 on: March 28, 2014, 02:02:40 pm »
Collision detection is clearly out of scope for SFML.

Why is that? :/

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Collision detection integration
« Reply #3 on: March 28, 2014, 02:03:03 pm »
SFML is a multimedia library, not a game engine. Collision detection and response has also been discussed several times in the past, so you might want to search the forum.

To workaround the search bug, choose only some subforums, or use an external engine.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Stormboy

  • Newbie
  • *
  • Posts: 10
  • Don't let anything stop you in life. Just move on.
    • View Profile
Re: Collision detection integration
« Reply #4 on: March 28, 2014, 02:05:15 pm »
Oh allright, sorry. :|

Daddi

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
    • http://foxdev.de/
    • Email
Re: Collision detection integration
« Reply #5 on: April 10, 2014, 04:38:49 pm »
SFML is a multimedia library, not a game engine. [...] [/color]

I think its time to change :P
Go go for "SFGL", the simple and fast game library fork *g*

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Collision detection integration
« Reply #6 on: April 10, 2014, 08:34:47 pm »
SFML is a multimedia library, not a game engine. [...] [/color]

I think its time to change :P
Go go for "SFGL", the simple and fast game library fork *g*

I disagree. One of SFML's strengths is its focus on being a good multi media library and just that.
If it started to branch out and try to be a game engine it would inevitably end up having to make a lot of tradeoffs like; what kinds of collision detection should we provide (bounding box? Pixel perfect? What about alpha? ...) And should there be pathfinding algorithms as well? If so, which ones? Should it implement a scene graph? If so, suitable for what types of games? How about the game loop - should it take control of that as well? If so, should it be fixed time step or not?

Much better IMHO to leave SFML as a flexible media building block that people can build all sorts of different types of game engines (and lots of other applications) on top of.

MiShu

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Collision detection integration
« Reply #7 on: April 11, 2014, 05:37:22 pm »
Try to use Box2D ;)
Its really cool physics engine.

MiShu

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Collision detection integration
« Reply #8 on: April 11, 2014, 05:55:03 pm »
SFML is a multimedia library, not a game engine. [...] [/color]

I think its time to change :P
Go go for "SFGL", the simple and fast game library fork *g*

Reason?
SFML is really handy OOP C++11 multimedia library realized through OpenGL.
And I wanna use it on other platforms which not supported OpenGL such as Windows Phone, Windows RT, Xbox.
Its much more useful than integrated physics.
IMHO  :P

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Collision detection integration
« Reply #9 on: April 11, 2014, 06:01:56 pm »
@MiShu

You can edit posts if you have something else to say...  ;)

On topic: Physics built into SFML would be out of scope and I personally see no reason at all considering all the much better physics libraries out there.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11016
    • View Profile
    • development blog
    • Email
AW: Re: Collision detection integration
« Reply #10 on: April 11, 2014, 06:02:52 pm »
SFML is really handy OOP C++11 multimedia library realized through OpenGL.
And I wanna use it on other platforms which not supported OpenGL such as Windows Phone, Windows RT, Xbox.
SFML doesn't support any C++11 feature yet and it will never work natively on Windows Phone, Windows RT nor Xbox, because that would require a DirectX renderer.
Of course there are always hackish ways to do things, but let's not go there.

The main problem with physics as part of SFML would be: maintenance.
Getting the physics right is hard and time consuming - it's not like Laurent and Nexus are already bored with the current SFML development. ;)
« Last Edit: April 11, 2014, 06:05:28 pm by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

MiShu

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: AW: Re: Collision detection integration
« Reply #11 on: April 11, 2014, 06:08:11 pm »
SFML is really handy OOP C++11 multimedia library realized through OpenGL.
And I wanna use it on other platforms which not supported OpenGL such as Windows Phone, Windows RT, Xbox.
SFML doesn't support any C++11 feature yet and it will never work natively on Windows Phone, Windows RT nor Xbox, because that would require a DirectX renderer.
Of course there are always hackish ways to do things, but let's not go there.

The main problem with physics as part of SFML would be: maintenance.
Getting the physics right is hard and time consuming - it's not like Laurent and Nexus are already bored with the current SFML development. ;)

Yes, I know. But I hope that the DirectX wrapper will be implemented in the future :)

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: AW: Re: Collision detection integration
« Reply #12 on: April 11, 2014, 06:39:26 pm »
Yes, I know. But I hope that the DirectX wrapper will be implemented in the future :)
Let's not be unrealistic; a DirectX wrapper is very unlikely to be implemented within the next few years. The plan is rather to support more modern OpenGL versions, as well as to improve the core library in various parts.

Thus, if DirectX is crucial for your purposes, you might want to investigate alternatives to SFML.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: Collision detection integration
« Reply #13 on: April 11, 2014, 08:47:30 pm »
MiShu there are things out there that allow physics to be used with SFML like Box2D but SFML is mostly rendering things rather than checking if they've hit each other.
I have many ideas but need the help of others to find way to make use of them.

Phanoo

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Collision detection integration
« Reply #14 on: October 30, 2014, 02:27:30 pm »
Collision detection is useful even for multimedia.
Multimedia application can have animated effects that requires collisions, or even something as simple as a click on a button (collision between a box and a point - the mouse coordinates)

 

anything