Dungeon Siege Style Resource Management???

Started by
10 comments, last by Merick 21 years, 2 months ago
I've been wondering, how do games that have no (or virtually no) levels work? Alot of games recently have come out which dont seem to have to divide the game up into levels, and can let a player walk from one end of the world to the other, into the deepest cavern and back out, without requiring a point where the game gets rid of all the current resources (textures, models, sounds, etc) used in that level, and loads up everything for the next one. How do they do this?? Most every where i read about how to deal with resources, everyone just says, "load up everything you need for a level, and get rid of it when you change levels" ... i know tons of games do this, but i've noticed a few that dont ... Dungeon Siege doesn't seem to, and some massively online games dont like Asheron's Call and Asheron's Call 2 ... Anyone have any idea what they're doing?? .. When do they release resources, how do they know how much to load up? ... how do they (or do they) determine things to pre-load? .. Or do they simply find clever ways to hide their "levels"? [edited by - Merick on January 19, 2003 1:42:27 AM]
-----BEGIN PGP SIGNATURE-----iQA/AwUBOwgpXBtK1gxlCl8XEQIZDACeOhJi6KLEz+rHAI4PiXt9Nw/qFswAoPigEJoSGWopzBZ6V2H1zLECKT8T=CImp-----END PGP SIGNATURE-----
Advertisement
I''m short on time so I''ll point you to this Gamasutra article written by one of the guys behind Dungeon Siege. It might answer some of your questions.

TheLGN | consumer media with a passion - Senior Editor, Moderator
swift URL | browse my bookmarks [server may not always be on]
SotteD | Info/download
That has just very general information, nothing specific.

One of the resource manager''s primary functions is to make sure duplicate resources dont get loaded.

If you go with the level idea, then things are simple, tell the resource manager what it needs to load up, when something requests an object, give it to him. When you change levels, unload everything, and reload everything for the new level.


But in a game with no levels, you have to resort to maybe, loading things up when they''re requested and haven''t been previously loaded. This seems pretty obvious, maybe possibly adding some way for giving the resource manager a list of things to "preload" when it thinks it should.

But the real question i can''t seem to answer is, how do you know when to get rid of things? How do we know when its ok to remove things from memory? A simple answer would be, unload something when its no longer being used. But i''ve read things that say, DONT DO THIS, it causes your resource manager to be constantly unloading and loading something if it keeps getting requested... then released... then requested again ... released... etc etc .... they seem to suggest ... keeping a resource around until some point .... again this makes sense ... BUT ... how do you know when enough is enough??
-----BEGIN PGP SIGNATURE-----iQA/AwUBOwgpXBtK1gxlCl8XEQIZDACeOhJi6KLEz+rHAI4PiXt9Nw/qFswAoPigEJoSGWopzBZ6V2H1zLECKT8T=CImp-----END PGP SIGNATURE-----
I would have to say you would load and unload things based on thier proximity to you. If there happens to be something you might encounter a few screens away load it up. Or if that specific monstar or terrain is no where near you, unload it. I know this is very general, but I think it wouldnt be to terrible to put into code.
If you''ve played with creating maps for DS, you''d notice that it does in essence have levels. The difference is that each level doesn''t end with a wall, cliff, or any kind of boundry. Its like somebody just forgot to finish half the level. Well, each section fits together and to make a whole level you piece them together to get a solid terrain.

I''m guessing that what the game does is keep the segment your on in memory in addition to all the ones that connect to the one your in. When you move to one of the connecting edges, it dumps the ones not connected to it and loads the ones that are. It probably loads a few bytes and times it to figure out how many bytes to load per frame without disrupting the framerate too bad.
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
GDC Session addressing it.

Dave Mark - President and Lead Designer
Intrinsic Algorithm - "Reducing the world to mathematical equations!"
RIPPL Sports - NFL Statistical Analysis and Prediction System

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

man ... wish i had the money to go to that conference
-----BEGIN PGP SIGNATURE-----iQA/AwUBOwgpXBtK1gxlCl8XEQIZDACeOhJi6KLEz+rHAI4PiXt9Nw/qFswAoPigEJoSGWopzBZ6V2H1zLECKT8T=CImp-----END PGP SIGNATURE-----
Between that and E3, I had a blast... doing it all over again this year! Next year, however, GDC will be free since I am likely going to be a presenter. That doesn''t suck too bad.

Dave Mark - President and Lead Designer
Intrinsic Algorithm - "Reducing the world to mathematical equations!"
RIPPL Sports - NFL Statistical Analysis and Prediction System

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

im playing around with something like that (not textures and objects yet, but terrain). to include monsters, sounds, textures etc. i would probably just add them to a list for this ''sector''. so the manager can have a look at whats loaded next and probably needed and whats far enough away. i would keep everything within say 16 sectors in memory and while moving just load/unload a little each frame. im doing this with the terrain itself and while it takes about 1 second to load a sector that way and fps go down a little you dont feel that anything is just being loaded (couple of textures, the heightfield, the geometry is built.. in the final version the geometry will be exported by the editor and can just be loaded without extra processing (calculating thousands of normals and hundreds of sqrts takes some time).

with 3x3 sectors terrain (and maybe 4x4 objects, etc.) you just have to make sure the player will need at least 2-3 seconds to cross one sector (with a scale of 2.5x2.5km per sector id say that isnt a problem *g*). so what i think is important here: dont try to do it all at once but over time. just like the only way i see for decent ai is not doing the whole ai for everything every single frame.
f@dzhttp://festini.device-zero.de
Is there anyway those of us not lucky enough to make it to these conferences could get even a small part of the information being given? even if it was just a cryptic powerpoint slideshow?
-----BEGIN PGP SIGNATURE-----iQA/AwUBOwgpXBtK1gxlCl8XEQIZDACeOhJi6KLEz+rHAI4PiXt9Nw/qFswAoPigEJoSGWopzBZ6V2H1zLECKT8T=CImp-----END PGP SIGNATURE-----

This topic is closed to new replies.

Advertisement