0%
Sound, Pause, Game Over, and Saving — Chapter 40

Chapter 40 — Sound, Pause, Game Over, and Saving

Part 2C — The Complete Game · Chapter 40 of 62 · 7 h

Chapter 40 — Sound, Pause, Game Over, and Saving

Versions used in this chapter: flame 1.38.0, flame_audio 2.12.2, shared_preferences 2.5.5 (published March 25, 2026). API verification date: August 8, 2026, against https://docs.flame-engine.org/latest/, https://pub.dev/packages/flame, https://pub.dev/packages/flame_audio, https://pub.dev/packages/shared_preferences, and the flame-engine/flame repository (main branch). SDK constraints: sdk: ">=3.12.0 <4.0.0", flutter: ">=3.44.0".

Level: intermediate Estimated time: 7 h Prerequisites: chapters 35 to 39 (the complete "Donjon de Dart" project), chapter 34 (flame_audio, FlameAudio.bgm, centralized audio service). On the Dart side: chapter 13 (exceptions), chapter 14 (where, map, fold), chapter 15 (asynchronous code), chapter 17 (JSON). What you will be able to do by the end: give the game an audio service that works even without a single sound file, a pause menu, a Game Over screen, a victory screen with statistics, and persistent saving of the high score, progress, and settings — in other words, ship a finished game.

Comments

Comments are powered by GitHub Discussions

Sign in with GitHub to join the discussion

Link copied!