Play Mode — run the game inside the editor viewport
Current State
The game can only be exercised by doing a full build and running the produced executable. There is no in-editor Play Mode to iterate quickly, which is core to every modern editor (Unity/Godot press-Play loop).
Goal
A Play/Pause/Stop control that runs the game simulation against the current scene inside the editor viewport, with clean enter/exit and state restore.
Tasks
- Play/Pause/Step/Stop toolbar control + state machine (edit
↔️ play) - Run the engine update/render loop on the active scene within the viewport
- Snapshot scene state on Play and restore on Stop (no accidental edits persisted)
- Route input to the game while in Play; reuse Input API (#10 (closed))
- Visual indication of play state (tinted border / toolbar state)
- Decide execution model: in-process vs subprocess (document trade-offs; hot-reload interplay with)
- Pause + single-step for debugging; basic stats overlay (FPS) — can reuse #2 (closed)
Acceptance Criteria
- Pressing Play runs the current scene in the viewport; Stop restores the pre-play state exactly.
- Input drives the game during Play; edits made in Play do not leak into the saved scene.
Related
- #10 (closed) (input), (script reload), #3 (closed) (gizmos disabled in play), #2 (closed) (debug stats).
Edited by Bruno Massa