# 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 `WolfEngine` with 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: ```bash dart pub get ``` ## Run Default discovery: ```bash dart run bin/main.dart ``` With an explicit game-data directory: ```bash dart run bin/main.dart --data-directory /path/to/game-data ``` Short option form: ```bash dart run bin/main.dart -d /path/to/game-data ``` Show CLI usage: ```bash dart run bin/main.dart --help ``` ## Runtime Architecture At startup, `bin/main.dart` wires together: - `WolfensteinLoader.discover(...)` for data discovery, - `WolfEngine` for simulation/session state, - `CliInput` for keyboard input, - `NativeSubprocessAudio` for native-process audio playback, - `CliGameLoop` for terminal rendering loop + renderer settings persistence. The CLI host exits through engine callbacks (`onQuit`, `onGameWon`) after restoring terminal state. ## Development Commands From this directory: ```bash dart analyze ``` If module-level tests are added in this app later: ```bash dart test ``` ## Troubleshooting - **No game data found**: pass `--data-directory` explicitly. - **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`](../../packages/wolf_3d_dart/README.md) - Flutter host alternative: [`../wolf_3d_gui/README.md`](../wolf_3d_gui/README.md) - Workspace overview: [`../../README.md`](../../README.md)