Quote:Original post by hplus0603
The size and shape of our zones is set by the operations staff, and can vary from one 100,000,000 square kilometers down to 25x25 meters or so. (Could be smaller, but then the quad tree starts becoming cumbersomely large :-)
If you have sparse players, Bob's your uncle -- you only need to instantiate (or page in) the parts where players actually are. Also, spatial culling will work wonders, giving collision tests only against a small subset of your world in any one step.
Those distances arent significant unless I then knew what the NPCs/Players sensor distances are (ie- 1km range with the 25x25m means alot of zones to subscribe to...). I would expect that you use smaller zones for interiors and extra dense areas of activity, but do you allow variable zone dimensions (and possibly irregular sections, tho still Axis Aligned..) or simple rectangles.
AAAAAAAAAAA
AAAAAABBBAA
AAAAAABBBAA ... B being a high content 'detail' zone
AAAAAABBBAA ... surrounded by an mostly empty A zone
AAAAAAAAAAA
AAAAAAAAAAA
AAAAAAAAAAA
I can use a sparse system (with rollout and creation/expansion on the fly) and even within the zones there is partitioning (I so far have a budget of 2000 'dumb' objects each). Each zone is a fixed data structure (65k at this point) with a local heap to simplify the rollin/out. Intelligent 'significant' objects
live in their own data space (and can rollin and out if needed).
There are actually 3 types of 'zone' -- one being a regular heightmap terrain 'chunk', another being 'structures' (an irregular navmesh) that sits ontop of the heightmap terrain which is also used for vehicles (and I suppose for terrain the heightmap cant handle) and a 'tunnel' type used for interiors (also a navmesh based).