[ODE] OpenDE for an FPS ??

david@csworkbench.com david at csworkbench.com
Tue Mar 25 02:08:01 2003


Well, the short answer is: it depends on your FPS.  The more interaction
you want with the environment, the more ODE is likely to fit the bill.

If you're building an old-style Doom (anybody remember Wolfenstein 3D)
clone, where you basically need 2d top-down collision detection and some
nice graphics, then ODE is overkill.  But if you want to enable stuff like
explosions throwing nearby tables, chairs, and people into the air, being
able to shoot a barrel around the level when you get bored, even hopping
in a car (or tank) and driving through some levels, then ODE starts to
become really useful.  Then there are some games that are best done as
hybrids, where you might need a few world interactions to keep the game
interesting, but some of the game can just be graphically "faked".

If you decide to go with ODE, you can use the collision detection system
to simulate explosions of arbitrary size by creating a geometry object
(i.e. a collidable sphere) at the point of the explosion.  Different size
spheres make different sized explosions.  You could encapsulate a person
in a capsule (capped cylinder - you don't necessarily have to draw the
same thing you're representing to the engine) shape and move and rotate
the capsule (by adding forces) to move and rotate the person, allowing the
collision detection system to keep the person out of walls, floors and
other places.  People have used rays to simulate bullets - you shoot a ray
in a particular direction, and the collision engine tells you everything
it ran into.  If you wanted a rocket launcher, you could simulate rockets
by creating a body that's not affected by gravity, attach a capped
cylinder geom to it, and apply forces to the back end of it every step
until it ran into something, which you can record in the collision
callback.  You could change the body simulation from a capsule to a more
articulated structure (different bodies for torso, arms, legs, head, etc)
when a person was killed to allow for "ragdoll corpses" (maybe, I don't
think it's been done with ODE yet).  The iterated constraint solver I'm
close to releasing should simulate even piles of ragdoll corpses fairly
quickly (again, untested).

A few limitations of ODE:  Right now, ODE is strictly a _rigid_ body
physics engine.  This means that nothing can be broken, smashed, twisted,
stretched, bent, or otherwise deformed unless there's a joint (or nothing)
between the two parts you're manipulating, and joints cost cpu cycles. 
However, there are parameters that can be set for each contact created by
the collision system, that can allow a body to look spongy, bouncy, or
hard in varying amounts.

So to summarize, ODE may or may not be the right choice for your
particular FPS.  It really depends on how many added features you want to
implement.  If you just end up using ODE for collision detection and
gravity, you're probably wasting clock cycles.  But if you want to have
the framework to add physically based features now or later on, then ODE
just may be the tool you're looking for.  ODE should probably be thought
of as the special effects engine for the game, but if it happens to make
life a little easier in other aspects, then great!

David

> Im workin on an FPS game engine, I was just wondering if an advanced
> dynamics engine (designed for simulation-based applications) actually
> suit the FPS needs. Any ideas ? --
> __________________________________________________________
> Sign-up for your own FREE Personalized E-mail at Mail.com
> http://www.mail.com/?sr=signup
>
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode