ScottGarryFoster / SuperGameEngine

SuperGameEngine (SGE) is my project to explore programming in C++ by creating a 2D Engine in SDL2.
https://docs.supergameengine.com
Other
1 stars 0 forks source link

Create an Easy way to create slower loops #40

Open ScottGarryFoster opened 8 months ago

ScottGarryFoster commented 8 months ago

Update loop is good but when you have updates or tasks to run once every 5 seconds, 30, or minute it requires a lot more work to implement.

Create a structure you can setup to give a bit of code to and send off to run in intervals or once a timeout has occurred.

This does not need to be multi-threaded, in fact it probably shouldn't be at first.