Wednesday, March 8, 2017

assets - What all should be happening during the "Loading" screen?


Do I just need to be creating instances of all of my graphics into memory that are loaded from file? What is the best way to handle this? Do I just need some sort of assets manager that creates these graphic instances during the loading screen and is then referred to later?


What are common things that need to be pre-loaded in games? How much should I pre-load?


Is it worth showing some sort of progress bar? How can I keep load times short? What should the loading screen look like?


What are some good examples of loading screens? Any code examples?


Specifically, my game is for Andriod (Java/mobile), but feel free to make your answers generic.




Answer



The typical things to pre-load is anything that you're going to need in realtime. Save for concepts like clipmaps and megatextures (where the idea is to load the parts you need, and iteratively update it as you move around in the world), you're going to want to keep everything you need for your level/area/whatever in memory rather than on disk. IO is sloooow, and you don't want to load your textures when you turn the corner and it is about to be displayed. And by everything, I mean textures, sounds, meshes, meta data... everything.


If you can show a progress bar (i.e. you have an accurate mapping of loading steps to percentage), then by all means show it. If not, at least show something, like a short text message or a loading indicator, which is updated after each step so you can at least tell something is happening.


If there's something which you know will be needed, but not right away, you can load it in the background, and stall the game (not great, but make sure it rarely happens) if it's needed too early. This will help you keep the load time down. I don't know much about android development, or if it'll be to much for the device to handle alongside the game, but it's usually rather light on the CPU so there shouldn't be a big problem there.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...