Decouple rendering and mechanics engine threads and introduce time diletation

3 votes

Somewhere in between 3-400 beavers the game starts to lag on normal(>>>) speed and has to be slowed down. While pausing the game or using a reduced speed, the graphic lag stops. Seems like the rendering and the mechanics engine are sharing the same thread. Decoupling these into separate threads (think of as a server-client approach, but both are in the same process space, and instead of IP they are using some in-process communication for state synchronization).

And after the decoupling the mechanics engine is still hitting the CPUs limit, start dilating time. Display an indicator to the user that its potato is at its limit, and physics is being calculated slower.

The physics engine hitting the CPU's limit shouldn't affect the rendering.

Under consideration Performance Suggested by: gczuczy Upvoted: 21 Jan, '23 Comments: 7

Comments: 7