Files
wolf_dart/apps/wolf_3d_gui/README.md
T

2.4 KiB
Raw Blame History

wolf_3d_gui

Flutter GUI host application for running Wolfenstein 3D with the shared engine and Flutter integration package.

What This App Is

wolf_3d_gui is the primary Flutter app host in this workspace.

It:

  • initializes Wolf3dFlutterEngine,
  • discovers available game data directories,
  • manages game-data selection and session flow,
  • renders gameplay through Flutter-native UI and renderer widgets.

Entrypoint: lib/main.dart

Prerequisites

  • Flutter SDK
  • Dart SDK ^3.11.1
  • Local Wolfenstein 3D game data files

Linux native requirements

On Debian/Ubuntu, install:

libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev lld

Setup

From this directory:

flutter pub get

Run

Run on your default connected Flutter target:

flutter run

Examples by target:

flutter run -d linux
flutter run -d chrome

Test and Analyze

From this directory:

flutter test
flutter analyze

App Flow Overview

Startup sequence:

  1. lib/main.dart creates and initializes Wolf3dFlutterEngine.
  2. Engine init discovers configured game-data directories.
  3. App shell (Wolf3dGuiApp) drives selection/navigation.
  4. Gameplay screen builds engine session + renderer mode and runs loop.

Game data directory selection/persistence is managed by app managers and Flutter package persistence helpers.

Troubleshooting

  • No game data discovered: choose a valid directory in the picker and ensure files are present.
  • Linux build/runtime issues: verify native dependency packages are installed.
  • Web target limitations: use desktop target for full native-audio/path behavior.
  • Web release build wont load when opening index.html directly: Flutter web output must be served over http:// or https://, not opened with file://.

Build and serve locally:

flutter build web --release
python3 -m http.server 8080 -d build/web

Then open http://localhost:8080 in your browser.

If deploying under a subpath, build with matching base href, for example:

flutter build web --release --base-href /wolf_dart/