mirror of
https://github.com/IAmTomShaw/f1-race-replay.git
synced 2026-05-09 08:25:56 +02:00
[GH-ISSUE #35] Bug: Playback speed parameter ignored in arcade replay #8
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/f1-race-replay#8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MohitBaghel24 on GitHub (Dec 12, 2025).
Original GitHub issue: https://github.com/IAmTomShaw/f1-race-replay/issues/35
main.py
main.py
The playback_speed parameter passed to the
main()
function is not being used when calling run_arcade_replay(). Instead, the playback speed is hardcoded to 1.0, making it impossible to adjust the replay speed.
Location
File:
main.py
Line: 58
Current Behavior
The
main()
function accepts a playback_speed parameter (line 7), which is set to 1 on line 82. However, when run_arcade_replay() is called on line 58, the playback speed is hardcoded to 1.0:
run_arcade_replay(
frames=race_telemetry['frames'],
track_statuses=race_telemetry['track_statuses'],
example_lap=example_lap,
drivers=drivers,
playback_speed=1.0, # ❌ Hardcoded value
driver_colors=race_telemetry['driver_colors'],
title=f"{session.event['EventName']} - {'Sprint' if session_type == 'S' else 'Race'}",
total_laps=race_telemetry['total_laps'],
circuit_rotation=circuit_rotation,
chart=chart,
)
Expected Behavior
The function should use the playback_speed parameter that was passed to
main():
run_arcade_replay(
frames=race_telemetry['frames'],
track_statuses=race_telemetry['track_statuses'],
example_lap=example_lap,
drivers=drivers,
playback_speed=playback_speed, # ✅ Use the parameter
driver_colors=race_telemetry['driver_colors'],
title=f"{session.event['EventName']} - {'Sprint' if session_type == 'S' else 'Race'}",
total_laps=race_telemetry['total_laps'],
circuit_rotation=circuit_rotation,
chart=chart,
)
Impact
Users cannot adjust the playback speed of race replays
The playback_speed parameter exists but has no effect
Any future command-line arguments or configurations for playback speed would be ignored
Suggested Fix
Replace line 58:playback_speed=1.0,
with:playback_speed=playback_speed,
Steps to Reproduce
1.Modify the playback_speed variable on line 82 to a different value (e.g., 2.0)
2.Run the script
3.Observe that the replay still runs at 1.0x speed