[pythian] Re: Physics Library

  • From: "kk" <krauspe@xxxxxxx>
  • To: <pythian@xxxxxxxxxxxxx>
  • Date: Thu, 8 May 2003 21:48:09 +0200

> Tokomak, or any other good physics library, would improve our physics
first
> by making it much faster.  Also:

With each library the problem of asynchronous calcutation will prevail (I
have the experience from ODE). So we should solve this first. I think I
could manage to do it.

> 1. Tokomak has the feature that you can tell it how long to spend on
physics
> each frame.  This means that if, for some reason, the game has a LOT of
> physics calculations in one frame, it will carefully manage this and not
> exceed it's time allocation.  This means the frame rate will not suffer
from
> physics.

Hmm, is tokomak step based? If so and we setup different step lenghts we
will end up with a very strange results. Example: the character moved with
measured time of 10 seconds to front and he has passed 13 metres. Now, he
rotates by 180 deg. and moves another 10 seconds long. But he does not stand
at the same place where he started this small exercise. Why? Because the
frame rate varied when he moved there and back and as the step sizes were
different, the speed was computed differently. This problem is called the
paradox of squared time succesion (finally this is how a few coders from
american unis call this) and I think I have explained it already. It is a
mathematical matter: t1 and t2 are two different times. The problem is that
(t1^2)+(t2^2) is not the same as (t1 + t2)^2. Many have tried to solve this
elegantly. The only solution (when using newtonian dynamics) is to have a
constant step or update time.

> 2. Realistic collisions are hard to do.  When two objects collide, they
> don't just bounce off each other, they tend to rotate.  Our physics engine
> does not handle rotation.  This will make your ideas of knocking things
> over, rolling boulders down hills, and more, possible.  We could not have
> done these things otherwise.  In our current engine, the boulder would
> simple "slide" down the hill, instead of rolling.

Sliding is fine for characters. But not to other objects - of course.

> 4. Linked objects: in Tokomak, you can link objects together to form
> interesting physics reactions.  You can build a person out of blocks and
> links, and then this person can fall realistically down stairs, off a
cliff,
> or whatever.  If you've played Raven Shield, seen the Doom III demo, or
> another recent game, you'll know what I mean.  Tokomak has a good example
of
> this in its "ragdoll" demo.

Joints are great. With a properly made editor - that would be a heaven for
level designers and players.

-kk


Other related posts: