Making games often has more to do with physics and trigonometry than we would care to admit – especially in 3D games. And while most of the physical behavior exhibited in games is pretty simple – the challenge is not only to make it run quickly on, say, an iPhone, but also make it feel right.
Personally, I find getting controls just right to be the most rewarding (and frustrating) part of game design. A note of caution: embarking on any sort of physics based control scheme is a labor of love, consisting mostly of sleepless nights revisiting physics textbooks, missed deadlines tweaking controls, and rewriting code over and over again to balance performance against response. If that sounds like fun – read on!
1. Find a real life equivalent
This is key. If you want realistic behavior, a good way to know if it feels right is to perform the activity yourself. You can always tell when a racing game has been designed by someone who has never drifted through turns – so go find an empty parking lot and a rear wheel drive car (just make sure to turn off the traction control). Of course if you are designing behavior that isn’t easily simulated, at least pick some analogous interaction that you, and your players, can relate to.
2. Don’t copy reality
It sounds contradictory, but there is a large gap between what feels like real physics, and what is real physics. The best example of this is gravity. Using accurate 9.8 m/s squared gravity almost never feels right. I’ve heard numerous explanations as to why this might be – but that’s largely academic. The fact is when you build physical systems you will almost always need to scale the forces. Luckily, it’s pretty easy to set up gravity early on, have people test it in your game, and adjust it until it you hit the sweet spot.
3. Use existing equations
Just because you are messing with gravity doesn’t mean you should throw out Newton altogether. Most of the equations used in basic mechanics will improve gameplay in a way that is intuitive to users. Again, you may need to scale some of the forces up a bit – but using existing equations and paying attention to conservation of energy (even if it’s non-linear) and momentum leads to physical behavior that typically is very clean. Adjustments can easily be made in various friction coefficients to ‘trim’ behavior to taste.
Add a Comment
Who knew not tossing out my old physics text was not a bad move?
Yeah, there are a couple of other good resources available too, if you don’t have, or don’t like the old high school text books. I’ve flipped through this one a few times at Barnes and Noble and liked it – Game Physics