Appearance
Chapter 08 - UX, Score, HUD, Audio, and Feedback
Where this chapter fits: the core loop works; now the game starts communicating. Score, a HUD drawn with a hand-made bitmap font, cached rendering of the claimed area, synthesised audio cues, and the slow-draw risk/reward mechanic all arrive here.
Time: [TODO Simon: time estimate for chapter 08]
The chapter 08 build after one capture: the progress bar and CLAIM readout reflect the 19% claimed, the score jumped by 10 points per tile, and the status line reports the event.
Prerequisites
Chapters 01-07. The full core loop (move, draw, capture, survive) must work before this chapter, because everything here is about communicating it.
Learning objectives
By the end of this chapter you should be able to:
- implement a scoring system with claim, threshold-bonus, and level-bonus rules,
- draw text without a font asset using a bitmap glyph table and the pixel texture,
- cache claimed-area rendering with a render target and a dirty flag, and explain when to invalidate it,
- lay out a HUD that surfaces score, lives, claim progress, and danger states,
- synthesise placeholder audio cues in code and frame them as information design,
- wire the slow-draw risk/reward mechanic into movement and scoring, and pass the chapter's 45 tests.
Code anchors
Source/Systems/ScoringSystem.csSource/Entities/Trail.cs(IsSlowDraw),Source/Systems/TrailSystem.cs(TryStart(..., slowDraw),UpdateSlowDraw,SlowDrawSpeedFactor),Source/Systems/ArenaSystem.cs(ApplyClaimResult(..., slowDraw),IsSlowClaimed)Source/Rendering/BitmapTextRenderer.csSource/Rendering/HudRenderer.cs(the chapter 08 snapshot uses a staged version without level/powerup readouts)Source/Rendering/ClaimedAreaRenderer.csSource/Systems/AudioCuePlayer.csSource/Data/ThemePalette.cs(introduced here, examined in chapter 15)Source/Game/LastPerimeterApp.cs(chapter 08 staged version:HandleClaim, slow draw, cues)Tests/Systems/AudioCuePlayerTests.cs,Tests/Systems/ScoringSystemTests.cs,Tests/Systems/TrailSlowDrawTests.cs
The key lesson
Feedback is not late polish, but part of the mechanic in an arcade game. Score turns success into progression and the HUD makes danger and status readable. Colour and fill show the world changing, and sound confirms warnings, reward and failure.
The HUD in one frame
HudRenderer.Draw is a list of positioned draws over the top and bottom reserves that chapter 02 carved out of the window. The chapter 08 staged version shows the score, high score, claim percentage and the goal from GameConfig.WinClaimPercentage. It also shows one pip per life in the player colour, the fuse warning, the respawn SAFE marker, the slow-draw indicator and the status message. Chapter 10 adds LEVEL, and chapter 11 adds SHIELD and DOUBLE PTS. The important design choice is that the HUD reads everything from GameSession and never computes game state itself.
Text without a font asset
MonoGame's usual text path is a .spritefont compiled by the content pipeline. This course does not use the content pipeline for assets (the template's Content Builder project stays in the build but is unused). Instead, text is drawn from a table of 5 x 7 glyphs declared as strings:
csharp
private static readonly Dictionary<char, string[]> Glyphs = new()
{
['A'] = new[] { "01110", "10001", "10001", "11111", "10001", "10001", "10001" },
['B'] = new[] { "11110", "10001", "10001", "11110", "10001", "10001", "11110" },
// ... C-Z, 0-9, and : % . ! - / and space ...
};
public void DrawString(SpriteBatch spriteBatch, Texture2D pixel, string text, Vector2 position, Color color, int scale = 2)
{
Vector2 cursor = position;
// Upper-case one character at a time: text.ToUpperInvariant() would
// allocate a new string on every call, many times per frame.
foreach (char rawCharacter in text)
{
if (!Glyphs.TryGetValue(char.ToUpperInvariant(rawCharacter), out string[]? glyph))
{
cursor.X += 6 * scale;
continue;
}
for (int row = 0; row < glyph.Length; row++)
{
string line = glyph[row];
for (int column = 0; column < line.Length; column++)
{
if (line[column] != '1')
{
continue;
}
spriteBatch.Draw(pixel, new Rectangle((int)cursor.X + (column * scale), (int)cursor.Y + (row * scale), scale, scale), color);
}
}
cursor.X += 6 * scale;
}
}Each glyph advances the cursor by six columns (five plus one of spacing), so MeasureString is arithmetic: text.Length * 6 * scale wide and 7 * scale tall. That is what lets the menus in chapter 12 centre text without ever measuring a real font. Lower-case characters are upper-cased one at a time, and unknown characters advance without drawing.
Scoring
ScoringSystem is small enough to show whole, and it encodes three product rules: per-tile reward, risk/reward via slow draw, and end-of-level bonuses:
csharp
public sealed class ScoringSystem
{
private const int PointsPerTile = 10;
private const int PointsPerOvershootPercent = 1000;
private const float SlowDrawScoreMultiplier = 2f;
public int ScoreClaim(int claimedTileCount, bool slowDrawActive = false, float runMultiplier = 1f)
{
float multiplier = slowDrawActive ? SlowDrawScoreMultiplier : 1f;
return (int)MathF.Round(claimedTileCount * PointsPerTile * multiplier * runMultiplier);
}
public int CalculateThresholdBonus(float claimedPercentage, float requiredPercentage)
{
int overshootPercent = (int)MathF.Floor(claimedPercentage - requiredPercentage);
return Math.Max(0, overshootPercent) * PointsPerOvershootPercent;
}
public int CalculateLevelBonus(int levelNumber)
{
return 1000 + (levelNumber * 500);
}
}| Rule | Value |
|---|---|
| each captured tile (region + trail tiles) | 10 points |
| slow draw active at completion | x2 |
| run multiplier (chapter 13 upgrades) | x1 by default |
| level bonus on completion | 1,000 + 500 x level |
| threshold bonus on completion | 1,000 per whole percent claimed above the level's goal (floor(claimed - required) x 1000; 82% against a 75% goal pays 7,000) |
The slow-draw rule is the risk/reward mechanic in one line. Holding the slow-draw input (Space or Left Shift, or the right trigger; see InputState.IsSlowDrawHeld) multiplies your speed by TrailSystem.SlowDrawSpeedFactor (0.5) while drawing and doubles the value of the claim.
Slow draw is a property of the trail, not of the frame. TrailSystem.TryStart(anchor, firstPoint, slowDraw) latches Trail.IsSlowDraw when the trail begins. TrailSystem.UpdateSlowDraw(slowDrawHeld) demotes it permanently the first time the input is released. The claim is scored from completedTrail.IsSlowDraw. You cannot tap the key at the last moment for double points, and UpdateSlowDraw_ReleasingTheInputDemotesTheTrailPermanently in TrailSlowDrawTests pins that down.
Claimed area rendering as a performance lesson
The arena has 31,878 tiles. Drawing every claimed tile every frame would be tens of thousands of Draw calls for a picture that only changes when a claim lands. ClaimedAreaRenderer draws it once into a RenderTarget2D and reuses that texture until told otherwise:
The public surface is four methods: MarkDirty, UpdateColor(claimedColor, claimedSlowColor) (re-tints the cache when the theme changes; chapter 15 uses it), Prepare and Draw. Draw is cheap every frame. The expensive grid walk only happens in Prepare, after MarkDirty or a colour change:
csharp
public void MarkDirty()
{
_isDirty = true;
}
// Call once per frame before GraphicsDevice.Clear and SpriteBatch.Begin.
// A rebuild switches render targets. Doing that inside an open batch can
// discard the frame's earlier Clear on the back buffer.
public void Prepare()
{
if (_isDirty)
{
Rebuild();
}
}
public void Draw(SpriteBatch spriteBatch)
{
if (_cache is null)
{
return;
}
spriteBatch.Draw(_cache, new Vector2(_arenaSystem.Bounds.Left, _arenaSystem.Bounds.Top), Color.White);
}
private void Rebuild()
{
if (_cache is null)
{
return;
}
_graphicsDevice.SetRenderTarget(_cache);
_graphicsDevice.Clear(Color.Transparent);
_cacheSpriteBatch.Begin(samplerState: SamplerState.PointClamp);
for (int x = 0; x < _arenaSystem.GridWidth; x++)
{
for (int y = 0; y < _arenaSystem.GridHeight; y++)
{
Point gridPoint = new(x, y);
if (_arenaSystem.GetTileState(gridPoint) != TileState.ClaimedByPlayer)
{
continue;
}
Rectangle tile = _arenaSystem.GetTileBounds(gridPoint);
Color color = _arenaSystem.IsSlowClaimed(gridPoint) ? _claimedSlowColor : _claimedColor;
_cacheSpriteBatch.Draw(_pixel, new Rectangle(tile.X - _arenaSystem.Bounds.Left, tile.Y - _arenaSystem.Bounds.Top, tile.Width, tile.Height), color);
}
}
_cacheSpriteBatch.End();
_graphicsDevice.SetRenderTarget(null);
_isDirty = false;
}A RenderTarget2D is a texture you can draw into. SetRenderTarget(cache) redirects drawing to it, and SetRenderTarget(null) points back at the screen. The single pass picks ClaimedSlow for tiles that ArenaSystem.IsSlowClaimed flags. That flag is recorded by ApplyClaimResult(claimResult, slowDraw), so a slow-drawn capture is visibly a different colour from a fast one. The app calls MarkDirty() exactly once per successful capture, which ties back to the capture lifecycle from chapter 06. The pattern is practical and reusable.
The renderer creates one _cacheSpriteBatch in its constructor and disposes it in Dispose. Creating one per rebuild would allocate GPU resources on every capture.
IMPORTANT
Call _claimedAreaRenderer.Prepare() before GraphicsDevice.Clear and SpriteBatch.Begin, never inside the open batch. A rebuild switches render targets. Doing that inside an open batch can discard the frame's earlier Clear on the back buffer. Doing the rebuild first means the batch only ever draws to the back buffer.
Audio as information design
Treat sound as gameplay communication. A warning sound is danger escalation, a claim sound is reward confirmation, and a death sound is failure confirmation. If the sound is missing or mistimed, players read the game state less clearly.
There are no audio files. AudioCuePlayer synthesises six sine-wave tones into SoundEffect instances at construction time, 16-bit mono at 44.1 kHz:
csharp
private static SoundEffect CreateTone(float frequency, float durationSeconds, float volume)
{
const int sampleRate = 44100;
int samples = (int)(sampleRate * durationSeconds);
byte[] buffer = new byte[samples * 2];
for (int i = 0; i < samples; i++)
{
double time = i / (double)sampleRate;
short sample = (short)(Math.Sin(2d * Math.PI * frequency * time) * short.MaxValue * volume);
buffer[i * 2] = (byte)(sample & 0xFF);
buffer[(i * 2) + 1] = (byte)((sample >> 8) & 0xFF);
}
return new SoundEffect(buffer, sampleRate, AudioChannels.Mono);
}| Cue | Tone | When |
|---|---|---|
PlayClaim | 880 Hz, 0.10 s | a capture lands |
PlayWarning | 440 Hz, 0.08 s | the fuse first enters IsWarning (once per trail) |
PlayDeath | 180 Hz, 0.25 s | a life is lost |
PlayLevelComplete | 520 Hz, 0.25 s | the claim goal is reached |
PlayMenuSelect, PlayPowerup | 660 Hz, 990 Hz | chapters 11-12 |
Two practical notes. First, SoundEffect needs an audio device. On a machine without one, such as a CI runner, creating a tone throws. The constructor catches that failure and runs silent, so the game still starts. IsSilent reports it, and every Play call then does nothing. A second, internal constructor takes a tone factory (Func<float, float, float, SoundEffect>), so a test can simulate a machine with no audio device:
csharp
public AudioCuePlayer()
: this(CreateTone)
{
}
// The factory lets a test simulate a machine with no audio device.
internal AudioCuePlayer(Func<float, float, float, SoundEffect> toneFactory)
{
try
{
_claim = toneFactory(880f, 0.10f, 0.20f);
// ... the other five tones ...
}
catch (Exception exception) when (exception is NoAudioHardwareException or DllNotFoundException)
{
// No audio device (or no native audio library): run silent so the game still starts.
_claim = null;
// ... the other five effects set to null ...
IsSilent = true;
}
}The screenshot capture script in scripts/ therefore runs with OpenAL's null driver (ALSOFT_DRIVERS=null on Linux). Second, every cue is played through one gate, Play(soundEffect), that honours the audio-enabled flag and master volume. The options menu in chapter 12 needs no changes here.
The palette arrives
This chapter also introduces ThemePalette, a record of nine named colours (Background, Player, Trail, TrailSlow, Claimed, ClaimedSlow, Enemy, Accent, Warning). The chapter 08 app stops reading colours from GameConfig and reads _gameSession.ThemePalette instead. That is why the trail can change colour when slow draw is active. It is also why ClaimedAreaRenderer is now constructed with two colours, so slow-drawn claims fill in ClaimedSlow: new ClaimedAreaRenderer(_arenaSystem!, GraphicsDevice, _pixel, _gameSession!.ThemePalette.Claimed, _gameSession.ThemePalette.ClaimedSlow). Chapter 15 turns the palette into a theme and accessibility system. For now it is the single default (NeonVector).
Build it step by step
This chapter is copy-along. Step 1 copies the chapter's files from the snapshot, and the steps after it walk through what changed and why.
TIP
This exercise is optional. If you want to write the LastPerimeterApp.cs wiring yourself, do not run the copy command in step 1. Copy every file in the step 1 lists by hand except Source/Game/LastPerimeterApp.cs, then make each change that steps 2 to 8 describe in your own LastPerimeterApp.cs. When you finish, compare your file with <course-repo>/DOCUMENTATION/LastPerimeter-Source/08-UX-Score-HUD-Audio-And-Feedback/Source/Game/LastPerimeterApp.cs.
Step 1 - Copy the chapter files
From your LastPerimeter folder, copy the Source and Tests folders from this chapter's snapshot over your own. The command creates any folders you do not have yet and overwrites the files that changed. Replace <course-repo> with the path to your copy of the course repository (the course index explains how to get it).
In PowerShell:
powershell
Copy-Item -Recurse -Force "<course-repo>/DOCUMENTATION/LastPerimeter-Source/08-UX-Score-HUD-Audio-And-Feedback/Source", "<course-repo>/DOCUMENTATION/LastPerimeter-Source/08-UX-Score-HUD-Audio-And-Feedback/Tests" .In bash:
bash
cp -R "<course-repo>/DOCUMENTATION/LastPerimeter-Source/08-UX-Score-HUD-Audio-And-Feedback/Source" "<course-repo>/DOCUMENTATION/LastPerimeter-Source/08-UX-Score-HUD-Audio-And-Feedback/Tests" .That copy brings in these files. The listings in this chapter show the parts worth studying, not every line.
New files:
Source/Data/ThemePalette.csSource/Rendering/BitmapTextRenderer.csSource/Rendering/HudRenderer.csSource/Systems/AudioCuePlayer.csSource/Systems/ScoringSystem.csTests/Systems/AudioCuePlayerTests.csTests/Systems/ScoringSystemTests.csTests/Systems/TrailSlowDrawTests.cs
Replaced files:
Source/Data/GameSession.csSource/Game/LastPerimeterApp.cs
HudRenderer.cs is a staged version. The staged GameSession gains ThemePalette, Score, HighScore, SummaryLine, and the derived read-only SlowDrawActive => Player.CurrentTrail?.IsSlowDraw == true.
NOTE
Every step after this one describes code that is already in the files you just copied. Open the file each step names and read along. You type nothing unless a step says so.
Step 2 - Construct the new systems
Open Source/Game/LastPerimeterApp.cs. Initialize now constructs ScoringSystem and AudioCuePlayer, and LoadContent now constructs HudRenderer. The session starts with StatusMessage = "CLAIM THE ARENA".
Step 3 - Freeze play when the round is decided
Open Source/Game/LastPerimeterApp.cs and find Update. Play now freezes at the top of the method once the round is decided:
csharp
if (_gameSession.Status is GameStatus.LevelComplete or GameStatus.GameOver)
{
base.Update(gameTime);
return;
}Step 4 - Slow draw
Open Source/Game/LastPerimeterApp.cs and stay in Update. The flag lives on the trail, so the app never assigns it. The app computes the speed for this frame from the derived SlowDrawActive before any movement:
csharp
// Slow draw trades speed for double points while a trail is active.
float currentSpeed = _config.PlayerSpeed * (_gameSession.SlowDrawActive ? TrailSystem.SlowDrawSpeedFactor : 1f);
_gameSession.Player.Speed = currentSpeed;The trail latches the flag when it starts (the wall branch) and demotes it on the first release (the accepted-move branch):
csharp
if (_gameSession.RespawnGraceRemaining <= 0f
&& _arenaSystem.IsUnclaimedWorld(candidate)
&& _trailSystem.TryStart(_gameSession.PlayableWallPath.Snap(_gameSession.Player.Position), candidate, input.IsSlowDrawHeld))
{
_gameSession.Player.Position = candidate;
_gameSession.Player.CurrentTrail = _trailSystem.ActiveTrail;
_gameSession.Player.CurrentDirection = direction;
_gameSession.StatusMessage = _gameSession.SlowDrawActive ? "SLOW DRAW 2X" : "DRAW TO CAPTURE";
}csharp
else if (_trailSystem.CanAdvance(intendedPosition, _arenaSystem, direction, _gameSession.Player.CurrentDirection))
{
_gameSession.Player.Position = intendedPosition;
_trailSystem.AppendPoint(_gameSession.Player.Position);
bool wasSlowDraw = _gameSession.SlowDrawActive;
_trailSystem.UpdateSlowDraw(input.IsSlowDrawHeld);
if (wasSlowDraw && !_gameSession.SlowDrawActive)
{
_gameSession.StatusMessage = "FAST DRAW";
}
_gameSession.Player.CurrentTrail = _trailSystem.ActiveTrail;
_gameSession.Player.CurrentDirection = direction;
}Step 5 - The warning cue
Open Source/Game/LastPerimeterApp.cs and stay in Update. The warning cue plays once per trail, using a flag that is cleared whenever the trail ends (claim, cancel, death, or stepping back onto the wall):
csharp
bool killedByFuse = _fuseSystem.Update(_trailSystem.ActiveTrail, playerMoved, deltaTime);
if (_fuseSystem.IsWarning && !_warningAudioPlayed)
{
_audioCuePlayer.PlayWarning();
_warningAudioPlayed = true;
}Step 6 - Score the claim in HandleClaim
Open Source/Game/LastPerimeterApp.cs and find HandleClaim. The claim-apply block now lives in HandleClaim(claimResult, completedTrail) (the call site is HandleClaim(claimResult, completedTrail!)), with scoring, the cue and the level-complete bonus added. Everything slow-draw-related reads the completed trail, not the input:
csharp
private void HandleClaim(ClaimResult claimResult, Trail completedTrail)
{
_arenaSystem.ApplyClaimResult(claimResult, completedTrail.IsSlowDraw);
_gameSession.ClaimedAreaPercentage = _arenaSystem.GetClaimedPercentage();
_gameSession.Score += _scoringSystem.ScoreClaim(claimResult.CapturedRegion.TileCount + claimResult.TrailTiles.Count, completedTrail.IsSlowDraw, 1f);
_gameSession.CaptureHistory.Add(new CapturedZone(_gameSession.CaptureHistory.Count + 1, claimResult.CapturedRegion.Tiles, completedTrail.IsSlowDraw));
_gameSession.PlayableWallPath = _wallSystem.RebuildPlayablePath(_arenaSystem);
_gameSession.Player.Position = _gameSession.PlayableWallPath.Snap(_gameSession.Player.Position);
_claimedAreaRenderer?.MarkDirty();
_gameSession.Player.CurrentTrail = null;
_fuseSystem.Reset();
_warningAudioPlayed = false;
_audioCuePlayer.PlayClaim();
// ... eliminated enemies removed as in chapter 07 ...
if (_gameSession.ClaimedAreaPercentage >= _config.WinClaimPercentage)
{
int bonus = _scoringSystem.CalculateThresholdBonus(_gameSession.ClaimedAreaPercentage, _config.WinClaimPercentage) + _scoringSystem.CalculateLevelBonus(1);
_gameSession.Score += bonus;
_gameSession.SummaryLine = $"BONUS {bonus}";
_gameSession.Status = GameStatus.LevelComplete;
_audioCuePlayer.PlayLevelComplete();
_gameSession.StatusMessage = "LEVEL COMPLETE - ESC TO QUIT";
}
else
{
_gameSession.StatusMessage = "CAPTURE COMPLETE";
}
_gameSession.HighScore = Math.Max(_gameSession.HighScore, _gameSession.Score);
}Step 7 - Death feedback
Open Source/Game/LastPerimeterApp.cs and find HandlePlayerDeath. It now plays the death cue, sets StatusMessage = "RESPAWN" (or the game-over message) and clears _warningAudioPlayed.
Step 8 - Draw the feedback layer
Open Source/Game/LastPerimeterApp.cs and find Draw. It calls _claimedAreaRenderer.Prepare() before GraphicsDevice.Clear(palette.Background). It then draws the trail thicker and paler while slow draw is active. The whole trail flashes in the warning colour while IsWarning, and the spark replaces it once IsActive. The HUD is drawn last so it sits over everything:
csharp
_trailRenderer.Draw(_spriteBatch, _pixel, _gameSession.Player.CurrentTrail, _gameSession.SlowDrawActive ? palette.TrailSlow : palette.Trail, _gameSession.SlowDrawActive ? 5f : 3f);
if (_fuseSystem.IsActive)
{
PrimitiveDrawing.DrawFilledCircle(_spriteBatch, _pixel, _fuseSystem.Position, 4f, palette.Warning);
}
else if (_fuseSystem.IsWarning && _gameSession.Player.CurrentTrail is not null)
{
_trailRenderer.Draw(_spriteBatch, _pixel, _gameSession.Player.CurrentTrail, palette.Warning, 4f);
}
// enemies, then the player, then:
_hudRenderer.Draw(_spriteBatch, _pixel, _gameSession, _config, _fuseSystem.IsWarning || _fuseSystem.IsActive, _fuseSystem.IsActive);Step 9 - Build, test, run
Run these commands from your LastPerimeter folder:
bash
dotnet build
dotnet test
dotnet run --project Platforms/DesktopVKdotnet test reports 45 passing tests, including the new AudioCuePlayerTests, ScoringSystemTests and TrailSlowDrawTests.
The last command opens the game window. Press Escape to close it.
Chapter snapshot
The matching buildable project is DOCUMENTATION/LastPerimeter-Source/08-UX-Score-HUD-Audio-And-Feedback; build and test it standalone with dotnet build and dotnet test. This chapter stages AudioCuePlayerTests, ScoringSystemTests and TrailSlowDrawTests, bringing the suite to 45 passing tests. AudioCuePlayerTests checks that a player built with no audio device is silent and that playing a cue does nothing. The snapshot adds ScoringSystem, AudioCuePlayer, BitmapTextRenderer, the staged HudRenderer (without later level/powerup readouts), and ThemePalette, and its chapter app wires the full feedback layer in. The final form, with run modifiers added, is in last-perimeter/Source/Game/LastPerimeterApp.cs.
Checkpoint
- In your
LastPerimeterfolder, rundotnet test. 45 tests pass, includingScoreClaim_AppliesSlowDrawAndRunMultipliers,CalculateThresholdBonus_AwardsPointsPerPercentAboveTarget, andUpdateSlowDraw_ReleasingTheInputDemotesTheTrailPermanently. If your count differs, run the same command in<course-repo>/DOCUMENTATION/LastPerimeter-Source/08-UX-Score-HUD-Audio-And-Feedback/and compare. - Run the game with
dotnet run --project Platforms/DesktopVKand confirm score, lives and claim progress appear on screen. Make one capture with the arrow keys (the Controls table in chapter 03 lists every input). The score rises by 10 points per captured tile. - Hold Space or Left Shift, draw a capture, and keep the key held until the trail reconnects. It scores double, with the thicker pale trail and the
SLOW DRAW 2Xreadout shown above. Then start another trail with the key held and release it part-way. The status line readsFAST DRAW, the trail thins, and the claim scores single. - Start a trail, then release every key so the player stops. After one second the trail flashes and
WARNappears. After two the spark replaces the flash and the label changes toFUSE. Press an arrow key to move, release it again, and confirm the spark resumes where it paused. The warning tone must not replay, because it fires once per trail.
What you should have now
You now have:
- score updates,
- HUD layout,
- claimed-area caching,
- audio hooks for critical events,
- status line messages for major transitions.
Common mistakes
- rebuilding the claimed-area texture every frame (the whole point of the dirty flag),
- drawing the HUD before the world so it is painted over,
- playing the warning cue every frame instead of once per trail,
- creating
SoundEffectinstances per play instead of once, - letting the HUD compute state (for example recounting tiles) instead of reading
GameSession.
Extensions
Try to add:
- score popups,
- animated claim fill,
- slow-draw and fast-draw UI,
- accessibility-friendly palette swaps (chapter 15 shows the shipped answer).

