[ODE] Large physics worlds - let autodisable handle it, or create a sliding window of physical activity?

Megan Fox shalinor at gmail.com
Wed Apr 20 17:08:13 MST 2005


Let me explain my world, first of all.  Explorable, free-form,
non-linear RPG world.  Physics are a boon because they give players
yet another possible option in solving problems (and creating them,
for the evil characters, poor NPCs crushed by rolling logs and such).

Now because of that, I of course manage things such that not too much
of the world is ever in memory at once.  I'm working with load regions
that are tenatively set at 204.8 meters square, but that's a fairly
arbitrary value (first test heightmap was 256x256, scaled by 8, with
world scale 0.1 - 256x8x0.1 = 204.8), and physics need only be active
to the region that the player can influence without crossing a load
zone.

It's the region I'm asking about here.

I see two options.  In one, I simulate the entire load zone,
everything has a physical representation that needs one.  The
simulation extends beyond the barrier of the load zone out to max
visible range for the sorts of small objects that can be physically
active (meaning a ball rolled outside the zone would fade out of view
just before I turned it off physically and it stood stock-still). 
Everything is alive at once, which could be expensive, but with
auto-disable active it should all in theory be mostly turned off
almost all the time.  (this assumes NPCs can't initiate any sort of
physical interaction without the presence of the player, which is
fairly accurate, since NPCs exist more as state machines than entities
when outside the range of the player)

The other option is to simulate only within a bubble around the
player.  Things like terrain stay loaded in memory the entire time,
but balls and people and ragdolls lose their physical representation
when the player's bubble leaves the region (thus freezing them in
space until the bubble comes back).  This is more work on my part, and
it can make for some strange occurences (explosion happens as player
walks away, explosion freezes until player comes back, probably to be
greeted by flying objects with no apparent cause since the explosion
animation finished playing a long time), but if auto-disable won't do
what I think it's the only other option.


I'm of the mind I'm almost definately stuck with option #2, but I'm
wondering if anyone else has tried anything similar and found that
option #1 was actually viable?  So long as you're intelligent with
your auto-disabling (disabling islands instead of individual bodies),
it seems as if your system would effectively disable most of the load
zone for you anyways, but keep everything consistent and moving if
there was a force applied some distance from the player.  But then
again, maybe even disabled bodies present some sort of drag on the
system that would kill it?


Thanks,
-Megan Fox



More information about the ODE mailing list