> Game development often has a very large global state
Not any more!
I'm currently playing Doom Eternal, and I've got to take my hat off to its developers: It's ridiculously well optimised! I played the previous version of Doom on the same hardware, and it was a stuttering mess at 4K, but now it's silky smooth with Ultra Nightmare quality settings. Wow.
They achieved this by breaking up the game into about a hundred "tasks" per frame, and each task runs in parallel across all available cores. These submit graphics calls in parallel using the Vulkan API.
There is just no way to write an engine like this with a "very large global state". No human is that good at writing thread-safe data structures.
The only way to do it is to separate the data and code, making sure each unit does its own thing, independently of the others as much as possible.
Not any more!
I'm currently playing Doom Eternal, and I've got to take my hat off to its developers: It's ridiculously well optimised! I played the previous version of Doom on the same hardware, and it was a stuttering mess at 4K, but now it's silky smooth with Ultra Nightmare quality settings. Wow.
They achieved this by breaking up the game into about a hundred "tasks" per frame, and each task runs in parallel across all available cores. These submit graphics calls in parallel using the Vulkan API.
There is just no way to write an engine like this with a "very large global state". No human is that good at writing thread-safe data structures.
The only way to do it is to separate the data and code, making sure each unit does its own thing, independently of the others as much as possible.