Appearance
Lesson 06 — Make risk a timed operation
Where this lesson fits: a valid trail can now exist. Add the time pressure that makes remaining exposed a decision rather than a pause button.
Time: 2–3 hours
Prerequisites and outcomes
Complete lesson 05. By the end, you can explain warning, ignition, burn progress, movement pause, death threshold, and reset as separate states.
Prepare and run
- Reuse the tutorial chapter 05 project prepared in lesson 05; do not copy chapter 05 over it again.
- Open
Source\Systems\FuseSystem.csandTests\Systems\FuseSystemTests.cs. Run the test command below from your learner project's solution folder. - Run
dotnet run --project Platforms\DesktopVKand follow steps 2–3 of the tutorial's chapter 05 checkpoint: draw inward with the arrow keys, stop, observe the spark, move, stop again, and let it reach the player. - Stage note: chapter 05 cancels the trail and returns to the anchor when the fuse reaches the player. Lives/death arrive in tutorial chapter 07; HUD warning/audio arrive in chapter 08.
Code anchors
last-perimeter/Source/Systems/FuseSystem.cslast-perimeter/Source/Entities/Trail.cs(GetPointAtDistance)last-perimeter/Tests/Systems/FuseSystemTests.cslast-perimeter/Source/Rendering/HudRenderer.cslast-perimeter/Source/Systems/AudioCuePlayer.cs
Guided operations
- Follow
FuseSystem.Updatewith no active trail; confirm it resets. - Advance stopped time to the warning threshold, then the trigger threshold. Distinguish the warning state from an active fuse.
- Advance burn distance and follow
Trail.GetPointAtDistanceto locate the fuse on a multi-segment trail. - Before ignition, moving resets the stopped timer. After ignition, moving pauses the existing burn position; stopping again resumes burning.
- Let the burn reach the player. Trace the returned signal to trail cancellation in the staged app; revisit shield/death handling in lessons 09 and 13.
- Complete or cancel the trail and verify the fuse resets. Revisit the warning signal's HUD and audio consumers in lesson 10.
powershell
dotnet test --filter FullyQualifiedName~FuseSystemTestsCheckpoint
Tests distinguish warning from active fuse, movement from stopped time, and reset from pause. In play, the fuse progresses along the actual trail rather than across a straight-line shortcut.
Common mistakes
- Resetting a lit fuse whenever movement resumes instead of pausing its position.
- Passing button state as proof that the player moved; a blocked movement input is not displacement.
- Duplicating the fuse timer inside HUD or audio code.
Questions and extension
Which cue should fire only once per warning episode? How would you prevent a repeated warning sound every frame?

