Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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.



Hum... May I ask how those different tasks communicate with each other?


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...


Haha, love that game, but it gives me high blood pressure ;-).


Where would be a good thing to read about that?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: