Bug #1054
openSupport Freeciv21's select_step_ms
0%
Description
I am happy that you implemented an idea from Freeciv21 in #1012. I would like to share some details of our interface that you may consider importing as well.
Tilesets with many frames will likely want to control the frame rate. This can be changed in Freeciv21 with the following setting:
; delay between two consecutive images
;select_step_ms = 100
Implementing this would give you feature-parity and I would encourage you to enable the associated "unlimited-unit-select-frames" capability.
Updated by Marko Lindqvist 17 days ago
Focus unit selection animation has intentionally been left out from #1107 for not messing with existing animations. This ticket remains for resolving the issue for focus unit selection animation.
Proposed solution isn't really compatible with our general animations framework. Like #1107 already does for other animations, we should have constant animation refresh rate and animations just defining how many refreshes they miss. This requires only one timer for animations. The proposed solution would mean separate timer for each animation, as they would trigger at different ms intervals.
Updated by louis94 - 15 days ago
Typical animation frameworks (eg gtk_widget_add_tick_callback, requestAnimationFrame, QAnimation) are driven by the display driver at the display refresh frequency. Animation progress is derived from a steady clock (as current_time % frame_rate) instead of a timer. This is much less sensitive to system load than a timer-based approach, allows dropping frames when needed, and can be automatically throttled when the window goes out of sight. The principle is also readily extensible to animations running at different frame rates.