3 ms·
> Almost all games today aren't just single threaded, they are laughably single threaded. Many (maybe most, still) games have embarrassingly single-threaded ga
by bri3d 5y ago
> Almost all games today aren't just single threaded, they are laughably single threaded.
Many (maybe most, still) games have embarrassingly single-threaded game logic (i.e., there's still one "runloop" thread which manages game state), but almost universally at this point there's a separate thread for loading data, decompressing data, asset / script compilation, and audio. Many games also use a separate thread for physics as well, and some use worker threads for AI / rules engine NPC behavior as well.
Anyway, loading data is where the parallel and batched nature of modern gaming workloads comes in - almost all games at this point do some kind of constant background asset loading to avoid the need for load screens between areas. This asset loading is almost always done in a background thread and is pretty much a 1:1 match for an NVMe queue - request the blocks containing the data you need, ask to be flagged when a block has been DMAed into the memory area you want it in, and then decompress it in the background.