I want to create a simple space sim/trading game (yes, another one, but wait, there’s a catch!)… I want to fully physically simulate all AI ships in the universe - even those far from the player. The idea is to use extremely simple geometry, so that 1000s of bodies can be simulated at real-time rates.
The problem I’m trying to wrap my head around is the floating point accuracy issue. Even with double-precision at 1cm resolution you only get approx 0.01 light years (approx 16 sig figs in a double, with cm resolution, is 10^14 m = 0.01 light years).
Reading around these, and other, forums, it seems the way to solve this is a hierarchical coordinate system, i.e. chunking or tiling the world. Unfortunately, as far as I can tell Bullet is just not set up for this at all.
I have a couple of ideas, e.g. an entirely separate physics world per tile; or re-centring entities relative to their local tile with a “broadphase” plugin to exclude all entities not on that tile.
The main thing I’m struggling to wrap my head around is how to handle movement and collision detection across (i.e. on the edge between) world chunks/tiles. I’m fairly sure this is a solved problem, but I can’t find any specific information about it on the web.
Anyone got any ideas?