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

Author Topic: Collision Class  (Read 2514 times)

0 Members and 1 Guest are viewing this topic.

wtf

  • Newbie
  • *
  • Posts: 15
    • View Profile
Collision Class
« on: July 30, 2011, 07:28:03 pm »
I think they should have included the collision class in the sfml library.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Collision Class
« Reply #1 on: July 30, 2011, 08:52:23 pm »
How exactly is collision related to multimedia?

Remember, SFML is no game engine.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Linux Vs God

  • Newbie
  • *
  • Posts: 18
    • View Profile
Collision Class
« Reply #2 on: July 31, 2011, 02:33:37 am »
then what are the main reasons for using SFML? I see it used more for games then anything else, in fact i think thats all i see it used for. I think the collision class should be added

Disch

  • Full Member
  • ***
  • Posts: 220
    • View Profile
Collision Class
« Reply #3 on: July 31, 2011, 02:45:33 am »
Quote
then what are the main reasons for using SFML?


SFML is primarily an I/O lib.  Input from the user, output to the user, and I/O over a network.

Things like collision are far to specialized and vary greatly depending on how the underlying game/physics engine works.

If you want a collision/physics library, there are some available.  Box2D is popular (easily found on google).  I think there have even been example projects posted on the board that were SFML+Box2D.

Contadotempo

  • Full Member
  • ***
  • Posts: 167
  • Firelink Shrine
    • View Profile
Collision Class
« Reply #4 on: July 31, 2011, 03:20:45 am »
SFML offers some function that might help you managing collisions. sf::Rect::Intersects() and sf::Rect::Contains(), for example.
But as said before, it's not a game engine.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Collision Class
« Reply #5 on: July 31, 2011, 10:16:09 am »
Quote from: "Linux Vs God"
then what are the main reasons for using SFML?
Multimedia programming (mainly graphics, audio, event handling, networks). This is one part of game programming, but not the only one. Collision detection and response are clearly out of SFML's scope. Laurent can't add it just because a few people find it useful and don't want to use a more specialized library like Box2D or Boost.Geometry.

Quote from: "Linux Vs God"
I think the collision class should be added
And how would you imagine such a class? What kind of collision should it support?

Don't forget that you can still provide extensions on top of SFML, as I did with my library. There is also a Wiki to exchange useful code snippets, I think there are even collision examples.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

 

anything