Jump to content

  • Log In with Google      Sign In   
  • Create Account

Physics engine for 2d games?


Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1   Members   -  Reputation: 184

Like
0Likes
Like

Posted 30 August 2014 - 12:28 PM

I want to make a sidescroller hack n slash game, I decided to use SFML to take care of audio and rendering but, What engine can I use to take care of the physics part?

 

I don't know a lot about physics, I only know something about forces. Anyway, I'm willing to leatn about everything else(read somewhere that i need to understand rigid bodies, impulse and torque), but if you know an engine that can make it easier, I'd be very grateful.



#2   GDNet+   -  Reputation: 2087

Like
3Likes
Like

Posted 30 August 2014 - 12:51 PM

edit* just re-read that you're making a sidescrolling hack n' slash. Ignore the top-down comments, but everything still apples otherwise.

 

Depending on your needs, you may not need a 3rd party physics engine and it may just be overkill for your game. You could program the gravity and collision yourself, and if you're making a top-down hack-n-slash, you're unlikely to even need gravity. I don't have a good tutorial for collision detection offhand, but if you'd like I could dig one up that I found helpful. There are a few methods for 2d collision with varying pros/cons.

 

For actual physics, your needs probably aren't all that demanding for a 2d hack and slash, but http://www.rodedev.com/tutorials/gamephysics/ is a pretty great start for basic game physics programming. Rigid bodies and torque and such may not actually be relevant to your game.

 

If you're set on using a physics engine, http://box2d.org/ is open-source and has most of your bases covered. There are certainly others though, and perhaps someone else will have a better recommendation.

 

Let me know if you need any clarification or links to resources,

 

Cheers smile.png

 

edit*

here are a couple links for sfml collision I found useful:

bounding box collision:

http://www.youtube.com/watch?v=n0U-NBmLj78

tile map collision(easy):

http://www.youtube.com/watch?v=eGtilgKUCV8

tile map(intermediate)

http://www.youtube.com/watch?v=EZSPobXSGMk

tile map(harder)

http://www.youtube.com/watch?v=QCUZG9o4AVY


Edited by Misantes, 30 August 2014 - 01:22 PM.

Beginner here <- please take any opinions with grain of salt Posted Image




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.




PARTNERS