3.5 KiB
G4 — Full visual presentation pass
Scope
Implemented in the dedicated slice/g4-presentation-polish worktree only. No DCWASCII files were read or changed; no remote push or PR was made.
Root cause
The pre-existing EventPresenter queued every GameEvent but passed all of them directly to CombatFeedback. CombatFeedback.begin() only animated movement, projectile/combat impact, and death kinds; door, chest, loot, trap, spell-start, and quest events were intentional no-ops. Consequently, the game had no explicit one-to-one semantic-to-presentation contract, no dedicated feedback views for exploration/narrative outcomes, and no way for a real scene test to observe presentation sequence independently from domain mutation.
TDD presentation sequence
- Established the pre-change unit baseline: 185 tests / 1,407 assertions, passing.
- Added the red mapping specification for the eight required kinds. Before implementation, the missing
map_eventAPI made the new test fail to compile/type-check, demonstrating that no mapping contract existed. - Added the real
Game.tscnE2E sequence specification before implementation: combat, door, chest, loot, trap, spell, quest, death must emit exactly one ordered presentation event each. - Implemented the display-only mapping and feedback views, then ran unit and E2E suites green.
Implementation
- Added immutable
PresentationEvent, which wraps (without mutating) one sourceGameEvent, its feedback kind, notification text, and accent color. - Extended
EventPresenterwith:- explicit
map_event()mapping for the required eight semantic categories; - a
presentation_startedobservation signal; - queue-preserving dispatch to one appropriate feedback view;
- a structural
get_feedback_metrics()seam (mapped_kinds: 8) without pixel snapshots.
- explicit
- Added scene-owned feedback views:
DoorChestFeedback: short 160 ms cyan/gold expanding marker;LootFeedback: short 160 ms gold/red/green floating notification for loot, traps, and quests.
- Kept combat/death in the existing short combat feedback path and gave untargeted spell casts a 120 ms non-blocking cast interval rather than a silent no-op.
- Wired the new views into
scenes/Game.tscnunderEventPresenter. Their colors follow the established blue-black dark UI palette and existing readable gold/cyan/red/green semantic accents. - Added mapping unit coverage and
test_presentation_event_sequence_e2e.gd, which instantiates the real game scene and asserts the full ordered sequence.
Verification and capture evidence
./scripts/verify.sh passed after the final changes:
| Suite | Result |
|---|---|
| Unit | 186 tests, 1,423 assertions passed |
| Integration | 11 tests, 59,470 assertions passed |
| E2E | 58 tests, 573 assertions passed |
| Visual structural captures | passed |
The existing non-brittle capture checker was run through the full verification command and confirmed both 1280×720 scripted reference scenes:
| Capture | dungeon non-black | visible | explored | unknown | explored luminance | unknown luminance |
|---|---|---|---|---|---|---|
visual-check.png |
489,308 | 17,524 | 10,438 | 365,325 | 0.012 | 0.001 |
visual-check-exit.png |
489,252 | 17,404 | 17,146 | 439,497 | 0.012 | 0.001 |
These metrics verify the dark-art visibility/fog structure rather than comparing brittle snapshots.
Additional review passed: git diff --check reports no whitespace errors.
Commit / delivery
A local task commit is created after this report. It is intentionally not pushed and no PR is opened.