I’ll be honest: when I’ve hobby-developed games in my past, I’ve either used super simple “physics” or just used an existing framework so as not to get stuck on implementing any sort of physics simulation. Everytime I move past this point, though, I’m left without any real understanding… I plug in the numbers, retype and copy code, and just hook things up to make them work.
This kinda bugs me, so I want to really internalize what it takes to make a 2d physics engine. And by internalize, I mean that I want to brush off some of the math I studied in high school and college, and really understand how it applies to physical simulation. In addition, I want to understand how to write code to do physical simulations… and I don’t mean just glue code. I want to really understand what’s going on behind the scenes, and develop an intuition for it!
Why not just stick with the pre-made libraries and frameworks, and leave the physics stuff up to people who focus a whole lot on physics? It’s a hobby… and I want to learn more about it.
To do this, I’ve dug around a bit for some online resources:
- Wolfire’s Linear Algebra series – while not called “physics”, it covers some of the basic math behind _physic_al simulation using a little linear algebra.
- Wildbunny’s Vector maths - a primer for games programmers – which covers what it says, basically an overlap of what Wolfire’s article is about.
- Wildbunny’s Physics Engines for Dummies – lots of info, but the actual source code costs some cash (which may or may not be worth it… I wouldn’t know since I can be a cheapskate when it comes to this sort of thing, and I’m probably not going to buy it).
- gafferongames.com’s Game Physics articles – some seamingly really good information here, possibly over my head this far out of maths practice.
- Nate Rode’s 2D Game Physics 101 – some examples of various maths needed for 2D physics.
- tuts+ How to Create a Custom Physics Engine by Randy Gaul – looks, from the outside, to be a fairly comprehensive series of articles on the math and code needed for creating a 2d physical simulation engine.
- Khan Academy’s Linear Algebra subject
I’m certain there are a lot more resources out there on the web, and probably just as many in meat-space!
The first thing I’m going to do is review some math on Khan Academy, then I’m going to use Nim to play around with some of these concepts and shake the rust off!
Here’s what I’ve written on this toppic: part 0 part 1 part 2.
Until next time!