This post will hopefully be one of many.
First things first. Go download Jitter (I’m using 0.1.7). The official web site is here http://jitter-physics.com/
Jitter is a little short on documentation but has an excellent set of demostration scenes. It is worthwhile having a look and a quick play.
The tutorial PDF (included in the package) sums up the basics.
- Create a Collision system (I use the CollisionSystemSAP).
- Create a physics World and pass the collision system.
- Create a shape
- Create a RigidBody – using the Shape just created
- Add the body to the world
- Every update loop ask the physics engine to step forward a small amount of time.
That’s pretty painless and pretty easy to get going. The Jitter libraries are very well designed, the code is well encapsulated and loosely bound.
I’m still playing with the physical properties and other parameters to get a world that “plays right”. Not too hard, not too easy but essentially realistic enough that the gamer can become immersed in shooting the baddies and protecting the oil refinary!