Skip to content

Chapter 00 - Overview, Game Idea, and History ​

Where this chapter fits: nothing is built yet. This chapter gives you the vocabulary and the mental model that every later chapter reuses. It is paper-only by design.

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

The course in eight frames: from the first window to the roguelite upgrade draft

The game you will build, one chapter at a time: the first window (01), movement on the wall (04), the fuse burning a trail (05), a capture (06), an enemy (07), the HUD (08), the front-end (12), and the between-level upgrade draft (13). Every frame above is a real screenshot of a chapter build.

Prerequisites ​

None. This chapter is design and history only. From chapter 01 onward you will want basic C# (classes, properties, generics) and a willingness to read real code; nothing here requires either.

Learning objectives ​

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

  1. recite the one-sentence game loop from memory,
  2. name the three kinds of space in any frame of the game (safe, temporary danger, permanent claim) and point to each in a sketch,
  3. explain why territory capture is a harder problem than it first appears,
  4. explain why the player's path is both input and geometry,
  5. explain why the game needs separate models for safe walls, temporary trails, and captured territory.

Why a territory-capture game is good to learn from ​

A territory-capture game is small enough to finish in a course, but deep enough to expose serious architecture decisions. You have to solve:

  • continuous movement,
  • constrained wall traversal,
  • interior line drawing,
  • region capture,
  • enemy pressure,
  • feedback through HUD, score, and sound.

That combination makes it ideal for learning the difference between "something moves" and "a real game system works".

Historical context ​

The theme of this course comes from Qix, an arcade game released by Taito in 1981.[^qix] Most arcade hits of that time were about shooting. Qix stood out because it was about claiming territory under pressure. The player controlled a small marker that was safest on the outer boundary. Progress required leaving safety, drawing a line ("Stix") into the open field, and reconnecting to the boundary before something went wrong. Two threats made that risky. One was the Qix itself, an abstract bundle of lines that roamed the unclaimed field. The other was the fuse, a spark that chased along your unfinished line whenever you stopped moving. Drawing slowly earned double points, and claiming 75% of the field cleared the level.

That core loop still feels modern because it creates a constant tension between:

  • caution,
  • greed,
  • spatial planning,
  • and execution under pressure.

The game you build in this course is called Last Perimeter. It is an original game inspired by that loop, with its own code, visuals and sound. It then extends the loop with modern structure (levels, powerups, menus, upgrades, a daily challenge). The classic edge-patrolling enemies (the Sparx) are the one original threat the course leaves as an exercise.

The one-sentence game loop ​

Hold the loop in one line: Move safely on the boundary, then leave it to draw a risky trail, then reconnect, then solve which region is captured, then rebuild the future play space. Every later chapter builds one part of that sentence. As a cycle it looks like this:

Each arrow in that cycle becomes a chapter: movement on the path is chapter 04, the trail is chapter 05, the solver and the rebuild are chapter 06.

The three kinds of space ​

Every frame of the game contains exactly three kinds of space, and the whole architecture of this course follows from keeping them separate.

The three kinds of space in one frame: safe wall path, temporary trail, permanent claim

Kind of spaceWhat the player feelsWhat the code stores
Safe space"I cannot be hurt here"the playable wall path, derived from the tile grid
Temporary danger"I am exposed until I reconnect"the trail, while its state is InProgress
Permanent claim"That part of the arena is mine now"tiles marked ClaimedByPlayer

A first look at the code vocabulary ​

The whole course is built on a tiny shared vocabulary that already exists in Source/Data/Enums.cs. The three kinds of space above map directly onto two enums.

Every tile in the arena is in exactly one ownership state:

csharp
public enum TileState
{
    Unclaimed,
    ClaimedByPlayer,
    Boundary,
}

And every trail the player draws lives and dies through three states:

csharp
public enum TrailState
{
    InProgress,
    Completed,
    Cancelled,
}

Read those two enums against the three colours of the sketch exercise below:

  • safe space is the boundary the player walks on, derived from Unclaimed tiles meeting anything else,
  • temporary danger is a trail while it is InProgress,
  • permanent claim is what ClaimedByPlayer records after a trail is Completed.

If the mapping between game feel and data model is already this direct in chapter 00, you should expect the same discipline everywhere else in the course.

How the course is organised ​

Every implementation chapter follows the same shape, so you always know where you are:

  1. Prerequisites and Learning objectives: so you can check you are ready and know what "done" means,
  2. Code anchors: the real files in the repository that the chapter covers,
  3. Concept sections: the ideas, each with a diagram where a picture explains more than prose,
  4. Build it step by step: numbered steps, each naming its file, with the actual code,
  5. Chapter snapshot: a buildable project folder that matches the chapter's end state, with the exact number of tests that should pass,
  6. Checkpoint: what to run, with screenshots of what you should see,
  7. What you should have now: a short recap of what exists at the end of the chapter,
  8. Common mistakes, Questions to think about and Extensions: the traps, then questions and exercises for when you want more.

You build chapter 01 by hand. From chapter 02 the course is copy-along: you copy each chapter's files from its snapshot, and the steps walk through what changed and why. Chapters 01-09 build the complete single-level game. Chapters 10-15 turn it into a full arcade product. The course index has the chapter map and a suggested study schedule.

Sketch exercise ​

Sketch one game frame using three colours:

  1. safe space,
  2. temporary danger,
  3. permanent claim.

If you can keep those three ideas separate on paper, you are ready for the implementation chapters. Compare your sketch with the diagram above afterwards. Most people draw the wall path as a rectangle. Ask what happens to that rectangle after the first capture; chapter 04 answers the question.

Chapter snapshot ​

This chapter has no code snapshot. The buildable per-chapter projects live in the course repository under DOCUMENTATION/LastPerimeter-Source/, one folder per implementation chapter, and each one can be built and tested standalone with dotnet build and dotnet test. Chapter 00 is paper-only by design: its exercise is sketching, not coding. If you want to confirm your tooling works before chapter 01, open DOCUMENTATION/LastPerimeter-Source/01-New-Project-And-Basic-Rendering in the course repository and run dotnet build there.

Checkpoint ​

This chapter's checkpoint is verbal and visual, but still verifiable:

  • recite the one-sentence game loop without looking,
  • produce the three-colour sketch and label which TileState or TrailState value backs each colour,
  • explain in one sentence why a single hybrid model for walls, trails, and claims would be a mistake.

TIP

If all three come easily, move on to chapter 01 and build the first window.

[^qix]: Qix was designed by Randy and Sandy Pfeiffer and published in arcades by Taito America in October 1981. Taito followed it with Qix II: Tournament (1982), Super Qix (1987), Volfied (1989) and Qix++ (2009), and many other games have borrowed the idea since. Qix is a trademark of its owner. Last Perimeter is an independent game. It is not affiliated with or endorsed by that owner.