News for hackers. Stuff that matters.
Re:How do I design a game from scratch? A primer on core loops by mojuba on Saturday July 18, 2020 @06:36AM (#23880427)
Thanks, that's very interesting.

The benefit of threads - green or not - is also that you can maintain the state in the stack and benefit from functional style programming, which is generally more robust and easier to write compared to state machines.

Parallelism has many forms and from my experience you can always find ways of minimizing synchronization in particular tasks. For example, you can sometimes replace a whole queue with a single atomic pointer when you know messages override previous ones semantically, i.e. the consumer is only ever interested in the most recent one.

There are no comments on this comment yet.