Project

General

Profile

Actions

Bug #1054

open

Support Freeciv21's select_step_ms

Added by louis94 - about 2 months ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
11/02/2024
Due date:
% Done:

0%

Estimated time:

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.

Actions #1

Updated by Marko Lindqvist about 1 month 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.

Actions #2

Updated by louis94 - about 1 month 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.

Actions

Also available in: Atom PDF