Fun factor takes a hit after 10 seconds of waiting for the game to start. Long load times also occur when you die or when you take turns in a hot-seat multi-player game.
Here are two reasons why even top games take a long time to load data.
1) Some Assembly Required
This happens when the data we load off the disc is not ready to use. In this case, either after or while we load it, we have to parse it, allocate memory, and construct things. For example, a game I worked on had a read-only SQLITE database. Queries on that database caused thousands of small allocations and multiple disc reads to occur. Argh! Please don't tell me we are parsing XML at run time!
The solution is to cook our data in the build pipeline into a "memory ready" format.. This also makes it easy to put the data loading on a background thread because the loader is simple (just read it into memory).
2. 52 Pickup
Another problem is when the game has thousands of files on the disc and loads them on demand in a haphazard way. When the disc light flashes like crazy I call that the "washing machine". It usually means the read head is constantly seeking to the next file to read.
Windows does that alot. Games should not. Ideally, we want to load data together in sets and make sure the order we load them is the order they are on the disc. Or even better, bundle them together, compress them, and load them with a single disc read in a background thread.
Streaming games are pretty much forced to do this. They have a data set for each room or area and only keep the current and adjacent rooms loaded in memory at same time. Audio files are almost always bundled into "banks". I just don't understand why we don't do this consistently for all game data.
About the Author
You May Also Like