ppb / pursuedpybear

A python game engine.
https://ppb.dev/
Artistic License 2.0
258 stars 98 forks source link

Experiment: Timing System #660

Open pathunstrom opened 2 years ago

pathunstrom commented 2 years ago

Regarding a conversation between myself and @AstraLuma, we discussed a more robust methodology for allowing PPB to be run by external event loops. One of the things we should test first is how systems function when they are no longer driving their own signalling system.

Primary targets for this experiment:

Updater will become our intermediary timer. It needs to grow a few capabilities: one time timeouts (use the event system both ways), and a "wait" function the engine will call for the sleep. Hopefully what this does is make the engine use a lot less CPU resources without sacrificing performance.

If this experiment is successful, we can discuss out to externalize this from the engine itself/fold these functions into the engine for a default implementation.