Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Merick

Dungeon Siege Style Resource Management???

This topic is 5807 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
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??

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!