https://github.com/LMAX-Exchange/disruptor
https://github.com/LMAX-Exchange/disruptor/wiki/Performance-...
I've started using a variant of this in my .NET Core projects and have found the performance to be astonishing.
https://github.com/LMAX-Exchange/disruptor
https://github.com/LMAX-Exchange/disruptor/wiki/Performance-...
I've started using a variant of this in my .NET Core projects and have found the performance to be astonishing.
The big games will also prepare data for rendering in parallel (eg culling and sorting and whatnot, although much if this is also done on the GPU).
(Going by GDC talks, the rendering teardown articles and just what I see online from Unity/Unreal. I don’t work in games myself)
That's a big issue. There is a surprising amount of back and forth between objects in a single step of gameplay/AI.
And, generally gameplay code tends to be a big mess of wild and ever-changing requirements from gameplay designers, extreme time crunch and short term (1 game then burn it) goals. Ivory tower software architecture it is not...
Clustering physics into "islands" is common practice though.
Meanwhile, Doom Eternal has no main or render thread at all, and instead uses a massively parallel jobs system. https://www.dsogaming.com/news/doom-eternal-does-not-have-a-...
And some of those small scale hobby/indie devs may later end up working for "the big leagues" as well, so the extra context can benefit them too.
You can argue about when it is appropriate to use threads at all. But, if I'm going to use threads, I use a threaded queue for communication exclusively.
> https://max0x7ba.github.io/atomic_queue/html/benchmarks.html
I am also interested in the productivity and safety afforded by high-level languages in this arena. Dealing with memory and threading at the same time is not something I like to do at a low-level.
I found the abstraction this was originally developed for - processing of financial transactions with latency as the primary constraint - as an excellent analogue for UI event processing. Latency is also a huge concern when the user's eyeballs are in the loop.