Re:It's not what programming languages do, it's what they sh...
by marcosdumay on Friday March 27, 2020 @09:44AM
(#22702742)
Hum... May I ask how those different tasks communicate with each other?
Re:It's not what programming languages do, it's what they sh...
by kungtotte on Saturday March 28, 2020 @03:05AM
(#22709709)
I have no idea about how Doom Eternal does it, but John Carmack has some ideas on how to parallelize game engines here: https://www.youtube.com/watch?v=1PhArSujR_A&feature=youtu.be...
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.