issues
search
sholloway
/
agents-playground
MIT License
4
stars
0
forks
source link
Main Loop and Frame Rate
#24
Closed
sholloway
closed
1 year ago
sholloway
commented
2 years ago
Ensure a stable frame rate.
Goals
Need a budget based approach to frame design.
Don't maximize the CPU.
Avoid sleeping threads.
The frame rate should be appropriate for the screen display. Typically 60 FPS.
Event driven rather than looping and calling updates on everything.
Tasks
[x] Create a scheduler that can invoke callbacks based on time target.
[x] Create a priority queue to enable scheduling.
[x] Support a smooth, steady frame rate.
[x] Display the active FPS in a simulation window.
[ ]
Resources
Game Programming Patterns: Game Loop
When should I use Fixed or Variable Time Step
Efficient Event-based Simulations
Fix your time step
CPU Slicing
Ensure a stable frame rate.
Goals
Tasks