Files

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:

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,
  • 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:

dart analyze

If module-level tests are added in this app later:

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.