Alex Rivera | Logout

Resources for 2d game physics

Asked 2008-10-03T02:13:12.097
42

I'm looking for some good references for learning how to model 2d physics in games. I am not looking for a library to do it for me - I want to think and learn, not blindly use someone else's work.

I've done a good bit of Googling, and while I've found a few tutorials on GameDev, etc., I find their tutorials hard to understand because they are either written poorly, or assume a level of mathematical understanding that I don't yet possess.

For specifics - I'm looking for how to model a top-down 2d game, sort of like a tank combat game - and I want to accurately model (among other things) acceleration and speed, heat buildup of 'components,' collisions between models and level boundaries, and missile-type weapons.

Websites, recommended books, blogs, code examples - all are welcome if they will aid understanding. I'm considering using C# and F# to build my game, so code examples in either of those languages would be great - but don't let language stop you from posting a good link. =)

Edit: I don't mean that I don't understand math - it's more the case that I don't know what I need to know in order to understand the systems involved, and don't really know how to find the resources that will teach me in an understandable way.

Edit
Report

1 Answer

7

Speaking from experience, implementing a 2D physics engine is pretty difficult. I'll detail the several steps I took when creating my engine.

  1. Collision detection. Collision detection can be a difficult problem, even when you're not dealing with 3D worlds or networked simulations. For 2D physics, you definitely want to use the Separating Axis Theorem. Once you've implement SAT, you're half-way done making the dynamics portion of your engine.

  2. Kinematics/Dynamics. Chris Hecker has written an excellent online resource which walked me through collision response step-by-step.

  3. Everything Else. Once you've got the collision detection/response finished, its a matter of implementing everything else you want in the engine. This can include friction, contact forces, joints, along with whatever else you can think of.

Have fun! Creating your own physics simulation is an incredibly rewarding experience.

answered 2011-03-10T22:23:13.110

Your Answer