|
Game Physics
by
Ben Kenwright
Simply put, game physics makes your game look amazing. From objects
falling to the ground under gravity, or connected objects with springs such as
bridges and ropes....with just a little bit of extra work, you can make effects
that will make almost anyone drewl. Most people when you say 'Game
Physics'...they usually give a shudder, and think of all the maths and
equations......but hopfully after reading a few of my tutorials on the subject
you'll be able to throw together some great effects.....such as simple cloth
effects using Verlet Integration or Springs....Stacks of blocks using rigid
bodies....or even a racing car with bouncy spring suspension.
I find a lot of the problems with Game Physics is the way its explained, or
don't show the simple hacks to solve problems like sinking or jiggling, which
I'll show you.
But be warned....physics programming is not an easy road....god only knows
how many papers and books on the subject I've read, and everyone out there seems
to have there own way of solving different problems, ....some of the solutions
to me seem to involve so much maths and problem solving it can put you into a
coma ....still, stick with me and I'll try and get you through it.
The beauty is though, at the heart of most t hings, its pretty simple, and
I'll hopefully enlighten you to the how's and to's of things, and also give you
some simple demo's that you can experiment with to take you to the next
level....and before long you'll be wondering why you've never done it before :)
 |
Understanding the Basics |
 |
Well its always best to start simple I say.....We'll start with simple
objects and various things, such as gravity, constraints and collisions and
expand on them, step by step...Hopefully you've got a bucket of coffee on your
desk as some of it can get pretty boring..... lets roll out...
 |
Misc Physics Things |
 |
A complete game engine can be a monster task...I mean there's companies who
do this for a living (i.e. Havok and MathEngine)...so for us, we'll just see how
far we can take this....simple rigid bodies....contraints....some ragdoll
effects
- Collision Detection of Objects (Cubes, Spheres, Sausages...)
- Gravity and Impulses
- Constraints and Sticking Together
- Springs
- Character Physics, Ragdoll Effects
- Cloth System
- ....
DirectX X Direct X Direct-X- X File Format X DirectX X
File File File X .x x parser x loader DirectX API X File Skinning X Animation X
File Mesh X API
 |
Simple Physics Demos |
 |
I'm always experimenting and testing out new ideas, so to test out my ideas
and help me visualize and proof whats happening....as if you read around...some
different book, or some research papers or web sites....then you'll pick up lots
of new ideas and things to try to fix problems you have....and until you
actually sit down and code these things...you never get to actually say
'ha'...so it worked :)
| Description |
Source Code |
ScreenShots |
| A simple...I mean very simple
example of some rigid body spheres bouncing around in a room |
BallPhysics.zip |
<Image> |
| |
|
|
| |
|
|
A lot of the work I've done is through trial and error, so there might be a
few mistakes or improvments that can be made....please feel free to email me any
suggestions or comments, as I'm always glad to hear. bkenwright@xbdev.net
|