Arcade Quick Start

End-user guide for running the F1 StratLab arcade replay with the live strategy dashboard. Aimed at someone who has cloned the repository and wants to see three synchronised windows on screen inside ten minutes.

One command launches everything: the arcade replay window (pyglet), the strategy dashboard (PySide6), and the telemetry window (PySide6). The arcade process owns the simulation loop and broadcasts merged state on a local TCP port; the dashboard subprocess subscribes and renders.

Prerequisites

One-command launch

From the repository root:

python -m src.arcade.main --viewer --year 2025 --round 3 --driver VER --team "Red Bull Racing" --driver2 LEC --strategy

What happens:

  1. src.arcade.main parses the CLI and opens the arcade Window.
  2. The --viewer flag skips the menu and goes straight to F1ArcadeView.
  3. The view loads the 2025 Round 3 (Suzuka) parquet for Verstappen.
  4. With --strategy set, the view starts a TelemetryStreamServer on 127.0.0.1:9998, owns a StrategyState, and spawns the dashboard subprocess with python -m src.arcade.dashboard.
  5. The dashboard opens two PySide6 windows that both connect back to the stream.

Three windows are now on screen. The arcade window drives playback; the two Qt windows react to broadcasts.

What each window shows

Arcade replay (pyglet)

Track outline with the DRS zones drawn in green, two driver icons (our driver in team colour, rival in rival-team colour), a leaderboard on the right with compound pills and gaps, a weather panel, a driver-info strip, and a progress bar with the current lap.

Strategy dashboard (PySide6)

A QSplitter divides the window into two halves.

Telemetry window (PySide6)

Standalone QMainWindow with a 2x2 grid of pyqtgraph plots: Delta (our driver vs rival), Speed, Brake, Throttle. The window owns its own TelemetryStreamClient so it can be closed or moved across monitors without interfering with the strategy dashboard.

Menu mode vs --viewer

Drop the --viewer flag and the arcade opens MenuView first:

python -m src.arcade.main --strategy

MenuView is a pure-keyboard navigator (Arrow keys + Enter, Escape to go back). It lists years (2023–2025), rounds per year, drivers, and teams. The --viewer shortcut exists for regression testing and for the "I know what I want" path.

Single-driver vs two-driver mode

Omit --driver2 and only the main driver renders on track and in the telemetry charts. The Delta trace in the telemetry window stays empty (no rival to compare against) and the Situation card focuses solely on safety-car probability.

Pass --driver2 LEC and:

Playback controls

Hotkeys handled by F1ArcadeView.on_key_press:

Known limitations

Troubleshooting

Symptom Likely cause Fix
FileNotFoundError: data/raw/.../laps.parquet FastF1 cache not built Run once without --strategy, or python -m src.simulation.builder 2025 3
"Backend offline" / "Connection refused" Arcade did not start the stream server Restart the arcade with --strategy
"No module named pyqtgraph" uv sync did not complete Re-run uv sync from the repo root
"OpenAI api_key missing" .env missing or OPENAI_API_KEY unset Add the key to .env, or F1_LLM_PROVIDER=lmstudio
Dashboard renders but charts stay empty First broadcast carries only the arcade frame Per-agent outputs arrive on the second broadcast

Related reading