Files
DungeonCrawlerWorld/README.md
T

2.0 KiB

Dungeon Crawler World — S3 Combat HUD

Prerequisites

Godot 4.2+ (verified with Godot 4.5) is required. GUT 9.5.0 is vendored and pinned at addons/gut.

Run

"${GODOT_BIN:-$(command -v godot4 || command -v godot)}" --path .

Use WASD / arrow keys (and QEZC diagonals). The deterministic public E2E seam is Game.submit_test_action(Vector2i); it calls the same action processor as keyboard input.

Tests

GODOT_BIN=/snap/bin/godot4 ./scripts/test-unit.sh
GODOT_BIN=/snap/bin/godot4 ./scripts/test-e2e.sh
GODOT_BIN=/snap/bin/godot4 ./scripts/verify.sh

Scripts use GODOT_BIN, otherwise discover godot4, then godot, and run headlessly.

Combat HUD

  • HUD/PlayerHealthLabel and HUD/EnemyHealthLabel show current hit points; the latter reports No active target after the goblin is defeated.
  • HUD/CombatSummaryLabel is the separate public combat state: it identifies the current target and its hit points, then explicitly reports no active target after removal.
  • Every melee and enemy_melee TurnResult is routed to its actor view. ActorView.last_damage records the received amount and the sprite is tinted red to make the hit visible.
  • HUD/EventLog keeps appending all combat messages. The public E2E seam remains Game.submit_test_action(Vector2i) and uses the same action processor as keyboard input.

Verification

GODOT_BIN=/snap/bin/godot4 ./scripts/test-unit.sh
GODOT_BIN=/snap/bin/godot4 ./scripts/test-e2e.sh
GODOT_BIN=/snap/bin/godot4 ./scripts/verify.sh
GODOT_BIN=/snap/bin/godot4 timeout 3s /snap/bin/godot4 --headless --path .

The focused presentation unit test plus resolver tests and the real-scene E2E cover hit feedback, counterattack feedback, HUD values/summary/log, and enemy removal.

Limits

This slice deliberately provides one compact map, one deterministic goblin, direct pursuit, no persistence, inventory, audio, or animations/tweens. Damage feedback remains a persistent tint/state rather than a timed animation.