Jump to content
  • Advertisement
Sign in to follow this  

Physics engine for 2d games?

This topic is 1363 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post

Link to post
Share on other sites

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



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

bounding box collision:

tile map collision(easy):

tile map(intermediate)

tile map(harder)

Edited by Misantes

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!