Add: draw the screen at a steady pace, also during fast-forward
During fast-forward, the game was drawing as fast as it could. This means that the fast-forward was limited also by how fast we could draw, something that people in general don't expect. To give an extreme case, if you are fully zoomed out on a busy map, fast-forward would be mostly limited because of the time it takes to draw the screen. By decoupling the draw-tick and game-tick, we can keep the pace of the draw-tick the same while speeding up the game-tick. To use the extreme case as example again, if you are fully zoomed out now, the screen only redraws 33.33 times per second, fast-forwarding or not. This means fast-forward is much more likely to go at the same speed, no matter what you are looking at.
This commit is contained in:
committed by
Patric Stout
parent
5bfa014505
commit
c81c6e5eb7
@@ -64,7 +64,8 @@ private:
|
||||
|
||||
std::chrono::steady_clock::time_point cur_ticks;
|
||||
std::chrono::steady_clock::time_point last_realtime_tick;
|
||||
std::chrono::steady_clock::time_point next_tick;
|
||||
std::chrono::steady_clock::time_point next_game_tick;
|
||||
std::chrono::steady_clock::time_point next_draw_tick;
|
||||
|
||||
int startup_display;
|
||||
std::thread draw_thread;
|
||||
|
||||
Reference in New Issue
Block a user