Separate render loop from game state loop #153

Open
opened 2025-11-29 18:08:02 +00:00 by john · 1 comment
Owner

Enable "realtime" use cases via render cache. Can we enable the render loop to proceed with last-cached render state, and allow a simulation loop (owns all Python objects and execution) to run on a fixed schedule? This is a formalization of the pattern that is pretty common: a timer causing simulation updates; the problem is that requires the simulation updates to be completed in a single frame. A separate loop would permit long simulation steps while frames are updated with running animations

Enable "realtime" use cases via render cache. Can we enable the render loop to proceed with last-cached render state, and allow a simulation loop (owns all Python objects and execution) to run on a fixed schedule? This is a formalization of the pattern that is pretty common: a timer causing simulation updates; the problem is that requires the simulation updates to be completed in a single frame. A separate loop would permit long simulation steps while frames are updated with running animations
Author
Owner

Event Handler Complexity
Event handlers run on the main thread and block rendering

From john/McRogueFace/wiki/Input-and-Events.-

Providing consistent state is the challenge, but allowing event handlers to more thoroughly perform the simulation without losing frames is the reward.

> Event Handler Complexity > Event handlers run on the main thread and block rendering From john/McRogueFace/wiki/Input-and-Events.- Providing consistent state is the challenge, but allowing event handlers to more thoroughly perform the simulation without losing frames is the reward.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: john/McRogueFace#153
No description provided.