Skip to content

Chapter 15 - Themes, Accessibility, and Shipping ​

Where this chapter fits: the final chapter. The game is complete to play, and this chapter turns it into something you can hand to another person. It looks the way they need it to, more players can use it, and it can leave your machine.

Time: [TODO Simon: time estimate for chapter 15]

The SunsetSynth theme at UI scale 1.5: purple claimed area, pink player, larger HUD text

The final build in the SunsetSynth theme with UI SCALE set to 1.5. Every renderer reads its colours from the same ThemePalette record, so a theme change is one object swap.

This chapter has a different job from the fourteen before it. The game already plays from the title screen to the run summary, so there is no new mechanic to add. What it cannot do yet is suit somebody else: it has one look, and it only runs from your source folder with the .NET SDK installed. By the end of the chapter both of those are fixed.

In this chapter you will:

  1. copy the final version of the game class, which makes your project the finished game,
  2. read how one palette object gives the game three themes, and how the options menu swaps it while you watch,
  3. read how three accessibility options (colourblind mode, UI scale and reduced flash) are built on that same path,
  4. walk the options menu key by key and confirm that every setting survives a restart,
  5. publish a release build, run it from its output folder, and package it to send to someone.

Prerequisites ​

Chapters 10-14 (the complete game). This chapter leans most on three earlier ones. The palette first arrived in chapter 08. The options menu and the saved profile were built in chapter 12. The platform projects you publish here were created in chapter 01.

Learning objectives ​

By the end of this chapter you should be able to:

  1. name the nine roles of ThemePalette and the renderer that reads each one,
  2. trace a theme change from a key press in the options menu to the next frame on screen,
  3. explain why colourblind mode is an override on any theme, and list the seven roles it replaces,
  4. state what UI scale and reduced flash change, and why the fuse warning survives when the flash is off,
  5. say which changes to ThemePreset and GameSettings keep an old profile.json valid, and which silently break it,
  6. publish a self-contained build for your operating system, find its output folder, and run the game from there.

Code anchors ​

  • Source/Data/ThemePalette.cs (the nine roles, and Create(ThemePreset, bool colorblindMode))
  • Source/Data/Enums.cs (ThemePreset: NeonVector, CrtGreen, SunsetSynth)
  • Source/Data/GameSettings.cs (Theme, ColorblindMode, UiScale, ReducedFlash)
  • Source/Game/LastPerimeterApp.cs (the final version: UpdateOptionsMenu, ChangeOption, GetOptionsLabels, Cycle, ApplyCurrentSettings, the reduced-flash guard in DrawGameplaySurface, UpdateWindowTitle)
  • Source/Rendering/HudRenderer.cs (the UI-scale calculation)
  • Resources/Identity.props (the name and version of the published game)
  • Platforms/DesktopVK/LastPerimeter.DesktopVK.csproj (the project you publish)

Why a finished game needs these three things ​

A game that only its author can enjoy is not finished, however good the loop is. Three things stand between "it works for me" and "here, try this", and each one maps to a part of this chapter.

  • It looks the way the player needs it to. Themes are the friendly version of this, and they are also the groundwork for the next point. If colour is a decision made in one place, it can be changed in one place.
  • More players can use it. Some players cannot tell the default colours apart, small text is hard to read on a big screen across a room, and a flashing trail is unpleasant or worse for some people. Each of those is one setting here.
  • It can leave your machine. Nobody you send the game to has your source folder or the .NET SDK. A published build is a folder they can unpack and run.

NOTE

None of this needs a new system. The palette has been in the game since chapter 08, and the options menu and the profile since chapter 12. This chapter connects them, which is why the only file that changes is the game class.

One palette, nine roles ​

Nine palette roles across three presets, the colourblind override that replaces seven of them, and which renderer reads each role

A theme in this game is not a set of sprites. It is one ThemePalette record with nine colours, and each colour is named after the job it does, not after how it looks. The renderers only ever ask for a role. None of them contains a colour for the player or the claimed area.

RoleRead by
BackgroundDraw, which clears the screen with it
PlayerPlayerRenderer, and the HUD SAFE label
Trail, TrailSlowTrailRenderer, and the HUD SLOW DRAW 2X label
Claimed, ClaimedSlowClaimedAreaRenderer
EnemyEnemyRenderer
Accentthe highlighted menu row, the HUD HI, GOAL and SHIELD readouts, and the Shield pickup
Warningthe fuse spark, the warning flash on the trail, the HUD FUSE and DOUBLE PTS readouts, and the Fuse Reset pickup

ThemePalette.Create is the only place a theme is defined. It picks the nine colours for the preset, then applies the colourblind override if it is switched on. The listing shortens two of the three presets to a comment. The file has all nine colours for each.

csharp
public static ThemePalette Create(ThemePreset preset, bool colorblindMode)
{
    ThemePalette palette = preset switch
    {
        ThemePreset.CrtGreen => new ThemePalette(/* green phosphor set */),
        ThemePreset.SunsetSynth => new ThemePalette(/* synthwave set */),
        _ => new ThemePalette(
            Color.Black,
            Color.Cyan,
            Color.Yellow,
            new Color(255, 245, 140),
            new Color(0, 160, 255, 180),
            new Color(255, 140, 0, 180),
            Color.OrangeRed,
            Color.LimeGreen,
            Color.OrangeRed),
    };

    if (!colorblindMode)
    {
        return palette;
    }

    return palette with
    {
        Player = new Color(0, 114, 178),
        Trail = new Color(240, 228, 66),
        TrailSlow = new Color(255, 243, 128),
        Claimed = new Color(0, 158, 115, 180),
        ClaimedSlow = new Color(230, 159, 0, 180),
        Enemy = new Color(213, 94, 0),
        Accent = new Color(204, 121, 167),
    };
}

Because the renderers know role names and nothing else, a theme cannot break the rules of the game by accident. Whatever colours a preset chooses, "claimed" is still drawn by the code that draws claimed area, and "enemy" by the code that draws enemies. The visual language survives every skin, and adding a theme is a matter of adding nine colours.

The default NeonVector theme: cyan player, yellow trail, blue claimed areaThe CrtGreen theme with the colourblind override: Okabe-Ito green claimed area, blue player, pink accent text
NeonVector, the defaultCrtGreen with COLORBLIND ON: the override replaces seven roles, and the preset's Background and Warning stay

How a change reaches the screen ​

The palette the renderers read lives on the session, as GameSession.ThemePalette. Changing the theme means replacing that one object, and the options menu does it in three short methods. UpdateOptionsMenu turns keys into a change:

csharp
private void UpdateOptionsMenu(InputState input)
{
    string[] labels = GetOptionsLabels();
    HandleVerticalMenu(input, labels.Length, ref _optionsMenuIndex);

    if (input.IsCancelPressed)
    {
        _status = _optionsReturnStatus;
        _profileTracker.MarkSettingsChanged();
        return;
    }

    bool changed = false;
    if (input.IsMenuLeftPressed)
    {
        changed = ChangeOption(-1);
    }
    else if (input.IsMenuRightPressed || input.IsConfirmPressed)
    {
        changed = ChangeOption(1);
    }

    if (changed)
    {
        ApplyCurrentSettings();
        _audioCuePlayer?.PlayMenuSelect();
        _profileTracker.MarkSettingsChanged();
    }
}

Left and Right change the highlighted row, and Enter counts as Right. ChangeOption edits the setting and reports whether anything changed, and ApplyCurrentSettings rebuilds the session palette from the two settings that affect it:

csharp
private bool ChangeOption(int direction)
{
    if (direction == 0)
    {
        return false;
    }

    switch (_optionsMenuIndex)
    {
        // ...
        case 1:
            _profileTracker.Settings.Theme = Cycle(_profileTracker.Settings.Theme, direction);
            return true;
        case 2:
            _profileTracker.Settings.ColorblindMode = !_profileTracker.Settings.ColorblindMode;
            return true;
        // ...
        case 5:
            _profileTracker.Settings.ReducedFlash = !_profileTracker.Settings.ReducedFlash;
            return true;
        case 6:
            _status = _optionsReturnStatus;
            return false;
        default:
            return false;
    }
}

private void ApplyCurrentSettings()
{
    if (_gameSession is not null)
    {
        _gameSession.ThemePalette = ThemePalette.Create(_profileTracker.Settings.Theme, _profileTracker.Settings.ColorblindMode);
    }

    _audioCuePlayer?.Configure(_profileTracker.Settings.AudioEnabled, _profileTracker.Settings.MasterVolume);
}

That is the whole path. The setting changes, the palette is rebuilt, and the very next Draw reads the new roles, so the options menu doubles as a live preview. MarkSettingsChanged flags the profile as dirty, and the chapter 12 save policy writes profile.json as soon as the game is not in play.

Two details make this cheap to extend. The first is Cycle, which steps through the values of any enum and wraps at the ends:

csharp
private static TEnum Cycle<TEnum>(TEnum value, int direction) where TEnum : struct, Enum
{
    TEnum[] values = Enum.GetValues<TEnum>();
    int index = Array.IndexOf(values, value);
    index = (index + direction + values.Length) % values.Length;
    return values[index];
}

Cycle asks the enum for its values, so a fourth ThemePreset appears in the menu without any menu code. The second is ClaimedAreaRenderer, the one renderer that caches pixels (chapter 08). Draw calls _claimedAreaRenderer?.UpdateColor(...) with the two claimed roles every frame, and the renderer only rebuilds its texture when one of them has changed.

The final options menu with seven rows: DIFFICULTY, THEME, COLORBLIND, AUDIO, UI SCALE, REDUCED FLASH, BACKThe same menu after cycling THEME to CRTGREEN and turning COLORBLIND ON
the options menu with its default valuesthe same menu with THEME CRTGREEN and COLORBLIND ON

Accessibility built on the palette ​

The three accessibility options are small because the hard part is already done. Colour is decided in one place, HUD text is drawn by one renderer, and the warning flash is one branch. Each option is therefore one rule in one spot.

The colourblind override ​

Look again at the end of ThemePalette.Create. When colorblindMode is true, a with expression replaces seven of the nine roles: Player, Trail, TrailSlow, Claimed, ClaimedSlow, Enemy and Accent. Six of the replacement colours come from the Okabe-Ito palette, a set chosen to stay distinct under the common forms of colour vision deficiency. Its source is Color Universal Design by Masataka Okabe and Kei Ito. The seventh, TrailSlow, is a lighter tint of the trail yellow.

The override is a layer, not a fourth theme. It composes with whichever preset is active, and the preset keeps its own Background and Warning. A separate colourblind theme would have forced the player to give up their chosen look, and every new theme would have needed a colourblind twin. As a layer it costs one if and works with themes that do not exist yet.

UI scale ​

UI SCALE moves between 0.8 and 1.5 in steps of 0.1, and DrawGameplaySurface passes the value into HudRenderer.Draw. The HUD turns it into a whole number of screen pixels per font pixel:

csharp
int scale = Math.Max(1, (int)MathF.Round(2f * Math.Clamp(uiScale, 0.8f, 1.5f)));

The bitmap font from chapter 08 can only be drawn at whole multiples, so the result is rounded. Every value up to 1.2 draws each font pixel as a 2 x 2 block, and every value from 1.3 draws it as a 3 x 3 block. The menu offers eight values and the HUD has two sizes, which is an honest limit of a pixel font. The setting changes the HUD only, and the menus keep their size.

Reduced flash ​

While the fuse is in its warning phase the trail flashes in the Warning colour. REDUCED FLASH switches that off with one extra condition in DrawGameplaySurface:

csharp
else if (_fuseSystem.IsWarning && _gameSession.Player.CurrentTrail is not null && !_profileTracker.Settings.ReducedFlash)
{
    _trailRenderer.Draw(_spriteBatch, _pixel, _gameSession.Player.CurrentTrail, _gameSession.ThemePalette.Warning, 4f);
}

The flash is one of three ways the game tells you the fuse is coming. The warning audio cue still plays, and the HUD still shows its WARN label, because neither of them checks the setting.

IMPORTANT

Remove the harmful channel, keep the signal. An accessibility option that hides information makes the game harder for the players it was meant to help.

Settings that survive an update ​

Every option in this chapter is saved in profile.json, and chapter 12 showed that the file stores enums as integers. "Theme": 1 means CrtGreen only for as long as CrtGreen is the second value of ThemePreset. That makes the order of an enum part of your save format, and it gives two rules for changing the settings after players have profiles on disk.

  • Add enum values at the end. A fourth ThemePreset after SunsetSynth leaves every saved number meaning what it meant before.
  • Add properties freely. A new GameSettings property is safe, because System.Text.Json leaves a property it cannot find in the file at its default value.

WARNING

Inserting a value in the middle of ThemePreset, or reordering it, silently changes the theme of every player whose saved number comes after it. Nothing fails and nothing is logged. The game simply opens in the wrong colours.

The chapter 12 policy of falling back to a default profile catches a file that cannot be read at all. It does not catch a file that reads perfectly and now means something different, which is why the rules above matter.

Shipping: a build that can leave your machine ​

Until now you have started the game with dotnet run, which needs the .NET SDK and your source folder. dotnet publish produces a folder that holds everything the game needs to run, and that folder is what you send. Three terms explain the command you run in Step 6.

  • Platform project. You publish one of the projects under Platforms/, not the whole solution. Platforms/DesktopVK is the one that runs on Windows, Linux and macOS (chapter 01).
  • Runtime identifier. This is the operating system and processor pair the build is for, such as win-x64. A published build targets exactly one.
  • Self-contained. A self-contained build bundles the .NET runtime, so the player does not need to install .NET. The price is size: the win-x64 build of this game is 194 files and about 82 MB.

The name of the executable comes from Resources/Identity.props. Every platform project imports that file, and its AssemblyName is why the published game is called LastPerimeter. During the publish the MonoGame Content Builder also runs and reports 0 succeeded, 0 failed. That is expected, because the game draws everything from rectangles and a built-in font and has no content to build.

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. The listings show the parts worth studying, not every line. Steps 6 and 7 are different: they are commands you run.

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/15-Themes-Accessibility-And-Shipping/Source", "<course-repo>/DOCUMENTATION/LastPerimeter-Source/15-Themes-Accessibility-And-Shipping/Tests" .

In bash:

bash
cp -R "<course-repo>/DOCUMENTATION/LastPerimeter-Source/15-Themes-Accessibility-And-Shipping/Source" "<course-repo>/DOCUMENTATION/LastPerimeter-Source/15-Themes-Accessibility-And-Shipping/Tests" .

That copy brings in these files:

New files:

  • None.

Replaced files (you already have these, so overwrite them):

  • Source/Game/LastPerimeterApp.cs

There are no new source files. ThemePalette, ThemePreset and the settings have existed since chapters 08 and 12. The game class you just copied is the final one, identical to the finished game in last-perimeter/.

NOTE

Steps 2 to 4 describe code that is already in the file you just copied. Open the file each step names and read along. You type nothing in those steps.

Step 2 - The session palette: StartRun and SetupLevel ​

Open Source/Game/LastPerimeterApp.cs. Until this chapter, StartRun and SetupLevel both built the palette with ThemePalette.Create(ThemePreset.NeonVector, false), so the game always started in the default theme. Both now call ThemePalette.Create(_profileTracker.Settings.Theme, _profileTracker.Settings.ColorblindMode), which means a run starts in the theme the profile remembers.

Step 3 - The new options rows: THEME and COLORBLIND ​

Open Source/Game/LastPerimeterApp.cs. GetOptionsLabels now returns seven rows, with THEME and COLORBLIND inserted after DIFFICULTY:

csharp
private string[] GetOptionsLabels()
{
    return
    [
        $"DIFFICULTY {_profileTracker.Settings.Difficulty}",
        $"THEME {_profileTracker.Settings.Theme}",
        $"COLORBLIND {( _profileTracker.Settings.ColorblindMode ? "ON" : "OFF")}",
        $"AUDIO {( _profileTracker.Settings.AudioEnabled ? "ON" : "OFF")}",
        $"UI SCALE {_profileTracker.Settings.UiScale:0.0}",
        $"REDUCED FLASH {( _profileTracker.Settings.ReducedFlash ? "ON" : "OFF")}",
        "BACK",
    ];
}

ChangeOption gains the matching cases 1 and 2, and the cases after them are renumbered. ApplyCurrentSettings now rebuilds the session palette before it configures the audio. The UI SCALE and REDUCED FLASH rows are not new, because they arrived with the chapter 12 options menu.

Step 4 - The window title: UpdateWindowTitle ​

Open Source/Game/LastPerimeterApp.cs. The chapter label is gone from the window title, because this is the final game. The method also stops setting the title every frame:

csharp
private void UpdateWindowTitle()
{
    if (_gameSession is null)
    {
        Window.Title = "Last Perimeter";
        _shownTitleValues = null;
        return;
    }

    // Window.Title is a native window call and the text costs an allocation,
    // so only rebuild it when one of the shown values has changed.
    (int Score, int Lives, int Level, float Claim) values = (_gameSession.Score, _gameSession.Player.Lives, _gameSession.Level, _gameSession.ClaimedAreaPercentage);
    if (values == _shownTitleValues)
    {
        return;
    }

    _shownTitleValues = values;
    Window.Title = $"Last Perimeter | Score {_gameSession.Score} | Lives {_gameSession.Player.Lives} | Level {_gameSession.Level} | Claim {_gameSession.ClaimedAreaPercentage:0.0}%";
}

Setting Window.Title is a call into the operating system, and building the text allocates a string. Comparing four values first means the title is only rebuilt when one of them has changed.

Step 5 - Build, test, run ​

Run these commands from your LastPerimeter folder:

bash
dotnet build
dotnet test
dotnet run --project Platforms/DesktopVK

dotnet test reports 73 passing tests. On Windows you can also run dotnet run --project Platforms/WindowsDX12. The window title now reads Last Perimeter on the title screen. Leave the game running if you want to go straight to the Checkpoint section, or choose QUIT from the main menu to close it.

Step 6 - Publish a release build ​

This step and the next one are things you do. From your LastPerimeter folder, run the one command that matches the operating system you are on.

On Windows:

bash
dotnet publish Platforms/DesktopVK -c Release -r win-x64 --self-contained

On Linux:

bash
dotnet publish Platforms/DesktopVK -c Release -r linux-x64 --self-contained

On macOS with Apple silicon:

bash
dotnet publish Platforms/DesktopVK -c Release -r osx-arm64 --self-contained

The last line of the output names the folder the build went to. On Windows it ends Platforms\DesktopVK\bin\Release\net10.0\win-x64\publish\, and on the other systems the win-x64 part is linux-x64 or osx-arm64. A few lines above it the Content Builder reports 0 succeeded, 0 failed, which is correct for a game with no content.

Step 7 - Run the published game and package it ​

Start the game from the publish folder, not with dotnet run. From your LastPerimeter folder, in PowerShell on Windows:

powershell
.\Platforms\DesktopVK\bin\Release\net10.0\win-x64\publish\LastPerimeter.exe

In bash on Linux (on macOS, replace linux-x64 with osx-arm64):

bash
./Platforms/DesktopVK/bin/Release/net10.0/linux-x64/publish/LastPerimeter

The title screen appears and the window title reads Last Perimeter. The published game reads the same profile.json as before, so your settings and unlocked levels are already there. Choose QUIT to close it.

Now put the publish folder into one file you can send. In PowerShell on Windows:

powershell
Compress-Archive -Force -Path Platforms/DesktopVK/bin/Release/net10.0/win-x64/publish/* -DestinationPath LastPerimeter-win-x64.zip

In bash on Linux (on macOS, replace linux-x64 with osx-arm64 in both places):

bash
tar -czf LastPerimeter-linux-x64.tar.gz -C Platforms/DesktopVK/bin/Release/net10.0/linux-x64/publish .

The archive appears in your LastPerimeter folder. Whoever receives it unpacks it into an empty folder and runs LastPerimeter (LastPerimeter.exe on Windows). They need a graphics driver with Vulkan support, the same requirement as chapter 01, and they do not need .NET.

Chapter snapshot ​

The buildable project lives at DOCUMENTATION/LastPerimeter-Source/15-Themes-Accessibility-And-Shipping. Per scripts/chapter-manifest.json it takes Source/Game/LastPerimeterApp.cs from last-perimeter/, replacing the chapter 14 staged app, so this snapshot is the finished game. Compared with chapter 14 it adds the THEME and COLORBLIND options rows, the palette built from the profile, the live palette rebuild in ApplyCurrentSettings, and the quieter window title.

To build and test the snapshot itself, run these commands from the root of the course repository:

bash
cd DOCUMENTATION/LastPerimeter-Source/15-Themes-Accessibility-And-Shipping
dotnet build
dotnet test

No new test files arrive. The suite finishes the course at 73 tests, the same number dotnet test reports in the last-perimeter/ folder.

Checkpoint ​

The options menu is easiest to judge from the pause menu, where the arena stays visible behind it. The Controls table in chapter 03 lists every key.

  1. In your LastPerimeter folder, run dotnet test. It reports 73 passing tests. If it does not, compare your Source and Tests folders with the chapter 15 snapshot.
  2. Run dotnet run --project Platforms/DesktopVK. Press Enter on the title screen, then Enter again on START RUN. The arena appears in the default NeonVector theme. The steps below assume a profile with default options, so if you have already changed them, expect different starting values.
  3. Press Escape. The pause menu appears with RESUME highlighted. Press Down once to highlight OPTIONS and press Enter. The options menu shows seven rows, with DIFFICULTY highlighted and LEFT/RIGHT TO CHANGE under the title.
  4. Press Down once to highlight THEME. Press Right. The row reads THEME CRTGREEN and the arena behind the menu turns green. Press Right again for THEME SUNSETSYNTH, and a third time to wrap back to THEME NEONVECTOR. The arena recolours each time and stays readable.
  5. Press Down once to highlight COLORBLIND and press Right. The row reads COLORBLIND ON. The player, trail, claimed area and enemies change colour and remain easy to tell apart (ideally check with a colour blindness simulator).
  6. Press Down twice to highlight UI SCALE, passing AUDIO. Press Right five times, until the row reads UI SCALE 1.5. The HUD text behind the menu grows on the third press, when the value reaches 1.3.
  7. Press Down once to highlight REDUCED FLASH and press Right. The row reads REDUCED FLASH ON.
  8. Press Escape to return to the pause menu. Press Up once to highlight RESUME and press Enter.
  9. Press the arrow key that points into the arena to start drawing, then let go and wait. The fuse warning starts: you hear the warning cue and the HUD shows WARN, and the trail does not flash. Move again and finish the claim, or let the fuse run its course.
  10. Press Escape, highlight QUIT TO MENU and press Enter. On the main menu, highlight QUIT and press Enter.
  11. Run the game again. Press Enter on the title screen, highlight OPTIONS and press Enter. The rows still read COLORBLIND ON, UI SCALE 1.5 and REDUCED FLASH ON, with the theme you left selected. Set them the way you want to keep them, press Escape, and quit.
  12. Start the published game from Step 7. It opens with the same settings, because it reads the same profile.

What you should have now ​

You now have:

  • the finished game, identical to last-perimeter/,
  • three themes (NeonVector, CrtGreen, SunsetSynth) defined in one place as nine colour roles,
  • THEME and COLORBLIND rows in the options menu, which previews every change as you make it,
  • a colourblind override that works on top of any theme,
  • UI scale and reduced flash wired through the render path, with the fuse warning still carried by the audio cue and the HUD,
  • all of those settings saved in profile.json,
  • a self-contained release build in its publish folder, and an archive of it that you can send to someone,
  • the full suite of 73 tests.

Common mistakes ​

  • inserting a new ThemePreset value in the middle of the enum, or reordering it (every saved theme after that point silently changes),
  • a theme that recolours meaning, for example two roles given the same colour (the player can no longer tell claimed area from the background, or an enemy from a pickup),
  • removing a flash together with the signal it carried (the fuse then kills players who switched REDUCED FLASH on, with no warning),
  • putting a colour straight into a renderer and not into a palette role (it ignores both the theme and the colourblind override),
  • publishing without --self-contained and sending the result to someone who does not have .NET (the game will not start for them).

Questions to think about ​

  1. NeonVector gives Enemy and Warning the same orange-red. When are the two on screen together, and is that a problem?
  2. The colourblind override leaves Warning alone. In CrtGreen, Warning is a yellow (255, 220, 80), and the override's Trail is a yellow too (240, 228, 66). What does the fuse warning flash look like in that combination, and which channels still carry the warning?
  3. Why is colourblind mode a layer over a theme and not a fourth theme? Count the palettes you would have to maintain each way with five themes.
  4. UI SCALE offers eight values and the HUD has two sizes. Would you offer fewer values, or change how the font is drawn?
  5. If you had six more months, would you spend them on more content, better progression, better accessibility, better social features, or better tools for designers? Defend your choice.

Extensions ​

Try to add:

  1. a fourth ThemePreset, appended to the end of the enum, with one line of reasoning per role on why it stays readable,
  2. palette roles for the colours that are still fixed in the code (the white HUD text, the orange WARN label, and three of the pickup colours),
  3. UI scale for the menus, which MenuRenderer does not take today,
  4. a pattern or icon on slow-drawn claimed area, so that it does not depend on colour alone,
  5. a test for ThemePalette.Create that proves the override replaces seven roles and leaves Background and Warning alone,
  6. a Version property on PlayerProfile and a migration step in ProfileStorage.Load, so that a future change to the save format can be handled on purpose,
  7. a second published build from Platforms/WindowsDX12 (on Windows, dotnet publish Platforms/WindowsDX12 -c Release -r win-x64 --self-contained writes to Platforms/WindowsDX12/bin/Release/net10.0-windows/win-x64/publish/).

The larger ideas do not fit in a list item, so they have their own appendix. It covers multiplayer and social features, more platforms and stores, real art and sound, and the other future work this course points towards. Each entry names the code it builds on and a first step.

Summary ​

That is the whole course. Chapters 01-09 built the complete single-level game, from an empty window to a tested capture loop with enemies, a HUD and audio. Chapters 10-15 turned it into a full arcade game, with levels, enemy variants, powerups, menus, roguelite runs, a daily challenge, themes and accessibility options. You finished by publishing it, so it now exists as something another person can play.

A few big ideas carried the whole thing, and they are worth taking to your next project:

  • the three kinds of space, and knowing which representation owns each truth,
  • the wall path derived from the grid,
  • the capture solver, which rasterises the trail, finds the regions and picks the one to claim,
  • tests as proof, because difficult game logic cannot be trusted to visuals alone.

Where you go next is up to you. The Extensions list in each chapter has plenty left to build, and the appendix describes the bigger directions the game could take. The MonoGame documentation covers what this course left out. The course repository keeps every chapter's snapshot, so you can compare your work or start again from any chapter, and the course index lists them all.

If you build something on top of this, let me know.

Have fun, stay safe and code well!