Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am writing a sports simulation game in which the simulated players will interact physically with each other (i.e. tackle, push, bump...) as well as do individual actions such as changing direction of motion quickly in response to a changing game state.

At the moment all movement occurs with no inertia and infinite acceleration (so each step of the game loop the player can move at their top speed in whatever direction they want, regardless of their current motion). This has been sufficient to develop the main parts of the player AI, but it's time to get a little more realistic. The game has a cartoony look and feel so it doesn't need to be perfectly realistic, but player movement and interaction should give a semblance of reality.

So, how could human movement be summarized in a few key restrictions? I've toyed around with setting maximum acceleration and turning rates, as well as a momentum/inertia model for dealing with player collisions, but the game ends up looking like it's played by a bunch of bumper cars, rather than people (i.e. these restrictions and collision model describe cars on a slippery surface, not bipeds).

share|improve this question
Human-to-human collisions are normally hilariously inelastic. People lose lots of momentum as they collide. That should eliminate the "bumper cars" problem, but more problems will arise as you get closer to realism. How far down this rabbit hole are you willing to venture? :) –  Anko Apr 17 '13 at 9:13
One small suggestion is to make the agents bob from side to side with a sinewave. The frequency and amplitude of this should be proportional to magnitude of velocity. Of course, this is not needed if your animations show the centre of mass moving. –  DaleyPaley Apr 18 '13 at 0:19
add comment

1 Answer

Probably the best way to handle this easily is to use a pre-existing physics engine that has the capability to provide inelastic collisions. Move your players under a physically-correct (or at least nearly-so) model and you'll have the physically-correct appearance (or at least something that is close enough).

You will have a bit of a challenge making the game feel responsive under more strict inertia and acceleration rules, though, and so you'll probably have to sacrifice some of that to tweak the playability of your game.

There was an excellent article by Steve Rabin in the 2nd Game Programming Gems book that dealt with the third-person motion and camera control of Super Mario 64, which had a good balance between a sense of physicality and weight to Mario's movement and responsive gameplay. I'd recommend reading it if you can get ahold of a copy.

You will probably want to search related materials without bias to 2D gameplay, since 3D ones will be more common and should be easily adaptable.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.