a08af99b6f
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
wolf_3d_cli
Terminal host application for running Wolfenstein 3D using the shared wolf_3d_dart engine.
What This App Is
wolf_3d_cli is a pure Dart executable that:
- discovers Wolf3D game data on local disk,
- initializes
WolfEnginewith CLI input/audio backends, - runs the terminal game loop.
Entrypoint: bin/main.dart
Prerequisites
- Dart SDK
^3.11.1 - A terminal with ANSI escape support
- Local Wolfenstein 3D game data files
Setup
From this directory:
dart pub get
Run
Default discovery:
dart run bin/main.dart
With an explicit game-data directory:
dart run bin/main.dart --data-directory /path/to/game-data
Short option form:
dart run bin/main.dart -d /path/to/game-data
Show CLI usage:
dart run bin/main.dart --help
Runtime Architecture
At startup, bin/main.dart wires together:
WolfensteinLoader.discover(...)for data discovery,WolfEnginefor simulation/session state,CliInputfor keyboard input,NativeSubprocessAudiofor native-process audio playback,CliGameLoopfor terminal rendering loop + renderer settings persistence.
The CLI host exits through engine callbacks (onQuit, onGameWon) after restoring terminal state.
Development Commands
From this directory:
dart analyze
If module-level tests are added in this app later:
dart test
Troubleshooting
- No game data found: pass
--data-directoryexplicitly. - Terminal output artifacts: resize terminal and rerun; ensure ANSI-capable terminal emulator.
- No audio output: verify host OS has required native audio command support.
Related Modules
- Core runtime:
../../packages/wolf_3d_dart/README.md - Flutter host alternative:
../wolf_3d_gui/README.md - Workspace overview:
../../README.md