Game character and scene managing

Started by
0 comments, last by FalconDragoon 11 years ago

OK so I have like a scene i want to create in my game. I load the scene on initialization as well as a few of the game characters. now i want to have the user run around interact with what is loaded for a bit. but now i want to introduce new characters and potentially updates to the scene, such as a new buildings or area to the scene. How do i store that which is not shown at the beginning. currently when i load characters or geometry from a file after the original initialization of the scene it halts the game, and once its loaded everything is fine again. but how do i prevent this having everything pause while things are loading?

How do people store geometry data with their programs to be used later rather then loading the geometry on the fly?

J-GREEN

Greenpanoply
Advertisement

Generally, You should pre-load anything that takes a measurable amount of time to, well, load, before you need to use it.

In your case, anything you're going to potentially need in the scene should be loaded up front during your existing loading period.

A more efficient method might be to start pre-loading additional assets on a background thread. You'd need to be able to accurately predict when a resource will be needed so that it can be loaded appropriately (alternatively, you just start pre-loading ALL the optional resources after the primary ones are loaded). Be wary of this approach though as attempting to access your objects before/while they're loading is in most cases going to end poorly.

Really though, just loading everything you might need for your scene is probably going to be good enough.

My Games -- My Music 

Come join us for some friendly game dev discussions over in XNA Chat!

This topic is closed to new replies.

Advertisement