4.0 KiB
Dungeon Crawler World — S4 Audio and visual verification
Prerequisites
Godot 4.2+ is required (verified with Godot 4.5). GUT 9.5.0 is vendored and pinned at addons/gut. Linux visual verification needs either an active display or xvfb-run; the verification script uses Xvfb automatically when DISPLAY is unset.
Run on Linux
"${GODOT_BIN:-$(command -v godot4 || command -v godot)}" --path .
Use WASD / arrow keys (and QEZC diagonals). Game.submit_test_action(Vector2i) is the deterministic public E2E seam and follows the same action processor as keyboard input.
Optional ASCII audio layout
Audio is optional presentation. Its absence, unknown requests, missing folders, bad files, and unsupported codecs never affect a turn or game startup. No audio files ship with this repository.
AudioLibrary first searches the directory named by DCW_AUDIO_HOME; when it is unset, it searches ~/.local/share/dcwascii. Place tracks in this exact layout:
<root>/
├── audio/
│ ├── exploration/
│ ├── combat/
│ └── danger/
└── sfx/
├── attack_given/
├── attack_received/
├── menu_select/
├── menu_cancel/
├── item_use/
└── death/
Admitted file extensions are .mp3, .ogg, .oga, .wav, .flac, .m4a, and .opus. Before invoking an external Godot loader, AudioLibrary fails closed unless a .wav has a RIFF/WAVE signature, an .ogg/.oga/.opus has OggS, or an .mp3 has ID3 or a valid MPEG sync word. .flac and .m4a remain silent because this library has no native external loader for them. Thus extension-only or malformed external files are never handed to load_from_file. The game selects exploration at startup, changes to combat for a combat result, and dispatches SFX for player attacks, enemy attacks, and death.
Example:
DCW_AUDIO_HOME="$HOME/.local/share/dcwascii" "${GODOT_BIN:-godot4}" --path .
Tests and visual check
GODOT_BIN=/snap/bin/godot4 ./scripts/test-unit.sh
GODOT_BIN=/snap/bin/godot4 ./scripts/test-e2e.sh
GODOT_BIN=/snap/bin/godot4 ./scripts/run-visual-check.sh
GODOT_BIN=/snap/bin/godot4 ./scripts/verify.sh
run-visual-check.sh runs the actual project with --capture, waits for it to render, logs output to artifacts/visual-check.log, and requires the project-owned capture at artifacts/visual-check.png to be a nonempty valid PNG. It chooses xvfb-run when no display is available, enforces a timeout, and reports unavailable (rather than a false pass) when neither a display nor Xvfb exists. verify.sh runs unit tests and headless E2E before visual verification; unavailable visual verification is reported distinctly from a failed test or failed visual capture.
For a direct headless startup check:
GODOT_BIN=/snap/bin/godot4 timeout 3s /snap/bin/godot4 --headless --path .
Exploration, combat, and HUD
GameState.visible_cellsrender at full brightness; cells retained inexplored_cellsrender dimly; unknown cells are black.- FOV is map-aware: walls and closed doors are visible but block cells behind them.
HUD/PlayerHealthLabel,HUD/EnemyHealthLabel,HUD/CombatSummaryLabel, andHUD/EventLogexpose the current combat state.- Every
meleeandenemy_meleeresult is routed to its actor view; the sprite's persistent red tint makes received damage visible.
Exports
Install the matching Godot export templates, then configure/export the project in the Godot editor for Linux/X11 or Windows Desktop. Linux builds may be tested on a Linux host with the resulting executable. Windows exports can be produced from Linux when the export templates are installed, but this project does not claim that a Windows export has been tested on Windows.
Limits
This compact prototype has one deterministic goblin, direct pursuit, no persistence or inventory UI, and persistent rather than animated damage tint. Audio remains intentionally nonblocking and uses no bundled assets.