views:

3890

answers:

8

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.

+4  A: 

There are a bunch of physics for game programmers books around - but this might be interesting

Not out yet, and I haven't read it!

Martin Beckett
+5  A: 

Physics for Game Developers by O'Reilly

David
+8  A: 

Here are some resources I assembled a few years ago. Of note is the Verlet Integration. I am also including links to some open source and commercial physics engines I found at that time. There is a stackoverflow article on this subject here: http://stackoverflow.com/questions/98628/2d-game-physics

Physics Methods

Books

  • "Game Physics Engine Development", Ian Millington -- I own this book and highly recommend it. The book builds a physics engine in C++ from scratch. The Author starts with basic particle physics and then adds "laws of motion", constraints, rigid-body physics and on and on. He includes well documented source code all the way through.

Physics Engines

mistrmark
I think this is the way physics should be taught in schools. Make your own game with the physics.
Shrivara
+2  A: 

F# has a feature called Units of Measure which does dimensional analysis for you, providing errors if you get it wrong. For example if you say:

let distance : float<meters> = gravity * 3.0<seconds>

That would yield a compile-error, since gravity is < meters/seconds^2 > and not < meters >. Also, since F# is just .NET you can write your math/physics code in a class library and reference that from your C#.

I'd reccomend you check out these blog posts for more information:

Chris Smith
I've been considering doing exactly that - calling into F# libraries from C# code.
Erik Forbes
+3  A: 

This is a great tutorial that demonstrates 2D physics concepts using flash and is not specific to flash. http://www.rodedev.com/tutorials/gamephysics/game_physics.swf

rockstardev
This is well worth a read. Short and concise.
John
+1  A: 

This is a great resource for writing your first engine. It's in 3D but it's very easy to convert down to 2D. I know at least one big company that followed this tutorial for their internal engine, and i personally have followed his steps for my own engine. He explains all the basic physics concepts in spring/impulse based physics, and shows you how to write your own intergrater.

DavidG
This is a great resource - make sure to check out his other articles on physics as well!
thekidder
+1  A: 

What, no mention of Box2D? Its an open source side project of a blizzard employee, has a good community, and well, works great.

James
here are some tips:provide a link.provide evidence, not opinion. personal experience works, but only if you give credence to your argument instead of just "[it] works great"
Chris MacDonald
A: 

The F#.NET Journal has published two articles about this:

Jon Harrop