4 ms·
I think the big problem is that games are hyper optimized for single threaded performance. ECS systems are basically big arrays of mutable data manipulated by
by cogman10 8y ago
I think the big problem is that games are hyper optimized for single threaded performance. ECS systems are basically big arrays of mutable data manipulated by multiple systems. To do threading well, you'd pretty much have to dump that.
Not to say they aren't behind. I once saw a game talk about how awesome they are because they reinvented a thread pool. But their state of the art is in direct conflict with good threading practices.
- auto 8y agoUnfortunately, we haven't seen the paradigm shift in game engine development that would be necessary to really get away from hyper optimized single threaded performance. Until someone figures out a way to efficiently utilize (highly) parallel execution in a deterministic game engine that has to run at at least 60fps, there isn't an incentive to move beyond the tried and true ways of doing things. At least, I don't think we have, I'm not in AAA and only keep a tangential pulse on that level of gamedev. That said, I'd be really interested to see how some of these Battle Royale engines tick (no pun intended). It seems like there's a ton of potential for "clustering" execution, essentially treating separate sections of maps as separate games, but considering it could come down to 100 people all being within the same 100 square meters, you can't necessarily rely on that model.
- vonmoltke 8y ago> Until someone figures out a way to efficiently utilize (highly) parallel execution in a deterministic game engine that has to run at at least 60fps, there isn't an incentive to move beyond the tried and true ways of doing things. I was doing that 10 years ago... in a radar signal processor. I could do the same thing in a game engine, but the games industry seems to be allergic to devs who do not come up in the games industry. I suspect that has as much to do with the poor state of parallelism as anything.
- ethbro 8y agoThey're optimized that way for a reason. It'll be a number of years yet for large-scale multithreading to penetrate the consumer market. 92% of users still have 2 or 4 physical CPUs, so 2-8 threads. https://store.steampowered.com/hwsurvey/Steam-Hardware-Software-Survey-Welcome-to-Steam https://store.steampowered.com/hwsurvey/Steam-Hardware-Softw...
- lev99 8y agoThere is a big difference between 2core/2thread and 4core/8thread. It would be interesting to see more granular data.
- ethbro 8y agoIs the difference of physical cores vs modern SMT that big for gaming? I'd assume given asset size they're already dealing with a large amount of cache misses, and if you're stalling for a memory read anyway then it seems less impactful than on a high-thoroughput tuned scientific workload.