Appearance
Lesson 16 — Make repetition measurable
Where this lesson fits: runs have persistent choices. Add a daily entry point and local statistics, then be precise about which parts of a daily run are actually repeatable.
Time: 2 hours
Prerequisites and outcomes
Complete lesson 15. By the end, you can describe the daily seed's current use and trace how run events update local profile statistics.
Prepare and run
- From your learner project's solution folder, follow tutorial chapter 14 steps 1–6.
- Open
Source\Game\LastPerimeterApp.csand findStartRun,UpdateLevelComplete, andFinishRun; then openSource\Systems\ProfileTracker.cs. - Run
dotnet test --filter FullyQualifiedName~ProfileTrackerTests, then rundotnet run --project Platforms\DesktopVK. Follow the tutorial's daily checkpoint; exit and relaunch to check local persistence.
Code anchors
last-perimeter/Source/Data/GameSession.cs(RunMode,DailyChallengeSeed)last-perimeter/Source/Data/PlayerStatistics.cslast-perimeter/Source/Systems/ProfileTracker.cslast-perimeter/Source/Game/LastPerimeterApp.cs(StartRun, run summary)
Guided operations
- Start a Daily Challenge and follow how the UTC date becomes a seed.
- Find where that seed affects the upgrade draft. Compare it with the random sources used for enemies and powerups.
- Trace a run start, capture, powerup, level clear, and run end into profile statistics.
- Inspect the run summary and identify which values come from the current
GameSessionand which come from persistent profile state. - Write one sentence that accurately describes today's determinism. Do not claim that the entire run replays identically.
Checkpoint
You can explain how two players receive the same upgrade offers for the daily seed and why enemy and powerup behavior may still differ.
Common mistakes
- Treating one seeded subsystem as proof that all randomness is seeded.
- Storing a daily seed in a place that survives when it should be recalculated.
- Reporting telemetry externally; the current statistics are local.
Questions and extension
What inputs would need to share a seed for a truly reproducible daily run? Design a determinism test before threading that seed through more systems.

