LamptonWorm

Hi,

I've read a few things about needing to load up all resources up front, and avoiding dynamic loading in order to keep performance up - if that's true I guess it applies to mid-game loading and not per-level loading

I'm used to using various states to load up resources (e.g. models etc.) for a level, then play the level and when we trash the level (either quit/die/finish-level etc.) we trash the resources, then loop round and load up the next level's stuff etc.- is this way of working suitable using XNA

Cheers :)


Re: XNA Game Studio Express Gamestate and GarbageCollection - basic question

Jeff Weber

I have a content manager that loads all my level data. When I'm done with it and want to move to the next level I just call contentManger.UnLoad().

Once that is done I can start loading the next level...






Re: XNA Game Studio Express Gamestate and GarbageCollection - basic question

LamptonWorm

Hi,

Ta. Do you also use config/xml files to detail what media you're loading for each level

Cheers :)




Re: XNA Game Studio Express Gamestate and GarbageCollection - basic question

XNA-Mordt

I love questions like this as I'm still learning and the various ways of doing things makes me insanely curious :)

The game I'm working on uses an text document with all the assets/settings I require to be loaded for my content loader class. I'm no game expert, I'm new to all this and don't know if thats correct or not, but I plan on having file archives per level full of resources which I can hopefully load into memory and extract and read as needed. No idea if this is a good way or not but it seems really logical to me when brainstorming my perfect game structure.






Re: XNA Game Studio Express Gamestate and GarbageCollection - basic question

Jeff Weber

Yes, I have a "Level" object that is fully serializeable.  When it's time to load a new level, I deserialize the level from xml, and tell it to initialize, load...etc...




Re: XNA Game Studio Express Gamestate and GarbageCollection - basic question

LamptonWorm

Hi,

Sorry to be a pain, but would you be able to post an example of your level loading Or if others have seen any tutorials that cover this kind of thing, please let me know.

I am a bit obsessed with 'how things are done' and don't like to be too sloppy implemting this stuff, so any input/examples/do's/don't greatfully recieved to help get me up to speed.

Cheers :)