Skip to main content
gamedev.net
🔒 Locked

Dynamic Level loading

Started by Trashcann Jul 16, 2003 at 10:48 PM 3 replies 1k views
Original Post
Trashcann
Trashcann
i heard a lot about dynamic level loading in half life and (in a past post) asherons call, and was wondering how you would be going about that? i know in Halo it loads the part you can see, and as you are passing through that it loads the rest of the section. how would you load just a piece of a huge level? this is very confusing to me
ermokwww.truevision3d.com
S1CA
S1CA
Chop your world up spatially. Into multiple "zones" of:

- Cells & Portals.
- PVS.
- Octree/Quadtree.

Any zone that''s not loaded in is just like an empty node within the higher level map of the world.

All scene graphs, objects, more local trees etc in a particular zone all contained in a distinct grouping of data files.


Use camera direction and possibly dead reckoning/AI techniques to predict where you might be going in the world within n milliseconds.

How far you predict ahead (n ms) depends on how long it takes on average to load the contents of a zone and how many zones you need to load in on average.

Start background async. loading of all the zones you predict you might be in soon, and use priorities and a LRU type scheme to evict zones you''re leaving

one idea is to have a super super low detail version of the basic scenery for every zone loaded in at all times. For long distance rendering you show that, and the more likely it is that the real scenery for that zone will actually be needed, the more data you load for it.

[Sorry for poor explanation - tiredness]

--
Simon O''Connor
ex -Creative Asylum
Programmer &
Microsoft MVP
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site
TechnoGoth
TechnoGoth
It all depends on how you set of your map files and the funtion you use to to turn that map into a set of images displayed on the screen.

Essintally you just have to know where you are in the map and then load only those map element relative to your postion. then as the character moves new elements are load and old ones are discarded. Normally this is done not at each step but at preset points or interverals. For instance if in your game you can go into houses, then when they player opens the door you load the houses interior. When they leave the house you unload the interior.

Or if your have lots or RAM and CPU power and want to things to remiain as the player left them you don''t unload the houses interior. However that would require more system overhead.
Thor82
Thor82
i''m really new to such kind of things, i wanted to make a question about this topic:

imagine a world like daoc or UO (supposingly it is 3d) it''s a REALLY big one so loading it all would need NASA pcs...

i thought on how to load sections, and WHAT to load...
using an octree for the terrain for example should work good, and good also for static objects like trees, houses, boxes,tables etc etc
for these object i select in which section they are referring to their position...but what about mobile objects? like monsters for example, a monster is an entity that moves and eventually follows a player, so it''s position may change and skip from a node to another...
how could you take care of this condition? which monsters to load?



There aren''''t problems that can''''t be solved with a gun...
There aren''t problems that can''t be solved with a gun...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.