First observed in dedee32, though the diagnostic was wrong.
Log
Observed behavior
When moving around the camera during rendering, the speed does not appear to be the same across different machines.
Expected behavior
The camera speed should be fixed / user-defined but independent from the execution platform.
Minimal reproducible example
Run the renderer using cargo's debug profile, then release:
# run this and move around using the arrow keys
cargo run --example render_squaremap
# re-iterate, the speed should be higher
cargo run --release --example render_squaremap
Source of the problem
Because the camera speed is used directly as a flat value, the perceived speed will be directly correlated to the FPS of the rendering, i.e. to the processing power of your hardware.
This is a common problem when coding game engine and other software that uses an event-based main loop structure. The solution would be ~to introduce a dt variable updated at each iteration of the loop; It can then be used to adjust the speed used for camera movement~ to put a hard cap on FPS, we're not running an engine here.
Description
Information
Affected version or commit
First observed in dedee32, though the diagnostic was wrong.
Log
Observed behavior
When moving around the camera during rendering, the speed does not appear to be the same across different machines.
Expected behavior
The camera speed should be fixed / user-defined but independent from the execution platform.
Minimal reproducible example
Run the renderer using cargo's
debug
profile, thenrelease
:Source of the problem
Because the camera speed is used directly as a flat value, the perceived speed will be directly correlated to the FPS of the rendering, i.e. to the processing power of your hardware.
This is a common problem when coding game engine and other software that uses an event-based main loop structure. The solution would be ~to introduce a
dt
variable updated at each iteration of the loop; It can then be used to adjust the speed used for camera movement~ to put a hard cap on FPS, we're not running an engine here.