Sign in to follow this  

Game character and scene managing

Recommended Posts

pressgreen    678

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?

Edited by greenzone

Share this post

Link to post
Share on other sites
FalconDragoon    485

 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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this