Opened 9 years ago
Last modified 8 years ago
#3309 closed defect
Very Fast Forward doesn't return to regular speed instantaneously — at Initial Version
Reported by: | elexis | Owned by: | |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 19 |
Component: | Network | Keywords: | |
Cc: | Philip Taylor | Patch: |
Description
If you change the game_speeds.json
file to support 20x speed, you will observe the following bug when doing a visual replay. If you try to set the gamespeed back to 1x and the replay has been playing for a while with 20x speed with bad performance, then the units are still walking in 20x speed over the screen while the simulation is only updated with 1x speed. So you basically can't set it back to regular speed instantaneously, but have to wait until all simulation updates were rendered.
See Game.cpp
line 389:
// At the normal sim rate, we currently want to render at least one // frame per simulation turn, so let maxTurns be 1. But for fast-forward // sim rates we want to allow more, so it's not bounded by framerate, // so just use the sim rate itself as the number of turns per frame. size_t maxTurns = (size_t)m_SimRate;
The function CGame::Update
or one of its assets must be changed somehow to fix this, so that people can replay with arbitrary game speeds.
Maybe the game can also skip the rendering of frames, so that you can actually fast forward with 20x speed if your CPU but not the graphics card supports it.