diff --git a/README.md b/README.md
index f8fd3bd..dc83207 100644
--- a/README.md
+++ b/README.md
@@ -6,11 +6,11 @@ Android is the tested target. iOS project scaffolding and test AdMob configurati
## Play
-- Six opening notebook leaves: a dedication, illustrated cottage entry, match puzzle, memory, folded note and inspectable lantern.
+- Sixteen cottage notebook leaves: the original dedication, cottage entry, folded note and repair note, plus separate entries, puzzles and illustrated memories for the match, lantern, key and compass, and a closing leaf toward the harbour.
- Horizontal swipes across the writing or blank paper, plus corner arrows, turn leaves. Grid and control gestures never turn pages; vertical drags still scroll. Navigation stays fixed; overflow scrolling supports smaller screens and larger text.
- Landscape pages rearrange themselves: a puzzle keeps its whole grid in one column, with the heading, area totals, hint and undo beside it, and the leaf navigation folds into a single row. The board stays fully visible without scrolling, even with larger text.
- A saved ribbon bookmark, opened note, inspected repair, viewed pages and current reading place.
-- Twelve 7×7 picture puzzles across three chapters, with overlapping-area deductions on entries 3–12. Later chapters retain their briefing/puzzle/reveal structure, now with swipes between those pages too. Reading ahead keeps unfinished boards and completion awards separate.
+- Twelve 7×7 picture puzzles across three chapters, with overlapping-area deductions on entries 3–12. Chapters II and III retain their briefing/puzzle/reveal structure, with swipes between those pages too. Chapter contents shows four entries at a time. Reading ahead keeps unfinished boards and completion awards separate.
- Deterministic daily grids and generated Easy, Medium and Hard 5×5 practice. The grades measure deduction-chain depth, not expert-level difficulty. Every board has a unique solution and needs no guessing.
- Undo, one free explained hint per puzzle, then optional rewarded hints. Later hints require the AdMob reward callback. An unavailable ad never blocks the board.
- Local daily streaks, independent difficulty levels and exactly-once puzzle completion awards.
@@ -22,9 +22,9 @@ Progress starts fresh in Flutter, as requested. Old Java `lumen.xml` saves are *
All app-created text uses the bundled Dancing Script handwriting font, including grid clues and menus. Lit cells are shaded with pencil strokes, and dark cells use a drawn cross; neither depends on a symbol-font fallback. Original watercolour harbour, cloth cover, cottage, lantern and single-page art remain bundled for offline use. Native text sits directly on the page’s blank writing area. Art prompts and provenance are in [assets/artwork](assets/artwork/README.md); the font’s OFL license ships in the app’s open-source licenses.
-Campaign discoveries now support optional watercolour keepsakes declared in the campaign data. All twelve discoveries have illustrations, and the opening match memory uses the same match watercolour. Pixel pictures remain the fallback for entries without usable artwork.
+Campaign discoveries now support optional watercolour keepsakes declared in the campaign data. All twelve discoveries have illustrations, and the opening match memory uses the same match watercolour. Each object’s artwork appears only on its discovery leaf after its own pattern is solved. Entry pages, the earlier repair note and the closing leaf never display discovery art, even with completed progress. Pixel pictures are also hidden until solved and remain the fallback for missing artwork.
-Five fixed, pre-rendered synthetic British-English readings play from bundled PCM16 WAV files, identical to the reviewed masters. Lossless FLAC exports are retained in the source project but excluded from the APK. WAV avoids a Huawei API 26 failure where FLAC playback advances its clock without creating an audio track. `just_audio` plays bundled files; there is no Android reader, runtime synthesis or audio download. Controls support play, pause, resume at the same position, stop, replay, speed and passage highlighting. Leaving a page or backgrounding the app stops playback. See [narration provenance](assets/narration/README.md).
+Twenty-eight fixed, pre-rendered synthetic recordings play from bundled PCM16 WAV files. Mara’s five original British-English diary readings are preserved; twenty-three guiding passages use a distinct narrator voice, covering the cottage entries/memories/closing leaf and the later campaign introductions and discoveries. All recordings are opt-in, labelled by speaker and support pause/resume, stop, replay, speed and passage highlighting. Page turns and backgrounding stop playback. WAV avoids the Huawei API 26 FLAC playback issue; archival FLACs stay out of the APK. There is no Android reader, runtime synthesis or audio download. See [narration provenance](assets/narration/README.md).
## Build and run
@@ -43,6 +43,10 @@ Use `JAVA_HOME=/path/to/jdk-21` if your default JDK is incompatible with Gradle.
# Separate QA package: com.lumen.daily.qa
flutter build apk --debug --flavor qa
+# QA permits SD-card installation on devices that support external apps.
+# Install explicitly with: adb install -r -s PATH_TO_QA_APK
+# The review Huawei rejects SD app installs; use adb install -r -f there.
+
# Optimized development APK for the connected arm64 tablet
flutter build apk --release --flavor prod --target-platform android-arm64
```
@@ -67,7 +71,7 @@ flutter drive --driver test_driver/integration_test.dart \
--dart-define=QA_TEST=true -d YOUR_ANDROID_DEVICE
```
-The fourteen unit/widget tests cover 40 Java reference boards (including signed 64-bit seeds), 300 graded generated boards, solver counts against 300 exhaustive small systems, all twelve campaign solutions, streaks, fresh progress, read-ahead, completion awards, campaign read-ahead restoration, gesture isolation, swipes over text and blank paper, cancelled drags, vertical scrolling, landscape and larger text; it also checks the landscape two-column puzzle leaf. Reference parity protects the port’s rules; it is not used to migrate saves.
+The twenty unit/widget tests cover 40 Java reference boards (including signed 64-bit seeds), 300 graded generated boards, solver counts against 300 exhaustive small systems, all twelve campaign solutions, streaks, fresh progress, read-ahead, completion awards, campaign read-ahead restoration, gesture isolation, swipes over text and blank paper, cancelled drags, vertical scrolling, landscape and larger text; it also checks every cottage leaf with the real font at 1.5× text, all four hint controls, legacy route migration and exactly-once completion after restart. Reference parity protects the port’s rules; it is not used to migrate saves.
The physical-device integration test uses a disposable in-memory game plus an isolated QA disk round-trip. It plays all five real WAV files, checks pause/resume, explores the six leaves, verifies bookmarks/discoveries, solves match and lantern puzzles and checks exactly-once awards. Screenshots are saved in `artifacts/flutter-check/`. The release smoke script requires an active, unmuted 24 kHz media track in the tablet’s audio mixer as well as exercising the actual play/pause/resume UI and restores the last page after process restart, without injecting puzzle fixtures. The release build includes a targeted R8 keep rule for the database constructor used reflectively by AdMob’s WorkManager dependency. Advertising is disabled for the automated story tests; real UMP startup is checked separately in the normal build. Reward delivery, cancellation and ad no-fill still need manual release testing with your final AdMob configuration.
@@ -95,3 +99,10 @@ Create your production Android AdMob app and ad units, configure Privacy & messa
For Android, supply the app ID using Gradle property `ADMOB_APP_ID`. Rewarded/interstitial unit IDs use Dart compile-time defines `ADMOB_REWARDED_ID` and `ADMOB_INTERSTITIAL_ID`. iOS needs its own app ID in `ios/Runner/Info.plist` and iOS-specific ad unit IDs. Verify consent refusal/revocation, reward completion/cancellation, offline/no-fill behavior, lifecycle interruptions, accessibility and release signing on physical devices before submitting an AAB.
See [ROADMAP.md](ROADMAP.md) for the proposed 30–40-leaf campaign, page variety and further exploration ideas. Smaller follow-ups and asset tasks are tracked in [TODO.md](TODO.md).
+
+
+Chapter I page records live in `assets/notebook.json`. The original six IDs and `story_v1_0`–`story_v1_3` puzzle keys are preserved. Existing cottage briefing, puzzle and reveal saves reopen on their corresponding leaves. Reading ahead never awards a puzzle completion; leaving the cottage opens Chapter II even when patterns remain unfinished. All seven added prose leaves have narrator recordings; the original five diary recordings remain unchanged.
+
+To review the complete chapter on an isolated QA install, run `flutter drive --driver test_driver/integration_test.dart --target integration_test/cottage_test.dart --flavor qa --dart-define=QA_TEST=true -d YOUR_ANDROID_DEVICE`. This traverses all sixteen leaves, checks bookmarks/restart, rotates the compass puzzle at larger text, solves all four patterns and checks QA disk persistence. It saves eight screenshots in `artifacts/flutter-check/`.
+
+Device automation can use the `check` flavor (`com.lumen.daily.check`) to preserve the installed QA app and its progress. It has its own preferences and test data. Use `--flavor check` with the integration commands above for an isolated run alongside QA.
diff --git a/ROADMAP.md b/ROADMAP.md
index 53a045d..27b3ae3 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -1,6 +1,6 @@
# Lumen — a notebook worth exploring
-Status: opening slice ported to Dart and Flutter in version 2.0. The six-leaf opening slice below is implemented and ready for review: reading-area swipes, arrows, five bundled recorded readings, two on-page illustrations and refreshed home art, a saved ribbon bookmark, a folded note, a lantern inspection, and the existing match puzzle/reveal. Full chapter pagination, the larger 30–40-leaf story and later exploration features remain proposed. The Flutter port retains these features and starts fresh progress, as requested. Android is the tested target; iOS scaffolding is present but not yet validated. There are no delivery dates yet; review the opening slice before expanding it.
+Status: Chapter I is implemented as sixteen notebook leaves, with separate entries, puzzles and illustrated memories for all four cottage discoveries, chapter contents, stable page IDs, read-ahead and saved bookmarks. The original six leaves and five Mara readings are preserved; twenty-three additional guiding passages now have a distinct bundled narrator voice. All twelve campaign discoveries have watercolour artwork, shown only on the discovery leaf after the corresponding puzzle is solved; introductory and repair-note leaves stay free of object artwork even on revisits. Chapters II and III retain their earlier briefing/puzzle/reveal screens; their full pagination, the larger 30–40-leaf notebook and later exploration remain proposed. Android is the tested target; iOS scaffolding is not yet validated. Review the complete cottage chapter before expanding the remaining chapters. No delivery dates are set.
## The experience we are building
@@ -17,8 +17,8 @@ Success is the player wanting to turn another page, remember a detail, or return
- Three chapters with twelve authored picture puzzles and short passages before and after them.
- A single-page diary background, handwriting, recovered pixel pictures, and saved local progress.
- Explained puzzle hints, generated classic practice, and a daily challenge.
-- Six opening leaves with reading-area swipes and corner arrows, optional bundled recordings, cottage and lantern illustrations, a folded note, inspection, and independent reading bookmarks.
-- Existing campaign pages beyond this prototype now support swipes between briefing, puzzle and memory screens, with optional read-ahead that preserves puzzle progress. Their full illustrated pagination remains proposed. Overflow scrolling remains for large text and shorter viewports.
+- Sixteen cottage leaves with reading-area swipes, corner arrows, chapter contents, illustrated discoveries, a folded note, inspection and independent reading bookmarks. The five original diary readings and twenty-three guiding narrator recordings are available.
+- Campaign pages in Chapters II and III now support swipes between briefing, puzzle and memory screens, with optional read-ahead that preserves puzzle progress. Their full illustrated pagination remains proposed. Overflow scrolling remains for large text and shorter viewports.
## Phase 1 — make it a book
diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts
index 8771d4b..4a593f4 100644
--- a/android/app/build.gradle.kts
+++ b/android/app/build.gradle.kts
@@ -34,6 +34,7 @@ android {
productFlavors {
create("prod") { dimension = "edition" }
create("qa") { dimension = "edition"; applicationIdSuffix = ".qa"; versionNameSuffix = "-qa" }
+ create("check") { dimension = "edition"; applicationIdSuffix = ".check"; versionNameSuffix = "-check" }
}
buildTypes {
release {
diff --git a/android/app/src/qa/AndroidManifest.xml b/android/app/src/qa/AndroidManifest.xml
new file mode 100644
index 0000000..ca2515c
--- /dev/null
+++ b/android/app/src/qa/AndroidManifest.xml
@@ -0,0 +1,2 @@
+
diff --git a/assets/audio/narration_campaign_10_after.flac b/assets/audio/narration_campaign_10_after.flac
new file mode 100644
index 0000000..c71fe8d
Binary files /dev/null and b/assets/audio/narration_campaign_10_after.flac differ
diff --git a/assets/audio/narration_campaign_10_after.wav b/assets/audio/narration_campaign_10_after.wav
new file mode 100644
index 0000000..27e34ff
Binary files /dev/null and b/assets/audio/narration_campaign_10_after.wav differ
diff --git a/assets/audio/narration_campaign_10_before.flac b/assets/audio/narration_campaign_10_before.flac
new file mode 100644
index 0000000..e588201
Binary files /dev/null and b/assets/audio/narration_campaign_10_before.flac differ
diff --git a/assets/audio/narration_campaign_10_before.wav b/assets/audio/narration_campaign_10_before.wav
new file mode 100644
index 0000000..12e3db0
Binary files /dev/null and b/assets/audio/narration_campaign_10_before.wav differ
diff --git a/assets/audio/narration_campaign_11_after.flac b/assets/audio/narration_campaign_11_after.flac
new file mode 100644
index 0000000..f7fa651
Binary files /dev/null and b/assets/audio/narration_campaign_11_after.flac differ
diff --git a/assets/audio/narration_campaign_11_after.wav b/assets/audio/narration_campaign_11_after.wav
new file mode 100644
index 0000000..62584a8
Binary files /dev/null and b/assets/audio/narration_campaign_11_after.wav differ
diff --git a/assets/audio/narration_campaign_11_before.flac b/assets/audio/narration_campaign_11_before.flac
new file mode 100644
index 0000000..6c62ace
Binary files /dev/null and b/assets/audio/narration_campaign_11_before.flac differ
diff --git a/assets/audio/narration_campaign_11_before.wav b/assets/audio/narration_campaign_11_before.wav
new file mode 100644
index 0000000..faad154
Binary files /dev/null and b/assets/audio/narration_campaign_11_before.wav differ
diff --git a/assets/audio/narration_campaign_4_after.flac b/assets/audio/narration_campaign_4_after.flac
new file mode 100644
index 0000000..e351f43
Binary files /dev/null and b/assets/audio/narration_campaign_4_after.flac differ
diff --git a/assets/audio/narration_campaign_4_after.wav b/assets/audio/narration_campaign_4_after.wav
new file mode 100644
index 0000000..323268d
Binary files /dev/null and b/assets/audio/narration_campaign_4_after.wav differ
diff --git a/assets/audio/narration_campaign_4_before.flac b/assets/audio/narration_campaign_4_before.flac
new file mode 100644
index 0000000..d7eb275
Binary files /dev/null and b/assets/audio/narration_campaign_4_before.flac differ
diff --git a/assets/audio/narration_campaign_4_before.wav b/assets/audio/narration_campaign_4_before.wav
new file mode 100644
index 0000000..490f95c
Binary files /dev/null and b/assets/audio/narration_campaign_4_before.wav differ
diff --git a/assets/audio/narration_campaign_5_after.flac b/assets/audio/narration_campaign_5_after.flac
new file mode 100644
index 0000000..a582fa7
Binary files /dev/null and b/assets/audio/narration_campaign_5_after.flac differ
diff --git a/assets/audio/narration_campaign_5_after.wav b/assets/audio/narration_campaign_5_after.wav
new file mode 100644
index 0000000..fb760da
Binary files /dev/null and b/assets/audio/narration_campaign_5_after.wav differ
diff --git a/assets/audio/narration_campaign_5_before.flac b/assets/audio/narration_campaign_5_before.flac
new file mode 100644
index 0000000..086a88d
Binary files /dev/null and b/assets/audio/narration_campaign_5_before.flac differ
diff --git a/assets/audio/narration_campaign_5_before.wav b/assets/audio/narration_campaign_5_before.wav
new file mode 100644
index 0000000..2515425
Binary files /dev/null and b/assets/audio/narration_campaign_5_before.wav differ
diff --git a/assets/audio/narration_campaign_6_after.flac b/assets/audio/narration_campaign_6_after.flac
new file mode 100644
index 0000000..5857a89
Binary files /dev/null and b/assets/audio/narration_campaign_6_after.flac differ
diff --git a/assets/audio/narration_campaign_6_after.wav b/assets/audio/narration_campaign_6_after.wav
new file mode 100644
index 0000000..22a965d
Binary files /dev/null and b/assets/audio/narration_campaign_6_after.wav differ
diff --git a/assets/audio/narration_campaign_6_before.flac b/assets/audio/narration_campaign_6_before.flac
new file mode 100644
index 0000000..2b83fad
Binary files /dev/null and b/assets/audio/narration_campaign_6_before.flac differ
diff --git a/assets/audio/narration_campaign_6_before.wav b/assets/audio/narration_campaign_6_before.wav
new file mode 100644
index 0000000..b877aff
Binary files /dev/null and b/assets/audio/narration_campaign_6_before.wav differ
diff --git a/assets/audio/narration_campaign_7_after.flac b/assets/audio/narration_campaign_7_after.flac
new file mode 100644
index 0000000..9c9309e
Binary files /dev/null and b/assets/audio/narration_campaign_7_after.flac differ
diff --git a/assets/audio/narration_campaign_7_after.wav b/assets/audio/narration_campaign_7_after.wav
new file mode 100644
index 0000000..d27654c
Binary files /dev/null and b/assets/audio/narration_campaign_7_after.wav differ
diff --git a/assets/audio/narration_campaign_7_before.flac b/assets/audio/narration_campaign_7_before.flac
new file mode 100644
index 0000000..1ca8e94
Binary files /dev/null and b/assets/audio/narration_campaign_7_before.flac differ
diff --git a/assets/audio/narration_campaign_7_before.wav b/assets/audio/narration_campaign_7_before.wav
new file mode 100644
index 0000000..fee8a07
Binary files /dev/null and b/assets/audio/narration_campaign_7_before.wav differ
diff --git a/assets/audio/narration_campaign_8_after.flac b/assets/audio/narration_campaign_8_after.flac
new file mode 100644
index 0000000..1e1933a
Binary files /dev/null and b/assets/audio/narration_campaign_8_after.flac differ
diff --git a/assets/audio/narration_campaign_8_after.wav b/assets/audio/narration_campaign_8_after.wav
new file mode 100644
index 0000000..b150f4c
Binary files /dev/null and b/assets/audio/narration_campaign_8_after.wav differ
diff --git a/assets/audio/narration_campaign_8_before.flac b/assets/audio/narration_campaign_8_before.flac
new file mode 100644
index 0000000..5b6546c
Binary files /dev/null and b/assets/audio/narration_campaign_8_before.flac differ
diff --git a/assets/audio/narration_campaign_8_before.wav b/assets/audio/narration_campaign_8_before.wav
new file mode 100644
index 0000000..976ed9a
Binary files /dev/null and b/assets/audio/narration_campaign_8_before.wav differ
diff --git a/assets/audio/narration_campaign_9_after.flac b/assets/audio/narration_campaign_9_after.flac
new file mode 100644
index 0000000..cc40ca5
Binary files /dev/null and b/assets/audio/narration_campaign_9_after.flac differ
diff --git a/assets/audio/narration_campaign_9_after.wav b/assets/audio/narration_campaign_9_after.wav
new file mode 100644
index 0000000..b120d43
Binary files /dev/null and b/assets/audio/narration_campaign_9_after.wav differ
diff --git a/assets/audio/narration_campaign_9_before.flac b/assets/audio/narration_campaign_9_before.flac
new file mode 100644
index 0000000..dfc5a36
Binary files /dev/null and b/assets/audio/narration_campaign_9_before.flac differ
diff --git a/assets/audio/narration_campaign_9_before.wav b/assets/audio/narration_campaign_9_before.wav
new file mode 100644
index 0000000..cf6e76b
Binary files /dev/null and b/assets/audio/narration_campaign_9_before.wav differ
diff --git a/assets/audio/narration_cottage_compass_entry.flac b/assets/audio/narration_cottage_compass_entry.flac
new file mode 100644
index 0000000..04e05a4
Binary files /dev/null and b/assets/audio/narration_cottage_compass_entry.flac differ
diff --git a/assets/audio/narration_cottage_compass_entry.wav b/assets/audio/narration_cottage_compass_entry.wav
new file mode 100644
index 0000000..ed037c2
Binary files /dev/null and b/assets/audio/narration_cottage_compass_entry.wav differ
diff --git a/assets/audio/narration_cottage_compass_memory.flac b/assets/audio/narration_cottage_compass_memory.flac
new file mode 100644
index 0000000..5d9e234
Binary files /dev/null and b/assets/audio/narration_cottage_compass_memory.flac differ
diff --git a/assets/audio/narration_cottage_compass_memory.wav b/assets/audio/narration_cottage_compass_memory.wav
new file mode 100644
index 0000000..36de2fe
Binary files /dev/null and b/assets/audio/narration_cottage_compass_memory.wav differ
diff --git a/assets/audio/narration_cottage_key_entry.flac b/assets/audio/narration_cottage_key_entry.flac
new file mode 100644
index 0000000..c920501
Binary files /dev/null and b/assets/audio/narration_cottage_key_entry.flac differ
diff --git a/assets/audio/narration_cottage_key_entry.wav b/assets/audio/narration_cottage_key_entry.wav
new file mode 100644
index 0000000..fa0a84e
Binary files /dev/null and b/assets/audio/narration_cottage_key_entry.wav differ
diff --git a/assets/audio/narration_cottage_key_memory.flac b/assets/audio/narration_cottage_key_memory.flac
new file mode 100644
index 0000000..4a72863
Binary files /dev/null and b/assets/audio/narration_cottage_key_memory.flac differ
diff --git a/assets/audio/narration_cottage_key_memory.wav b/assets/audio/narration_cottage_key_memory.wav
new file mode 100644
index 0000000..3107d8c
Binary files /dev/null and b/assets/audio/narration_cottage_key_memory.wav differ
diff --git a/assets/audio/narration_cottage_lantern_entry.flac b/assets/audio/narration_cottage_lantern_entry.flac
new file mode 100644
index 0000000..c9bda38
Binary files /dev/null and b/assets/audio/narration_cottage_lantern_entry.flac differ
diff --git a/assets/audio/narration_cottage_lantern_entry.wav b/assets/audio/narration_cottage_lantern_entry.wav
new file mode 100644
index 0000000..8c5708f
Binary files /dev/null and b/assets/audio/narration_cottage_lantern_entry.wav differ
diff --git a/assets/audio/narration_cottage_lantern_memory.flac b/assets/audio/narration_cottage_lantern_memory.flac
new file mode 100644
index 0000000..7f18312
Binary files /dev/null and b/assets/audio/narration_cottage_lantern_memory.flac differ
diff --git a/assets/audio/narration_cottage_lantern_memory.wav b/assets/audio/narration_cottage_lantern_memory.wav
new file mode 100644
index 0000000..9d91399
Binary files /dev/null and b/assets/audio/narration_cottage_lantern_memory.wav differ
diff --git a/assets/audio/narration_cottage_threshold.flac b/assets/audio/narration_cottage_threshold.flac
new file mode 100644
index 0000000..42fabf7
Binary files /dev/null and b/assets/audio/narration_cottage_threshold.flac differ
diff --git a/assets/audio/narration_cottage_threshold.wav b/assets/audio/narration_cottage_threshold.wav
new file mode 100644
index 0000000..fd52ee8
Binary files /dev/null and b/assets/audio/narration_cottage_threshold.wav differ
diff --git a/assets/audio/narration_manifest.json b/assets/audio/narration_manifest.json
index 7ce96a0..1f8589c 100644
--- a/assets/audio/narration_manifest.json
+++ b/assets/audio/narration_manifest.json
@@ -149,6 +149,568 @@
],
"flacFile": "narration_cottage_lantern_sketch.flac",
"wavSha256": "53dd694b9933f94bcda72582d0c6b1bb5b656898a73c87d66ecfa0874ba3a29d"
+ },
+ "cottage.lantern.entry": {
+ "pageId": "cottage.lantern.entry",
+ "resource": "narration_cottage_lantern_entry",
+ "text": "A small flame will not survive the wind. Mara’s next page shows what she carried on her evening rounds.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_cottage_lantern_entry.wav",
+ "flacFile": "narration_cottage_lantern_entry.flac",
+ "wavSha256": "9ad019bd823e3d31dbfde3f1a29c6d643e11640cafd009ca77d3b3ff5096995a",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 201504,
+ "durationMs": 8396,
+ "textSha256": "ca19c2ac4a7aa40f3d4c9c5c85957618972432a71a3e12dce1ccdd59ada65b0c",
+ "flacSha256": "0b76706fbb868ddcb26a36e6a90f4badc2fd4c7e751ca6639c75a46c4fcb1323",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 7796,
+ "text": "A small flame will not survive the wind. Mara’s next page shows what she carried on her evening rounds."
+ }
+ ]
+ },
+ "cottage.lantern.memory": {
+ "pageId": "cottage.lantern.memory",
+ "resource": "narration_cottage_lantern_memory",
+ "text": "The lantern is soot-black but sound. Its warm circle of light reaches the cottage door. Beneath the handle, Mara has scratched your initials.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_cottage_lantern_memory.wav",
+ "flacFile": "narration_cottage_lantern_memory.flac",
+ "wavSha256": "80485840ab6d00a1c6883ec2eaab36a19cffe2fbb69d026b3a417613787b4aa0",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 254752,
+ "durationMs": 10615,
+ "textSha256": "3c6af7f276cb7f24b9d20d0c120c85d1fad02a62328a2fd230826b9f6b2f3ba5",
+ "flacSha256": "ad285b1ac2717f93b284e727748fa8bbe0a72dd1cea4607eca5d723330e5b305",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 10015,
+ "text": "The lantern is soot-black but sound. Its warm circle of light reaches the cottage door. Beneath the handle, Mara has scratched your initials."
+ }
+ ]
+ },
+ "cottage.key.entry": {
+ "pageId": "cottage.key.entry",
+ "resource": "narration_cottage_key_entry",
+ "text": "‘Some clues belong to more than one place,’ Mara wrote. Compare the overlapping areas on this page; a shared cell counts in both. A loose floorboard waits by the door.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_cottage_key_entry.wav",
+ "flacFile": "narration_cottage_key_entry.flac",
+ "wavSha256": "8124e1c156b41b69b52305c4c1e2fcae5005f6d2829eddbbecc952eebb73cfdb",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 299808,
+ "durationMs": 12492,
+ "textSha256": "e9659d973e1c29a9b21479959a3859978ffb1feace593d6f15fd0536a9810269",
+ "flacSha256": "c54b40e8cdc5cd229a2ed3590a5ca59b103458082dae5a431a46a51c4bce2d94",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 11892,
+ "text": "‘Some clues belong to more than one place,’ Mara wrote. Compare the overlapping areas on this page; a shared cell counts in both. A loose floorboard waits by the door."
+ }
+ ]
+ },
+ "cottage.key.memory": {
+ "pageId": "cottage.key.memory",
+ "resource": "narration_cottage_key_memory",
+ "text": "A brass key turns up beneath the board. The tag reads ‘harbour store’. Someone prepared for a journey and never quite made it out of the cottage.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_cottage_key_memory.wav",
+ "flacFile": "narration_cottage_key_memory.flac",
+ "wavSha256": "1f65e40bffcd282c2a87e087c952fa62f66e6207885e11eef3ca1fb0810c2991",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 249632,
+ "durationMs": 10401,
+ "textSha256": "f1587b172b4801b53b45f45d26e761e77dda0c7417308000307efed88b20e576",
+ "flacSha256": "53449485cb0f384ecfa5c88c427bec74a2fbbb8d71a9e92ad93bddc41a8b6844",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 9801,
+ "text": "A brass key turns up beneath the board. The tag reads ‘harbour store’. Someone prepared for a journey and never quite made it out of the cottage."
+ }
+ ]
+ },
+ "cottage.compass.entry": {
+ "pageId": "cottage.compass.entry",
+ "resource": "narration_cottage_compass_entry",
+ "text": "The lane has vanished beneath fallen branches. One last page in the cottage points you towards the harbour. Use what the areas share to work out what lies outside them.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_cottage_compass_entry.wav",
+ "flacFile": "narration_cottage_compass_entry.flac",
+ "wavSha256": "2671c9657c54803c9b5e571cf5bea42cd5a2bffb0ca848444e99bdbaf5effa55",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 306976,
+ "durationMs": 12791,
+ "textSha256": "2fef65403ef1a1cb2ce4f480783ec409beeccb5f4eb595dd22ab9dd6fb0b6c25",
+ "flacSha256": "51f6641757834d05578dc11dd627c0deafb210e7979ffc01df0e2effcab9c79d",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 12191,
+ "text": "The lane has vanished beneath fallen branches. One last page in the cottage points you towards the harbour. Use what the areas share to work out what lies outside them."
+ }
+ ]
+ },
+ "cottage.compass.memory": {
+ "pageId": "cottage.compass.memory",
+ "resource": "narration_cottage_compass_memory",
+ "text": "The compass needle settles towards the sea. Tucked inside its lid is a note: ‘When the path disappears, keep your bearings.’ You step into the rain.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_cottage_compass_memory.wav",
+ "flacFile": "narration_cottage_compass_memory.flac",
+ "wavSha256": "f48f72546552401da03f5288177f690a4dff35c4811bde7589034534759ca30b",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 273696,
+ "durationMs": 11404,
+ "textSha256": "66b381628bd2c774e0372f4afb69783aad92363c142e41305b4b2980d4ad6ba7",
+ "flacSha256": "798488e7b13b1d858b90c8507cbfedbad558ed33a172128438978b3594a1cb42",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 10804,
+ "text": "The compass needle settles towards the sea. Tucked inside its lid is a note: ‘When the path disappears, keep your bearings.’ You step into the rain."
+ }
+ ]
+ },
+ "cottage.threshold": {
+ "pageId": "cottage.threshold",
+ "resource": "narration_cottage_threshold",
+ "text": "The lantern waits by the door. You fold Gran’s note along its old crease and tuck it beside the harbour key.\n\nOutside, the lane smells of rain. You remember her advice about the latch: lift it a little, then turn.\n\nBeyond the cottage, the path leads down to the water. There is still a light to bring home.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_cottage_threshold.wav",
+ "flacFile": "narration_cottage_threshold.flac",
+ "wavSha256": "11c280d613222ccc2eecd68aac6f594950d3007f6d9269d208d4fef9aad29660",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 549280,
+ "durationMs": 22887,
+ "textSha256": "6eaa8e719d1a747a6201279182a2ce4c8c56fcd8f60132525ed23a242c617e82",
+ "flacSha256": "eadafc890ee55f2855d80ff5f2b4fa7011d68bb4dbf521820902aeebfe7870c1",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 7561,
+ "text": "The lantern waits by the door. You fold Gran’s note along its old crease and tuck it beside the harbour key."
+ },
+ {
+ "startMs": 8161,
+ "endMs": 15841,
+ "text": "Outside, the lane smells of rain. You remember her advice about the latch: lift it a little, then turn."
+ },
+ {
+ "startMs": 16441,
+ "endMs": 22287,
+ "text": "Beyond the cottage, the path leads down to the water. There is still a light to bring home."
+ }
+ ]
+ },
+ "campaign.4.before": {
+ "pageId": "campaign.4.before",
+ "resource": "narration_campaign_4_before",
+ "text": "The tide has covered the causeway. A shape knocks gently against the harbour steps. Mara’s notebook has a page for this crossing too.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_4_before.wav",
+ "flacFile": "narration_campaign_4_before.flac",
+ "wavSha256": "da3226933f6c6ee0c0fe15369b321dc032a5f436baef58b8a449f29561e59a75",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 237856,
+ "durationMs": 9911,
+ "textSha256": "239a9687e7edc99f13cd9f0dc0784aa9023f0e542feefb7fe76122c983b851af",
+ "flacSha256": "0fb36a1f2e3dc856bf98c8699dcf2d4d1e67679237e3f093de21b1fd1fa042e0",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 9311,
+ "text": "The tide has covered the causeway. A shape knocks gently against the harbour steps. Mara’s notebook has a page for this crossing too."
+ }
+ ]
+ },
+ "campaign.4.after": {
+ "pageId": "campaign.4.after",
+ "resource": "narration_campaign_4_after",
+ "text": "The little boat is still tied fast. You bail out the rainwater, set the lantern in the bow, and push away from the steps.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_4_after.wav",
+ "flacFile": "narration_campaign_4_after.flac",
+ "wavSha256": "4c9a053729fbee2e7324642e22e82f021ff59f04a035dec4d0f7bf4c3e2f4ec3",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 221984,
+ "durationMs": 9249,
+ "textSha256": "8b041c5d167c54c2189be16043ed299551046d83067df75652847ccd05ea8675",
+ "flacSha256": "05c07db2e53969f82d6e9387db92ec53d401ed9378971a41708074e431cc0f6a",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 8649,
+ "text": "The little boat is still tied fast. You bail out the rainwater, set the lantern in the bow, and push away from the steps."
+ }
+ ]
+ },
+ "campaign.5.before": {
+ "pageId": "campaign.5.before",
+ "resource": "narration_campaign_5_before",
+ "text": "The current tugs you towards the outer rocks. Something heavy is tangled beneath the seat. The pattern tells you what to reach for.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_5_before.wav",
+ "flacFile": "narration_campaign_5_before.flac",
+ "wavSha256": "cd99d067df878bf9792b24c15a37ae350855f1b5650f177fcfd0e88dfa279f1a",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 219936,
+ "durationMs": 9164,
+ "textSha256": "32eb4035740297dd56922779e5cfa830dff9a94d3044fd7b668e97b7c1178fef",
+ "flacSha256": "c6955d7f797e35bd2beeb938458c6cf9963780cbaa1c88852b0a51bdbb8723ba",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 8564,
+ "text": "The current tugs you towards the outer rocks. Something heavy is tangled beneath the seat. The pattern tells you what to reach for."
+ }
+ ]
+ },
+ "campaign.5.after": {
+ "pageId": "campaign.5.after",
+ "resource": "narration_campaign_5_after",
+ "text": "The anchor catches. The boat swings into calmer water. In the pause, you hear a bell somewhere beyond the fog.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_5_after.wav",
+ "flacFile": "narration_campaign_5_after.flac",
+ "wavSha256": "e3997b534cf3b953a6a04fd32a02ac0f5ff907f444ec2602e263b240a92c2fef",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 200480,
+ "durationMs": 8353,
+ "textSha256": "63e03e04b4d267e38d042787aa813b246b248e366e9ad32a3a289539161eea02",
+ "flacSha256": "f2c000ab339c66019fc9c66fa60d9907ee6081099e733e9aa50a82368d4e5408",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 7753,
+ "text": "The anchor catches. The boat swings into calmer water. In the pause, you hear a bell somewhere beyond the fog."
+ }
+ ]
+ },
+ "campaign.6.before": {
+ "pageId": "campaign.6.before",
+ "resource": "narration_campaign_6_before",
+ "text": "You land beneath the lighthouse hill. The old crossing is hidden by reeds. Mara marked its outline long before the storm.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_6_before.wav",
+ "flacFile": "narration_campaign_6_before.flac",
+ "wavSha256": "aa608ff2544d0ca9417f1676bb45e4f0398632a9587242e6b77a1ad47b1c7373",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 217888,
+ "durationMs": 9079,
+ "textSha256": "cafa0efdd8fd07e9fc4b2f35f0f3ba1b1324193cea4d6b524e60382b4663b2e6",
+ "flacSha256": "f3cb885505deaeb7cd80926fffd27fcfccb7715a10d6a869c0331003ca68bec9",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 8479,
+ "text": "You land beneath the lighthouse hill. The old crossing is hidden by reeds. Mara marked its outline long before the storm."
+ }
+ ]
+ },
+ "campaign.6.after": {
+ "pageId": "campaign.6.after",
+ "resource": "narration_campaign_6_after",
+ "text": "The bridge is intact. You cross with the lantern held high. On the far bank, a fresh bootprint tells you someone else has passed this way.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_6_after.wav",
+ "flacFile": "narration_campaign_6_after.flac",
+ "wavSha256": "0898962455959f57ba4dc533561dd56255d1d2ced7161470881e31d8abfcaf43",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 245536,
+ "durationMs": 10231,
+ "textSha256": "51d543acaa3ed8d0da5fa294a7b210f2375030a0fda6ce3a97c83dfaa0408bda",
+ "flacSha256": "bbaa067856e323723fea0a74e7f6cda47b701d8f0a61c9bdbb124bfa7757ba57",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 9631,
+ "text": "The bridge is intact. You cross with the lantern held high. On the far bank, a fresh bootprint tells you someone else has passed this way."
+ }
+ ]
+ },
+ "campaign.7.before": {
+ "pageId": "campaign.7.before",
+ "resource": "narration_campaign_7_before",
+ "text": "A rope hangs from a timber frame. The bell above it has fallen silent. Restore the pattern before you call out across the water.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_7_before.wav",
+ "flacFile": "narration_campaign_7_before.flac",
+ "wavSha256": "cca7a758b8f93793fec73cd7173f175fd58b0ecd86802b5a27ad0f8c2e9d9cdc",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 226080,
+ "durationMs": 9420,
+ "textSha256": "fbe874dbb47488fe436439e3c6e57cf86d049389f01218dbe45b094b020f633a",
+ "flacSha256": "1d0fd3c2c788c517aa6ef3fd784ead9067da5399a7ac1a6c32d32e8876a23d89",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 8820,
+ "text": "A rope hangs from a timber frame. The bell above it has fallen silent. Restore the pattern before you call out across the water."
+ }
+ ]
+ },
+ "campaign.7.after": {
+ "pageId": "campaign.7.after",
+ "resource": "narration_campaign_7_after",
+ "text": "One clear note travels into the fog. Two notes answer from the hill. Someone is waiting at the lighthouse.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_7_after.wav",
+ "flacFile": "narration_campaign_7_after.flac",
+ "wavSha256": "bc1c6162ea5b88055eddbf91952d6d5f49af3be103703433e26eb532c6d507cc",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 192800,
+ "durationMs": 8033,
+ "textSha256": "1a14efc63b63744efdf0c8b3eeb3f7fdba29412e91740eaff5ecc9d68894d87e",
+ "flacSha256": "cd4caa09c07336ea1816190ab737129da4227659ad7eb95779b64d50811534ba",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 7433,
+ "text": "One clear note travels into the fog. Two notes answer from the hill. Someone is waiting at the lighthouse."
+ }
+ ]
+ },
+ "campaign.8.before": {
+ "pageId": "campaign.8.before",
+ "resource": "narration_campaign_8_before",
+ "text": "Mara opens the lighthouse door. ‘I knew you’d find the notebook,’ she says. The storm stopped the turning mechanism. Together, you lay out its scattered parts.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_8_before.wav",
+ "flacFile": "narration_campaign_8_before.flac",
+ "wavSha256": "4282678379a27aade271230eda6219c97937a0a58e3cef69916dae355591cb02",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 270624,
+ "durationMs": 11276,
+ "textSha256": "4a5d2997866ad6d570db169562c4d636fa4a4a5dbbc46938bb62c800718df24f",
+ "flacSha256": "d928d24044567f7eccb2e1d63ace14f5dcaf5bcc83e7b0969379b019e98ffa04",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 10676,
+ "text": "Mara opens the lighthouse door. ‘I knew you’d find the notebook,’ she says. The storm stopped the turning mechanism. Together, you lay out its scattered parts."
+ }
+ ]
+ },
+ "campaign.8.after": {
+ "pageId": "campaign.8.after",
+ "resource": "narration_campaign_8_after",
+ "text": "The missing gear slips into place. You turn the handle; the mechanism answers with a familiar, steady ticking. Mara smiles without looking up.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_8_after.wav",
+ "flacFile": "narration_campaign_8_after.flac",
+ "wavSha256": "476f45fe49f4dcb86c8c02999e357392a75d9732622ae4bfa28268a792fc37e1",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 257824,
+ "durationMs": 10743,
+ "textSha256": "0661c45756104d69eab2c6f02eb7c6fac8cac4c59fb46673b94b32e6431b3b57",
+ "flacSha256": "00d60f40e56567da445cf22db5b4769fdab15d42767293200680f7f3e740172d",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 10143,
+ "text": "The missing gear slips into place. You turn the handle; the mechanism answers with a familiar, steady ticking. Mara smiles without looking up."
+ }
+ ]
+ },
+ "campaign.9.before": {
+ "pageId": "campaign.9.before",
+ "resource": "narration_campaign_9_before",
+ "text": "The great lens is clouded with salt. Mara holds the lantern while you work. The areas overlap like the rings in the glass; compare them carefully.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_9_before.wav",
+ "flacFile": "narration_campaign_9_before.flac",
+ "wavSha256": "971cad8505dc195c83db6380df21590d9c4bc61556acce027af7058b757a64c0",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 261408,
+ "durationMs": 10892,
+ "textSha256": "431d704d2c8104e6fbe948daca7432def0eeec3156336f27917a9749f9c8549b",
+ "flacSha256": "dca8cb3c4441a59e74932b8923c71f3e791cf8c314c8758a21540ddedda5e26c",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 10292,
+ "text": "The great lens is clouded with salt. Mara holds the lantern while you work. The areas overlap like the rings in the glass; compare them carefully."
+ }
+ ]
+ },
+ "campaign.9.after": {
+ "pageId": "campaign.9.after",
+ "resource": "narration_campaign_9_after",
+ "text": "You wipe the last salt from the lens. The lantern’s tiny flame stretches into a bright arc across the walls. Everything is ready.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_9_after.wav",
+ "flacFile": "narration_campaign_9_after.flac",
+ "wavSha256": "4480becccac21933a6bcda2ae3f2b3a62eef67be1f59f25f3cc671e5c3d94e28",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 232224,
+ "durationMs": 9676,
+ "textSha256": "aa73c3ace90d17beb2a1ed211212dfa090580b9a3a3f193fd915d80d0a3f90eb",
+ "flacSha256": "efc8e3e8efc8a247915a1863ecbf4979f72f8c69964d4f7bcb3e3360e89d0cd4",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 9076,
+ "text": "You wipe the last salt from the lens. The lantern’s tiny flame stretches into a bright arc across the walls. Everything is ready."
+ }
+ ]
+ },
+ "campaign.10.before": {
+ "pageId": "campaign.10.before",
+ "resource": "narration_campaign_10_before",
+ "text": "Mara gives you the handle. Below the windows, the island lies dark. This is the pattern all the other pages were leading towards.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_10_before.wav",
+ "flacFile": "narration_campaign_10_before.flac",
+ "wavSha256": "65e5937cbe744f54638521126efb90b0fbc8367a414706260289c11a2e1e5b8c",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 237344,
+ "durationMs": 9889,
+ "textSha256": "739aa7897897bd49aa50d2ebade7695842223c55556200ac74faa18a569ff325",
+ "flacSha256": "51971ccc9deb0c3d0c9d04ac825a22bf0be0af661b85465b6ae1edca92d7267c",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 9289,
+ "text": "Mara gives you the handle. Below the windows, the island lies dark. This is the pattern all the other pages were leading towards."
+ }
+ ]
+ },
+ "campaign.10.after": {
+ "pageId": "campaign.10.after",
+ "resource": "narration_campaign_10_after",
+ "text": "The beacon turns. Its light sweeps the harbour, the bridge, the little boat. Far offshore, a ship sounds its horn. The island has its light again.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_10_after.wav",
+ "flacFile": "narration_campaign_10_after.flac",
+ "wavSha256": "18f7d76a00368834f17be7574efc599dc169d5a0524747459c66ea3c0af559a3",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 256800,
+ "durationMs": 10700,
+ "textSha256": "dc91b4d6ed86eb779dd76b9da3f2126925a922b4abc931b0086caf7de5139570",
+ "flacSha256": "5d58cb915687f4637c2b0fa6d36a4b51de819c8658be52f89376f3a37eeab377",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 10100,
+ "text": "The beacon turns. Its light sweeps the harbour, the bridge, the little boat. Far offshore, a ship sounds its horn. The island has its light again."
+ }
+ ]
+ },
+ "campaign.11.before": {
+ "pageId": "campaign.11.before",
+ "resource": "narration_campaign_11_before",
+ "text": "Dawn finds you walking back with Mara. There is one blank page at the end of the notebook. ‘That one is yours,’ she says.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_11_before.wav",
+ "flacFile": "narration_campaign_11_before.flac",
+ "wavSha256": "d3d3bb3ca73cfca83dd8ecd01597dd46bc9ededaad66ad1abc4c058919574e70",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 208160,
+ "durationMs": 8673,
+ "textSha256": "54f7f521c2b6ae2d1011b0d608336b69e28fa7d949d2a2fca21461936c39dcc9",
+ "flacSha256": "8b12af7b26eec93fee27facee760e80db4d2f92501690444fff2ae5dcd39c069",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 8073,
+ "text": "Dawn finds you walking back with Mara. There is one blank page at the end of the notebook. ‘That one is yours,’ she says."
+ }
+ ]
+ },
+ "campaign.11.after": {
+ "pageId": "campaign.11.after",
+ "resource": "narration_campaign_11_after",
+ "text": "You light the cottage window. Mara puts the kettle on. Beneath your new drawing, you write: ‘No one comes home to an unlit shore.’ The notebook closes. Your watch has begun.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_11_after.wav",
+ "flacFile": "narration_campaign_11_after.flac",
+ "wavSha256": "5e632c3b02667996f557c84403a0a784ffed988395ddeff75c50869b16db5b61",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 303392,
+ "durationMs": 12641,
+ "textSha256": "0407091c76fcbe254d034f11b7a630f2cb38c8fa65a7e6611db48a5aab0a5dfd",
+ "flacSha256": "423452dd38c406206733dd47211d86f06e4eefb735be78cc3601bfb0a7a25561",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 12041,
+ "text": "You light the cottage window. Mara puts the kettle on. Beneath your new drawing, you write: ‘No one comes home to an unlit shore.’ The notebook closes. Your watch has begun."
+ }
+ ]
}
}
}
diff --git a/assets/narration/README.md b/assets/narration/README.md
index a716c62..409909c 100644
--- a/assets/narration/README.md
+++ b/assets/narration/README.md
@@ -1,15 +1,15 @@
-# Bundled diary readings
+# Bundled diary readings and guiding narration
-Five fixed readings accompany the opening notebook leaves. They are **synthetic narration rendered during development**, using Kokoro v1.0 / `bf_emma` (British female), not human voice-actor recordings. The app only plays files using just_audio’s platform decoder. It contains no speech model, Android reader integration, runtime synthesis, or audio download.
+Twenty-eight fixed recordings accompany the story. Mara’s five original diary readings use `bf_emma` (British female); twenty-three guiding passages use a distinct `bm_george` narrator (British male). These are **synthetic recordings rendered during development**, not human voice-actor recordings. The app plays bundled files through just_audio, with no speech model, Android reader, runtime synthesis or download. Mara’s original WAV masters remain unchanged.
-- `scripts.json`: canonical non-puzzle text loaded directly by the Flutter story pages.
+- `scripts.json`: canonical scripts with stable IDs, speaker, voice and rendering speed. Narrator passages match notebook entry/memory/closing text or the later campaign before/after passages.
- `wav/`: reviewable 24 kHz mono PCM16 WAV masters.
- `manifest.json`: model/voice checksums, generator versions, exact scripts, passage timings and WAV and FLAC checksums.
- `assets/audio/narration_*.wav`: bundled PCM16 copies, byte-identical to the WAV masters.
- `assets/audio/narration_*.flac`: archival lossless exports, excluded from the APK.
- `licenses/`: Kokoro ONNX wrapper MIT and model Apache 2.0 licenses.
-The voice uses generation speed 0.82, short fades, paragraph pauses and peak normalization. The in-app speed control changes playback speed without changing pitch. Pausing preserves the actual recording position; leaving a page releases playback. Readings never autoplay on entry.
+Mara uses generation speed 0.82 and the narrator 0.88, with short fades, paragraph pauses and peak normalization. The in-app speed control changes playback speed without changing pitch. Pausing preserves the actual recording position; leaving a page releases playback. Readings never autoplay on entry.
## Regeneration
@@ -20,6 +20,9 @@ Use Python 3.12, dependencies pinned in `requirements.txt` and ffmpeg. Keep mode
```sh
python scripts/render_narration.py --model /path/to/kokoro-v1.0.onnx --voices /path/to/voices-v1.0.bin
python3 scripts/check_narration_assets.py
+
+# Regenerate only guiding narration, preserving Mara’s existing takes:
+python scripts/render_narration.py --model /path/to/kokoro-v1.0.onnx --voices /path/to/voices-v1.0.bin --speaker Narrator
```
The check requires only Python’s standard library and ffmpeg. It verifies script freshness, cue coverage, master format, checksums and runtime WAV/master equality and bit-identical WAV/FLAC decoding. It also rejects Flutter device-reader imports in app code. Listen to new takes before accepting them; automated checks cannot judge performance or pronunciation.
@@ -27,3 +30,6 @@ The check requires only Python’s standard library and ffmpeg. It verifies scri
A future actor recording can replace the masters and bundled assets while preserving stable page IDs. Update passage timings and checksums with that recording; never silently change the written script to fit audio.
Playback uses PCM WAV because the connected Huawei API 26 tablet advanced the FLAC clock without creating an AudioTrack. WAV produces an active, unmuted 24 kHz mono PCM media track through the speaker, and the user confirmed audible speech. The release smoke test now checks that mixer track, in addition to pause/resume and elapsed time.
+
+
+The seven cottage narrator recordings cover the lantern/key/compass entries and memories and the closing threshold leaf. Sixteen more cover the before/after passages for campaign levels 4–11. Puzzle instruction leaves remain unvoiced. On-screen labels distinguish “Mara · diary reading” from “Narrator · recorded story”; playback is opt-in and stops on navigation or backgrounding. Cue highlighting follows the exact displayed passage.
diff --git a/assets/narration/manifest.json b/assets/narration/manifest.json
index f4ca3f0..587cc54 100644
--- a/assets/narration/manifest.json
+++ b/assets/narration/manifest.json
@@ -3,6 +3,16 @@
"speed": 0.82,
"language": "en-gb",
"method": "Synthetic narration rendered during development; bundled file playback only.",
+ "speakers": {
+ "Mara": {
+ "voice": "bf_emma",
+ "speed": 0.82
+ },
+ "Narrator": {
+ "voice": "bm_george",
+ "speed": 0.88
+ }
+ },
"modelSha256": "7d5df8ecf7d4b1878015a32686053fd0eebe2bc377234608764cc0ef3636a6c5",
"voicesSha256": "bca610b8308e8d99f32e6fe4197e7ec01679264efed0cac9140fe9c29f1fbf7d",
"packages": {
@@ -161,6 +171,568 @@
],
"flacFile": "narration_cottage_lantern_sketch.flac",
"wavSha256": "53dd694b9933f94bcda72582d0c6b1bb5b656898a73c87d66ecfa0874ba3a29d"
+ },
+ "cottage.lantern.entry": {
+ "pageId": "cottage.lantern.entry",
+ "resource": "narration_cottage_lantern_entry",
+ "text": "A small flame will not survive the wind. Mara’s next page shows what she carried on her evening rounds.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_cottage_lantern_entry.wav",
+ "flacFile": "narration_cottage_lantern_entry.flac",
+ "wavSha256": "9ad019bd823e3d31dbfde3f1a29c6d643e11640cafd009ca77d3b3ff5096995a",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 201504,
+ "durationMs": 8396,
+ "textSha256": "ca19c2ac4a7aa40f3d4c9c5c85957618972432a71a3e12dce1ccdd59ada65b0c",
+ "flacSha256": "0b76706fbb868ddcb26a36e6a90f4badc2fd4c7e751ca6639c75a46c4fcb1323",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 7796,
+ "text": "A small flame will not survive the wind. Mara’s next page shows what she carried on her evening rounds."
+ }
+ ]
+ },
+ "cottage.lantern.memory": {
+ "pageId": "cottage.lantern.memory",
+ "resource": "narration_cottage_lantern_memory",
+ "text": "The lantern is soot-black but sound. Its warm circle of light reaches the cottage door. Beneath the handle, Mara has scratched your initials.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_cottage_lantern_memory.wav",
+ "flacFile": "narration_cottage_lantern_memory.flac",
+ "wavSha256": "80485840ab6d00a1c6883ec2eaab36a19cffe2fbb69d026b3a417613787b4aa0",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 254752,
+ "durationMs": 10615,
+ "textSha256": "3c6af7f276cb7f24b9d20d0c120c85d1fad02a62328a2fd230826b9f6b2f3ba5",
+ "flacSha256": "ad285b1ac2717f93b284e727748fa8bbe0a72dd1cea4607eca5d723330e5b305",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 10015,
+ "text": "The lantern is soot-black but sound. Its warm circle of light reaches the cottage door. Beneath the handle, Mara has scratched your initials."
+ }
+ ]
+ },
+ "cottage.key.entry": {
+ "pageId": "cottage.key.entry",
+ "resource": "narration_cottage_key_entry",
+ "text": "‘Some clues belong to more than one place,’ Mara wrote. Compare the overlapping areas on this page; a shared cell counts in both. A loose floorboard waits by the door.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_cottage_key_entry.wav",
+ "flacFile": "narration_cottage_key_entry.flac",
+ "wavSha256": "8124e1c156b41b69b52305c4c1e2fcae5005f6d2829eddbbecc952eebb73cfdb",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 299808,
+ "durationMs": 12492,
+ "textSha256": "e9659d973e1c29a9b21479959a3859978ffb1feace593d6f15fd0536a9810269",
+ "flacSha256": "c54b40e8cdc5cd229a2ed3590a5ca59b103458082dae5a431a46a51c4bce2d94",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 11892,
+ "text": "‘Some clues belong to more than one place,’ Mara wrote. Compare the overlapping areas on this page; a shared cell counts in both. A loose floorboard waits by the door."
+ }
+ ]
+ },
+ "cottage.key.memory": {
+ "pageId": "cottage.key.memory",
+ "resource": "narration_cottage_key_memory",
+ "text": "A brass key turns up beneath the board. The tag reads ‘harbour store’. Someone prepared for a journey and never quite made it out of the cottage.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_cottage_key_memory.wav",
+ "flacFile": "narration_cottage_key_memory.flac",
+ "wavSha256": "1f65e40bffcd282c2a87e087c952fa62f66e6207885e11eef3ca1fb0810c2991",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 249632,
+ "durationMs": 10401,
+ "textSha256": "f1587b172b4801b53b45f45d26e761e77dda0c7417308000307efed88b20e576",
+ "flacSha256": "53449485cb0f384ecfa5c88c427bec74a2fbbb8d71a9e92ad93bddc41a8b6844",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 9801,
+ "text": "A brass key turns up beneath the board. The tag reads ‘harbour store’. Someone prepared for a journey and never quite made it out of the cottage."
+ }
+ ]
+ },
+ "cottage.compass.entry": {
+ "pageId": "cottage.compass.entry",
+ "resource": "narration_cottage_compass_entry",
+ "text": "The lane has vanished beneath fallen branches. One last page in the cottage points you towards the harbour. Use what the areas share to work out what lies outside them.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_cottage_compass_entry.wav",
+ "flacFile": "narration_cottage_compass_entry.flac",
+ "wavSha256": "2671c9657c54803c9b5e571cf5bea42cd5a2bffb0ca848444e99bdbaf5effa55",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 306976,
+ "durationMs": 12791,
+ "textSha256": "2fef65403ef1a1cb2ce4f480783ec409beeccb5f4eb595dd22ab9dd6fb0b6c25",
+ "flacSha256": "51f6641757834d05578dc11dd627c0deafb210e7979ffc01df0e2effcab9c79d",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 12191,
+ "text": "The lane has vanished beneath fallen branches. One last page in the cottage points you towards the harbour. Use what the areas share to work out what lies outside them."
+ }
+ ]
+ },
+ "cottage.compass.memory": {
+ "pageId": "cottage.compass.memory",
+ "resource": "narration_cottage_compass_memory",
+ "text": "The compass needle settles towards the sea. Tucked inside its lid is a note: ‘When the path disappears, keep your bearings.’ You step into the rain.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_cottage_compass_memory.wav",
+ "flacFile": "narration_cottage_compass_memory.flac",
+ "wavSha256": "f48f72546552401da03f5288177f690a4dff35c4811bde7589034534759ca30b",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 273696,
+ "durationMs": 11404,
+ "textSha256": "66b381628bd2c774e0372f4afb69783aad92363c142e41305b4b2980d4ad6ba7",
+ "flacSha256": "798488e7b13b1d858b90c8507cbfedbad558ed33a172128438978b3594a1cb42",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 10804,
+ "text": "The compass needle settles towards the sea. Tucked inside its lid is a note: ‘When the path disappears, keep your bearings.’ You step into the rain."
+ }
+ ]
+ },
+ "cottage.threshold": {
+ "pageId": "cottage.threshold",
+ "resource": "narration_cottage_threshold",
+ "text": "The lantern waits by the door. You fold Gran’s note along its old crease and tuck it beside the harbour key.\n\nOutside, the lane smells of rain. You remember her advice about the latch: lift it a little, then turn.\n\nBeyond the cottage, the path leads down to the water. There is still a light to bring home.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_cottage_threshold.wav",
+ "flacFile": "narration_cottage_threshold.flac",
+ "wavSha256": "11c280d613222ccc2eecd68aac6f594950d3007f6d9269d208d4fef9aad29660",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 549280,
+ "durationMs": 22887,
+ "textSha256": "6eaa8e719d1a747a6201279182a2ce4c8c56fcd8f60132525ed23a242c617e82",
+ "flacSha256": "eadafc890ee55f2855d80ff5f2b4fa7011d68bb4dbf521820902aeebfe7870c1",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 7561,
+ "text": "The lantern waits by the door. You fold Gran’s note along its old crease and tuck it beside the harbour key."
+ },
+ {
+ "startMs": 8161,
+ "endMs": 15841,
+ "text": "Outside, the lane smells of rain. You remember her advice about the latch: lift it a little, then turn."
+ },
+ {
+ "startMs": 16441,
+ "endMs": 22287,
+ "text": "Beyond the cottage, the path leads down to the water. There is still a light to bring home."
+ }
+ ]
+ },
+ "campaign.4.before": {
+ "pageId": "campaign.4.before",
+ "resource": "narration_campaign_4_before",
+ "text": "The tide has covered the causeway. A shape knocks gently against the harbour steps. Mara’s notebook has a page for this crossing too.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_4_before.wav",
+ "flacFile": "narration_campaign_4_before.flac",
+ "wavSha256": "da3226933f6c6ee0c0fe15369b321dc032a5f436baef58b8a449f29561e59a75",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 237856,
+ "durationMs": 9911,
+ "textSha256": "239a9687e7edc99f13cd9f0dc0784aa9023f0e542feefb7fe76122c983b851af",
+ "flacSha256": "0fb36a1f2e3dc856bf98c8699dcf2d4d1e67679237e3f093de21b1fd1fa042e0",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 9311,
+ "text": "The tide has covered the causeway. A shape knocks gently against the harbour steps. Mara’s notebook has a page for this crossing too."
+ }
+ ]
+ },
+ "campaign.4.after": {
+ "pageId": "campaign.4.after",
+ "resource": "narration_campaign_4_after",
+ "text": "The little boat is still tied fast. You bail out the rainwater, set the lantern in the bow, and push away from the steps.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_4_after.wav",
+ "flacFile": "narration_campaign_4_after.flac",
+ "wavSha256": "4c9a053729fbee2e7324642e22e82f021ff59f04a035dec4d0f7bf4c3e2f4ec3",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 221984,
+ "durationMs": 9249,
+ "textSha256": "8b041c5d167c54c2189be16043ed299551046d83067df75652847ccd05ea8675",
+ "flacSha256": "05c07db2e53969f82d6e9387db92ec53d401ed9378971a41708074e431cc0f6a",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 8649,
+ "text": "The little boat is still tied fast. You bail out the rainwater, set the lantern in the bow, and push away from the steps."
+ }
+ ]
+ },
+ "campaign.5.before": {
+ "pageId": "campaign.5.before",
+ "resource": "narration_campaign_5_before",
+ "text": "The current tugs you towards the outer rocks. Something heavy is tangled beneath the seat. The pattern tells you what to reach for.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_5_before.wav",
+ "flacFile": "narration_campaign_5_before.flac",
+ "wavSha256": "cd99d067df878bf9792b24c15a37ae350855f1b5650f177fcfd0e88dfa279f1a",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 219936,
+ "durationMs": 9164,
+ "textSha256": "32eb4035740297dd56922779e5cfa830dff9a94d3044fd7b668e97b7c1178fef",
+ "flacSha256": "c6955d7f797e35bd2beeb938458c6cf9963780cbaa1c88852b0a51bdbb8723ba",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 8564,
+ "text": "The current tugs you towards the outer rocks. Something heavy is tangled beneath the seat. The pattern tells you what to reach for."
+ }
+ ]
+ },
+ "campaign.5.after": {
+ "pageId": "campaign.5.after",
+ "resource": "narration_campaign_5_after",
+ "text": "The anchor catches. The boat swings into calmer water. In the pause, you hear a bell somewhere beyond the fog.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_5_after.wav",
+ "flacFile": "narration_campaign_5_after.flac",
+ "wavSha256": "e3997b534cf3b953a6a04fd32a02ac0f5ff907f444ec2602e263b240a92c2fef",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 200480,
+ "durationMs": 8353,
+ "textSha256": "63e03e04b4d267e38d042787aa813b246b248e366e9ad32a3a289539161eea02",
+ "flacSha256": "f2c000ab339c66019fc9c66fa60d9907ee6081099e733e9aa50a82368d4e5408",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 7753,
+ "text": "The anchor catches. The boat swings into calmer water. In the pause, you hear a bell somewhere beyond the fog."
+ }
+ ]
+ },
+ "campaign.6.before": {
+ "pageId": "campaign.6.before",
+ "resource": "narration_campaign_6_before",
+ "text": "You land beneath the lighthouse hill. The old crossing is hidden by reeds. Mara marked its outline long before the storm.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_6_before.wav",
+ "flacFile": "narration_campaign_6_before.flac",
+ "wavSha256": "aa608ff2544d0ca9417f1676bb45e4f0398632a9587242e6b77a1ad47b1c7373",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 217888,
+ "durationMs": 9079,
+ "textSha256": "cafa0efdd8fd07e9fc4b2f35f0f3ba1b1324193cea4d6b524e60382b4663b2e6",
+ "flacSha256": "f3cb885505deaeb7cd80926fffd27fcfccb7715a10d6a869c0331003ca68bec9",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 8479,
+ "text": "You land beneath the lighthouse hill. The old crossing is hidden by reeds. Mara marked its outline long before the storm."
+ }
+ ]
+ },
+ "campaign.6.after": {
+ "pageId": "campaign.6.after",
+ "resource": "narration_campaign_6_after",
+ "text": "The bridge is intact. You cross with the lantern held high. On the far bank, a fresh bootprint tells you someone else has passed this way.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_6_after.wav",
+ "flacFile": "narration_campaign_6_after.flac",
+ "wavSha256": "0898962455959f57ba4dc533561dd56255d1d2ced7161470881e31d8abfcaf43",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 245536,
+ "durationMs": 10231,
+ "textSha256": "51d543acaa3ed8d0da5fa294a7b210f2375030a0fda6ce3a97c83dfaa0408bda",
+ "flacSha256": "bbaa067856e323723fea0a74e7f6cda47b701d8f0a61c9bdbb124bfa7757ba57",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 9631,
+ "text": "The bridge is intact. You cross with the lantern held high. On the far bank, a fresh bootprint tells you someone else has passed this way."
+ }
+ ]
+ },
+ "campaign.7.before": {
+ "pageId": "campaign.7.before",
+ "resource": "narration_campaign_7_before",
+ "text": "A rope hangs from a timber frame. The bell above it has fallen silent. Restore the pattern before you call out across the water.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_7_before.wav",
+ "flacFile": "narration_campaign_7_before.flac",
+ "wavSha256": "cca7a758b8f93793fec73cd7173f175fd58b0ecd86802b5a27ad0f8c2e9d9cdc",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 226080,
+ "durationMs": 9420,
+ "textSha256": "fbe874dbb47488fe436439e3c6e57cf86d049389f01218dbe45b094b020f633a",
+ "flacSha256": "1d0fd3c2c788c517aa6ef3fd784ead9067da5399a7ac1a6c32d32e8876a23d89",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 8820,
+ "text": "A rope hangs from a timber frame. The bell above it has fallen silent. Restore the pattern before you call out across the water."
+ }
+ ]
+ },
+ "campaign.7.after": {
+ "pageId": "campaign.7.after",
+ "resource": "narration_campaign_7_after",
+ "text": "One clear note travels into the fog. Two notes answer from the hill. Someone is waiting at the lighthouse.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_7_after.wav",
+ "flacFile": "narration_campaign_7_after.flac",
+ "wavSha256": "bc1c6162ea5b88055eddbf91952d6d5f49af3be103703433e26eb532c6d507cc",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 192800,
+ "durationMs": 8033,
+ "textSha256": "1a14efc63b63744efdf0c8b3eeb3f7fdba29412e91740eaff5ecc9d68894d87e",
+ "flacSha256": "cd4caa09c07336ea1816190ab737129da4227659ad7eb95779b64d50811534ba",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 7433,
+ "text": "One clear note travels into the fog. Two notes answer from the hill. Someone is waiting at the lighthouse."
+ }
+ ]
+ },
+ "campaign.8.before": {
+ "pageId": "campaign.8.before",
+ "resource": "narration_campaign_8_before",
+ "text": "Mara opens the lighthouse door. ‘I knew you’d find the notebook,’ she says. The storm stopped the turning mechanism. Together, you lay out its scattered parts.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_8_before.wav",
+ "flacFile": "narration_campaign_8_before.flac",
+ "wavSha256": "4282678379a27aade271230eda6219c97937a0a58e3cef69916dae355591cb02",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 270624,
+ "durationMs": 11276,
+ "textSha256": "4a5d2997866ad6d570db169562c4d636fa4a4a5dbbc46938bb62c800718df24f",
+ "flacSha256": "d928d24044567f7eccb2e1d63ace14f5dcaf5bcc83e7b0969379b019e98ffa04",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 10676,
+ "text": "Mara opens the lighthouse door. ‘I knew you’d find the notebook,’ she says. The storm stopped the turning mechanism. Together, you lay out its scattered parts."
+ }
+ ]
+ },
+ "campaign.8.after": {
+ "pageId": "campaign.8.after",
+ "resource": "narration_campaign_8_after",
+ "text": "The missing gear slips into place. You turn the handle; the mechanism answers with a familiar, steady ticking. Mara smiles without looking up.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_8_after.wav",
+ "flacFile": "narration_campaign_8_after.flac",
+ "wavSha256": "476f45fe49f4dcb86c8c02999e357392a75d9732622ae4bfa28268a792fc37e1",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 257824,
+ "durationMs": 10743,
+ "textSha256": "0661c45756104d69eab2c6f02eb7c6fac8cac4c59fb46673b94b32e6431b3b57",
+ "flacSha256": "00d60f40e56567da445cf22db5b4769fdab15d42767293200680f7f3e740172d",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 10143,
+ "text": "The missing gear slips into place. You turn the handle; the mechanism answers with a familiar, steady ticking. Mara smiles without looking up."
+ }
+ ]
+ },
+ "campaign.9.before": {
+ "pageId": "campaign.9.before",
+ "resource": "narration_campaign_9_before",
+ "text": "The great lens is clouded with salt. Mara holds the lantern while you work. The areas overlap like the rings in the glass; compare them carefully.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_9_before.wav",
+ "flacFile": "narration_campaign_9_before.flac",
+ "wavSha256": "971cad8505dc195c83db6380df21590d9c4bc61556acce027af7058b757a64c0",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 261408,
+ "durationMs": 10892,
+ "textSha256": "431d704d2c8104e6fbe948daca7432def0eeec3156336f27917a9749f9c8549b",
+ "flacSha256": "dca8cb3c4441a59e74932b8923c71f3e791cf8c314c8758a21540ddedda5e26c",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 10292,
+ "text": "The great lens is clouded with salt. Mara holds the lantern while you work. The areas overlap like the rings in the glass; compare them carefully."
+ }
+ ]
+ },
+ "campaign.9.after": {
+ "pageId": "campaign.9.after",
+ "resource": "narration_campaign_9_after",
+ "text": "You wipe the last salt from the lens. The lantern’s tiny flame stretches into a bright arc across the walls. Everything is ready.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_9_after.wav",
+ "flacFile": "narration_campaign_9_after.flac",
+ "wavSha256": "4480becccac21933a6bcda2ae3f2b3a62eef67be1f59f25f3cc671e5c3d94e28",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 232224,
+ "durationMs": 9676,
+ "textSha256": "aa73c3ace90d17beb2a1ed211212dfa090580b9a3a3f193fd915d80d0a3f90eb",
+ "flacSha256": "efc8e3e8efc8a247915a1863ecbf4979f72f8c69964d4f7bcb3e3360e89d0cd4",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 9076,
+ "text": "You wipe the last salt from the lens. The lantern’s tiny flame stretches into a bright arc across the walls. Everything is ready."
+ }
+ ]
+ },
+ "campaign.10.before": {
+ "pageId": "campaign.10.before",
+ "resource": "narration_campaign_10_before",
+ "text": "Mara gives you the handle. Below the windows, the island lies dark. This is the pattern all the other pages were leading towards.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_10_before.wav",
+ "flacFile": "narration_campaign_10_before.flac",
+ "wavSha256": "65e5937cbe744f54638521126efb90b0fbc8367a414706260289c11a2e1e5b8c",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 237344,
+ "durationMs": 9889,
+ "textSha256": "739aa7897897bd49aa50d2ebade7695842223c55556200ac74faa18a569ff325",
+ "flacSha256": "51971ccc9deb0c3d0c9d04ac825a22bf0be0af661b85465b6ae1edca92d7267c",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 9289,
+ "text": "Mara gives you the handle. Below the windows, the island lies dark. This is the pattern all the other pages were leading towards."
+ }
+ ]
+ },
+ "campaign.10.after": {
+ "pageId": "campaign.10.after",
+ "resource": "narration_campaign_10_after",
+ "text": "The beacon turns. Its light sweeps the harbour, the bridge, the little boat. Far offshore, a ship sounds its horn. The island has its light again.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_10_after.wav",
+ "flacFile": "narration_campaign_10_after.flac",
+ "wavSha256": "18f7d76a00368834f17be7574efc599dc169d5a0524747459c66ea3c0af559a3",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 256800,
+ "durationMs": 10700,
+ "textSha256": "dc91b4d6ed86eb779dd76b9da3f2126925a922b4abc931b0086caf7de5139570",
+ "flacSha256": "5d58cb915687f4637c2b0fa6d36a4b51de819c8658be52f89376f3a37eeab377",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 10100,
+ "text": "The beacon turns. Its light sweeps the harbour, the bridge, the little boat. Far offshore, a ship sounds its horn. The island has its light again."
+ }
+ ]
+ },
+ "campaign.11.before": {
+ "pageId": "campaign.11.before",
+ "resource": "narration_campaign_11_before",
+ "text": "Dawn finds you walking back with Mara. There is one blank page at the end of the notebook. ‘That one is yours,’ she says.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_11_before.wav",
+ "flacFile": "narration_campaign_11_before.flac",
+ "wavSha256": "d3d3bb3ca73cfca83dd8ecd01597dd46bc9ededaad66ad1abc4c058919574e70",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 208160,
+ "durationMs": 8673,
+ "textSha256": "54f7f521c2b6ae2d1011b0d608336b69e28fa7d949d2a2fca21461936c39dcc9",
+ "flacSha256": "8b12af7b26eec93fee27facee760e80db4d2f92501690444fff2ae5dcd39c069",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 8073,
+ "text": "Dawn finds you walking back with Mara. There is one blank page at the end of the notebook. ‘That one is yours,’ she says."
+ }
+ ]
+ },
+ "campaign.11.after": {
+ "pageId": "campaign.11.after",
+ "resource": "narration_campaign_11_after",
+ "text": "You light the cottage window. Mara puts the kettle on. Beneath your new drawing, you write: ‘No one comes home to an unlit shore.’ The notebook closes. Your watch has begun.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88,
+ "file": "narration_campaign_11_after.wav",
+ "flacFile": "narration_campaign_11_after.flac",
+ "wavSha256": "5e632c3b02667996f557c84403a0a784ffed988395ddeff75c50869b16db5b61",
+ "sampleRate": 24000,
+ "channels": 1,
+ "frames": 303392,
+ "durationMs": 12641,
+ "textSha256": "0407091c76fcbe254d034f11b7a630f2cb38c8fa65a7e6611db48a5aab0a5dfd",
+ "flacSha256": "423452dd38c406206733dd47211d86f06e4eefb735be78cc3601bfb0a7a25561",
+ "cues": [
+ {
+ "startMs": 180,
+ "endMs": 12041,
+ "text": "You light the cottage window. Mara puts the kettle on. Beneath your new drawing, you write: ‘No one comes home to an unlit shore.’ The notebook closes. Your watch has begun."
+ }
+ ]
}
}
}
diff --git a/assets/narration/scripts.json b/assets/narration/scripts.json
index f37fd0d..37f068f 100644
--- a/assets/narration/scripts.json
+++ b/assets/narration/scripts.json
@@ -1 +1,226 @@
-[{"pageId":"cottage.dedication","resource":"narration_cottage_dedication","text":"My dear,\n\nI never could keep a proper diary. I wrote down the tides, the things that needed mending, and whatever I was afraid I might forget.\n\nYou will find a little of all three in here. Take your time. There is no right way to turn these pages.\n\nWith all my love,\nGran"},{"pageId":"cottage.window","resource":"narration_cottage_window","text":"The wind has finally gone quiet. I have put the blue cup by the window, where you always liked to sit.\n\nThe latch still sticks. Lift it a little before you turn it. Some things on this island need a gentle hand, not a stronger one.\n\nIf you arrive after dark, there is something in the little drawer beside the hearth."},{"pageId":"cottage.match.memory","resource":"narration_cottage_match_memory","text":"You used to insist on lighting the evening lantern yourself. I held the matchbox, and you held your breath.\n\nOnce, you asked how such a little flame could help anyone out at sea.\n\nIt cannot, I told you. But it can help us find the next light.\n\nI kept one dry match in a tin after that. Just in case."},{"pageId":"cottage.folded.note","resource":"narration_cottage_folded_note","text":"If the tide has covered the causeway, use the little boat by the harbour steps. The knot looks worse than it is.\n\nTake the lantern. When you reach the bell, ring twice. I will know it is you.\n\nAnd do not let the tea go cold while you are deciding.\n\nLove, Gran"},{"pageId":"cottage.lantern.sketch","resource":"narration_cottage_lantern_sketch","text":"Your grandfather repaired this handle with a piece of wire and far too much confidence. I wrapped the join so it would not catch your fingers.\n\nPeople notice the flame first. I tend to notice the things that let us carry it."}]
+[
+ {
+ "pageId": "cottage.dedication",
+ "resource": "narration_cottage_dedication",
+ "text": "My dear,\n\nI never could keep a proper diary. I wrote down the tides, the things that needed mending, and whatever I was afraid I might forget.\n\nYou will find a little of all three in here. Take your time. There is no right way to turn these pages.\n\nWith all my love,\nGran",
+ "speaker": "Mara",
+ "voice": "bf_emma",
+ "speed": 0.82
+ },
+ {
+ "pageId": "cottage.window",
+ "resource": "narration_cottage_window",
+ "text": "The wind has finally gone quiet. I have put the blue cup by the window, where you always liked to sit.\n\nThe latch still sticks. Lift it a little before you turn it. Some things on this island need a gentle hand, not a stronger one.\n\nIf you arrive after dark, there is something in the little drawer beside the hearth.",
+ "speaker": "Mara",
+ "voice": "bf_emma",
+ "speed": 0.82
+ },
+ {
+ "pageId": "cottage.match.memory",
+ "resource": "narration_cottage_match_memory",
+ "text": "You used to insist on lighting the evening lantern yourself. I held the matchbox, and you held your breath.\n\nOnce, you asked how such a little flame could help anyone out at sea.\n\nIt cannot, I told you. But it can help us find the next light.\n\nI kept one dry match in a tin after that. Just in case.",
+ "speaker": "Mara",
+ "voice": "bf_emma",
+ "speed": 0.82
+ },
+ {
+ "pageId": "cottage.folded.note",
+ "resource": "narration_cottage_folded_note",
+ "text": "If the tide has covered the causeway, use the little boat by the harbour steps. The knot looks worse than it is.\n\nTake the lantern. When you reach the bell, ring twice. I will know it is you.\n\nAnd do not let the tea go cold while you are deciding.\n\nLove, Gran",
+ "speaker": "Mara",
+ "voice": "bf_emma",
+ "speed": 0.82
+ },
+ {
+ "pageId": "cottage.lantern.sketch",
+ "resource": "narration_cottage_lantern_sketch",
+ "text": "Your grandfather repaired this handle with a piece of wire and far too much confidence. I wrapped the join so it would not catch your fingers.\n\nPeople notice the flame first. I tend to notice the things that let us carry it.",
+ "speaker": "Mara",
+ "voice": "bf_emma",
+ "speed": 0.82
+ },
+ {
+ "pageId": "cottage.lantern.entry",
+ "resource": "narration_cottage_lantern_entry",
+ "text": "A small flame will not survive the wind. Mara’s next page shows what she carried on her evening rounds.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "cottage.lantern.memory",
+ "resource": "narration_cottage_lantern_memory",
+ "text": "The lantern is soot-black but sound. Its warm circle of light reaches the cottage door. Beneath the handle, Mara has scratched your initials.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "cottage.key.entry",
+ "resource": "narration_cottage_key_entry",
+ "text": "‘Some clues belong to more than one place,’ Mara wrote. Compare the overlapping areas on this page; a shared cell counts in both. A loose floorboard waits by the door.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "cottage.key.memory",
+ "resource": "narration_cottage_key_memory",
+ "text": "A brass key turns up beneath the board. The tag reads ‘harbour store’. Someone prepared for a journey and never quite made it out of the cottage.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "cottage.compass.entry",
+ "resource": "narration_cottage_compass_entry",
+ "text": "The lane has vanished beneath fallen branches. One last page in the cottage points you towards the harbour. Use what the areas share to work out what lies outside them.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "cottage.compass.memory",
+ "resource": "narration_cottage_compass_memory",
+ "text": "The compass needle settles towards the sea. Tucked inside its lid is a note: ‘When the path disappears, keep your bearings.’ You step into the rain.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "cottage.threshold",
+ "resource": "narration_cottage_threshold",
+ "text": "The lantern waits by the door. You fold Gran’s note along its old crease and tuck it beside the harbour key.\n\nOutside, the lane smells of rain. You remember her advice about the latch: lift it a little, then turn.\n\nBeyond the cottage, the path leads down to the water. There is still a light to bring home.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "campaign.4.before",
+ "resource": "narration_campaign_4_before",
+ "text": "The tide has covered the causeway. A shape knocks gently against the harbour steps. Mara’s notebook has a page for this crossing too.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "campaign.4.after",
+ "resource": "narration_campaign_4_after",
+ "text": "The little boat is still tied fast. You bail out the rainwater, set the lantern in the bow, and push away from the steps.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "campaign.5.before",
+ "resource": "narration_campaign_5_before",
+ "text": "The current tugs you towards the outer rocks. Something heavy is tangled beneath the seat. The pattern tells you what to reach for.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "campaign.5.after",
+ "resource": "narration_campaign_5_after",
+ "text": "The anchor catches. The boat swings into calmer water. In the pause, you hear a bell somewhere beyond the fog.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "campaign.6.before",
+ "resource": "narration_campaign_6_before",
+ "text": "You land beneath the lighthouse hill. The old crossing is hidden by reeds. Mara marked its outline long before the storm.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "campaign.6.after",
+ "resource": "narration_campaign_6_after",
+ "text": "The bridge is intact. You cross with the lantern held high. On the far bank, a fresh bootprint tells you someone else has passed this way.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "campaign.7.before",
+ "resource": "narration_campaign_7_before",
+ "text": "A rope hangs from a timber frame. The bell above it has fallen silent. Restore the pattern before you call out across the water.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "campaign.7.after",
+ "resource": "narration_campaign_7_after",
+ "text": "One clear note travels into the fog. Two notes answer from the hill. Someone is waiting at the lighthouse.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "campaign.8.before",
+ "resource": "narration_campaign_8_before",
+ "text": "Mara opens the lighthouse door. ‘I knew you’d find the notebook,’ she says. The storm stopped the turning mechanism. Together, you lay out its scattered parts.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "campaign.8.after",
+ "resource": "narration_campaign_8_after",
+ "text": "The missing gear slips into place. You turn the handle; the mechanism answers with a familiar, steady ticking. Mara smiles without looking up.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "campaign.9.before",
+ "resource": "narration_campaign_9_before",
+ "text": "The great lens is clouded with salt. Mara holds the lantern while you work. The areas overlap like the rings in the glass; compare them carefully.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "campaign.9.after",
+ "resource": "narration_campaign_9_after",
+ "text": "You wipe the last salt from the lens. The lantern’s tiny flame stretches into a bright arc across the walls. Everything is ready.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "campaign.10.before",
+ "resource": "narration_campaign_10_before",
+ "text": "Mara gives you the handle. Below the windows, the island lies dark. This is the pattern all the other pages were leading towards.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "campaign.10.after",
+ "resource": "narration_campaign_10_after",
+ "text": "The beacon turns. Its light sweeps the harbour, the bridge, the little boat. Far offshore, a ship sounds its horn. The island has its light again.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "campaign.11.before",
+ "resource": "narration_campaign_11_before",
+ "text": "Dawn finds you walking back with Mara. There is one blank page at the end of the notebook. ‘That one is yours,’ she says.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ },
+ {
+ "pageId": "campaign.11.after",
+ "resource": "narration_campaign_11_after",
+ "text": "You light the cottage window. Mara puts the kettle on. Beneath your new drawing, you write: ‘No one comes home to an unlit shore.’ The notebook closes. Your watch has begun.",
+ "speaker": "Narrator",
+ "voice": "bm_george",
+ "speed": 0.88
+ }
+]
diff --git a/assets/narration/wav/narration_campaign_10_after.wav b/assets/narration/wav/narration_campaign_10_after.wav
new file mode 100644
index 0000000..27e34ff
Binary files /dev/null and b/assets/narration/wav/narration_campaign_10_after.wav differ
diff --git a/assets/narration/wav/narration_campaign_10_before.wav b/assets/narration/wav/narration_campaign_10_before.wav
new file mode 100644
index 0000000..12e3db0
Binary files /dev/null and b/assets/narration/wav/narration_campaign_10_before.wav differ
diff --git a/assets/narration/wav/narration_campaign_11_after.wav b/assets/narration/wav/narration_campaign_11_after.wav
new file mode 100644
index 0000000..62584a8
Binary files /dev/null and b/assets/narration/wav/narration_campaign_11_after.wav differ
diff --git a/assets/narration/wav/narration_campaign_11_before.wav b/assets/narration/wav/narration_campaign_11_before.wav
new file mode 100644
index 0000000..faad154
Binary files /dev/null and b/assets/narration/wav/narration_campaign_11_before.wav differ
diff --git a/assets/narration/wav/narration_campaign_4_after.wav b/assets/narration/wav/narration_campaign_4_after.wav
new file mode 100644
index 0000000..323268d
Binary files /dev/null and b/assets/narration/wav/narration_campaign_4_after.wav differ
diff --git a/assets/narration/wav/narration_campaign_4_before.wav b/assets/narration/wav/narration_campaign_4_before.wav
new file mode 100644
index 0000000..490f95c
Binary files /dev/null and b/assets/narration/wav/narration_campaign_4_before.wav differ
diff --git a/assets/narration/wav/narration_campaign_5_after.wav b/assets/narration/wav/narration_campaign_5_after.wav
new file mode 100644
index 0000000..fb760da
Binary files /dev/null and b/assets/narration/wav/narration_campaign_5_after.wav differ
diff --git a/assets/narration/wav/narration_campaign_5_before.wav b/assets/narration/wav/narration_campaign_5_before.wav
new file mode 100644
index 0000000..2515425
Binary files /dev/null and b/assets/narration/wav/narration_campaign_5_before.wav differ
diff --git a/assets/narration/wav/narration_campaign_6_after.wav b/assets/narration/wav/narration_campaign_6_after.wav
new file mode 100644
index 0000000..22a965d
Binary files /dev/null and b/assets/narration/wav/narration_campaign_6_after.wav differ
diff --git a/assets/narration/wav/narration_campaign_6_before.wav b/assets/narration/wav/narration_campaign_6_before.wav
new file mode 100644
index 0000000..b877aff
Binary files /dev/null and b/assets/narration/wav/narration_campaign_6_before.wav differ
diff --git a/assets/narration/wav/narration_campaign_7_after.wav b/assets/narration/wav/narration_campaign_7_after.wav
new file mode 100644
index 0000000..d27654c
Binary files /dev/null and b/assets/narration/wav/narration_campaign_7_after.wav differ
diff --git a/assets/narration/wav/narration_campaign_7_before.wav b/assets/narration/wav/narration_campaign_7_before.wav
new file mode 100644
index 0000000..fee8a07
Binary files /dev/null and b/assets/narration/wav/narration_campaign_7_before.wav differ
diff --git a/assets/narration/wav/narration_campaign_8_after.wav b/assets/narration/wav/narration_campaign_8_after.wav
new file mode 100644
index 0000000..b150f4c
Binary files /dev/null and b/assets/narration/wav/narration_campaign_8_after.wav differ
diff --git a/assets/narration/wav/narration_campaign_8_before.wav b/assets/narration/wav/narration_campaign_8_before.wav
new file mode 100644
index 0000000..976ed9a
Binary files /dev/null and b/assets/narration/wav/narration_campaign_8_before.wav differ
diff --git a/assets/narration/wav/narration_campaign_9_after.wav b/assets/narration/wav/narration_campaign_9_after.wav
new file mode 100644
index 0000000..b120d43
Binary files /dev/null and b/assets/narration/wav/narration_campaign_9_after.wav differ
diff --git a/assets/narration/wav/narration_campaign_9_before.wav b/assets/narration/wav/narration_campaign_9_before.wav
new file mode 100644
index 0000000..cf6e76b
Binary files /dev/null and b/assets/narration/wav/narration_campaign_9_before.wav differ
diff --git a/assets/narration/wav/narration_cottage_compass_entry.wav b/assets/narration/wav/narration_cottage_compass_entry.wav
new file mode 100644
index 0000000..ed037c2
Binary files /dev/null and b/assets/narration/wav/narration_cottage_compass_entry.wav differ
diff --git a/assets/narration/wav/narration_cottage_compass_memory.wav b/assets/narration/wav/narration_cottage_compass_memory.wav
new file mode 100644
index 0000000..36de2fe
Binary files /dev/null and b/assets/narration/wav/narration_cottage_compass_memory.wav differ
diff --git a/assets/narration/wav/narration_cottage_key_entry.wav b/assets/narration/wav/narration_cottage_key_entry.wav
new file mode 100644
index 0000000..fa0a84e
Binary files /dev/null and b/assets/narration/wav/narration_cottage_key_entry.wav differ
diff --git a/assets/narration/wav/narration_cottage_key_memory.wav b/assets/narration/wav/narration_cottage_key_memory.wav
new file mode 100644
index 0000000..3107d8c
Binary files /dev/null and b/assets/narration/wav/narration_cottage_key_memory.wav differ
diff --git a/assets/narration/wav/narration_cottage_lantern_entry.wav b/assets/narration/wav/narration_cottage_lantern_entry.wav
new file mode 100644
index 0000000..8c5708f
Binary files /dev/null and b/assets/narration/wav/narration_cottage_lantern_entry.wav differ
diff --git a/assets/narration/wav/narration_cottage_lantern_memory.wav b/assets/narration/wav/narration_cottage_lantern_memory.wav
new file mode 100644
index 0000000..9d91399
Binary files /dev/null and b/assets/narration/wav/narration_cottage_lantern_memory.wav differ
diff --git a/assets/narration/wav/narration_cottage_threshold.wav b/assets/narration/wav/narration_cottage_threshold.wav
new file mode 100644
index 0000000..fd52ee8
Binary files /dev/null and b/assets/narration/wav/narration_cottage_threshold.wav differ
diff --git a/assets/notebook.json b/assets/notebook.json
new file mode 100644
index 0000000..1bf5aab
--- /dev/null
+++ b/assets/notebook.json
@@ -0,0 +1,124 @@
+{
+ "chapterId": "cottage",
+ "pages": [
+ {
+ "id": "cottage.dedication",
+ "title": "For you, when you are ready",
+ "type": "dedication",
+ "speaker": "Mara",
+ "textSource": "recording"
+ },
+ {
+ "id": "cottage.window",
+ "title": "By the cottage window",
+ "type": "entry",
+ "speaker": "Mara",
+ "campaignIndex": 0,
+ "textSource": "recording",
+ "illustrationAsset": "assets/artwork/cottage-vignette-v1.png"
+ },
+ {
+ "id": "cottage.match.puzzle",
+ "title": "A spark in the drawer",
+ "type": "puzzle",
+ "campaignIndex": 0
+ },
+ {
+ "id": "cottage.match.memory",
+ "title": "One small light",
+ "type": "memory",
+ "speaker": "Mara",
+ "campaignIndex": 0,
+ "textSource": "recording"
+ },
+ {
+ "id": "cottage.folded.note",
+ "title": "A note I nearly forgot",
+ "type": "note",
+ "speaker": "Mara",
+ "textSource": "recording"
+ },
+ {
+ "id": "cottage.lantern.sketch",
+ "title": "The handle, carefully mended",
+ "type": "inspection",
+ "speaker": "Mara",
+ "campaignIndex": 1,
+ "textSource": "recording"
+ },
+ {
+ "id": "cottage.lantern.entry",
+ "title": "Something to carry the flame",
+ "type": "entry",
+ "speaker": "Narrator",
+ "campaignIndex": 1,
+ "textSource": "before"
+ },
+ {
+ "id": "cottage.lantern.puzzle",
+ "title": "Something to carry the flame",
+ "type": "puzzle",
+ "campaignIndex": 1
+ },
+ {
+ "id": "cottage.lantern.memory",
+ "title": "A light at the door",
+ "type": "memory",
+ "speaker": "Narrator",
+ "campaignIndex": 1,
+ "textSource": "after"
+ },
+ {
+ "id": "cottage.key.entry",
+ "title": "Under the loose floorboard",
+ "type": "entry",
+ "speaker": "Narrator",
+ "campaignIndex": 2,
+ "textSource": "before"
+ },
+ {
+ "id": "cottage.key.puzzle",
+ "title": "Under the loose floorboard",
+ "type": "puzzle",
+ "campaignIndex": 2
+ },
+ {
+ "id": "cottage.key.memory",
+ "title": "A journey kept ready",
+ "type": "memory",
+ "speaker": "Narrator",
+ "campaignIndex": 2,
+ "textSource": "after"
+ },
+ {
+ "id": "cottage.compass.entry",
+ "title": "A direction in the dark",
+ "type": "entry",
+ "speaker": "Narrator",
+ "campaignIndex": 3,
+ "textSource": "before"
+ },
+ {
+ "id": "cottage.compass.puzzle",
+ "title": "A direction in the dark",
+ "type": "puzzle",
+ "campaignIndex": 3
+ },
+ {
+ "id": "cottage.compass.memory",
+ "title": "Keep your bearings",
+ "type": "memory",
+ "speaker": "Narrator",
+ "campaignIndex": 3,
+ "textSource": "after"
+ },
+ {
+ "id": "cottage.threshold",
+ "title": "Before you leave",
+ "type": "closing",
+ "speaker": "Narrator",
+ "campaignIndex": 3,
+ "text": "The lantern waits by the door. You fold Gran’s note along its old crease and tuck it beside the harbour key.\n\nOutside, the lane smells of rain. You remember her advice about the latch: lift it a little, then turn.\n\nBeyond the cottage, the path leads down to the water. There is still a light to bring home."
+ }
+ ]
+}
diff --git a/docs/CODE_MAP.md b/docs/CODE_MAP.md
index 69619d1..1a96514 100644
--- a/docs/CODE_MAP.md
+++ b/docs/CODE_MAP.md
@@ -31,7 +31,7 @@ lib/
├── main.dart LumenApp, Notebook, all screen builders, dialogs, routing
├── domain/
│ ├── puzzle.dart Puzzle, JavaRandom, LogicSolver, Difficulty, Region, Hint
-│ ├── book.dart Book, CampaignLevel, StoryPage — loads authored content
+│ ├── book.dart Book, CampaignLevel, StoryPage/StoryPageType — loads authored content
│ └── game.dart Game (ChangeNotifier), Screen/Mode, puzzle session, awards
├── services/
│ ├── progress.dart Progress — typed façade over SharedPreferencesAsync
@@ -43,16 +43,17 @@ lib/
assets/
├── campaign.json premise + 12 authored levels (chapter/title/object/before/after/picture/clues/areas; optional illustrationAsset)
+├── notebook.json sixteen stable cottage leaf records (type, speaker, campaignIndex, text source)
├── narration/scripts.json canonical diary text, one record per recorded page
├── narration/manifest.json source masters and checksums for narration
├── audio/narration_manifest.json runtime tracks: file, duration, cue timings
-├── audio/*.wav five bundled PCM16 readings (APK runtime assets)
+├── audio/*.wav 28 bundled PCM16 recordings (APK runtime assets)
├── audio/*.flac archival lossless exports (not declared in pubspec)
├── artwork/*.png watercolours, vignettes and the notebook page
└── fonts/DancingScript.ttf bundled as family MaraHand; OFL.txt ships with licences
-test/puzzle_test.dart 8 domain tests (Java parity, generation, solver, awards, restore)
-test/widget_test.dart 6 widget tests (page gestures, scrolling, landscape layout)
+test/puzzle_test.dart 11 domain tests (Java parity, generation, solver, awards, restore)
+test/widget_test.dart 9 widget tests (page gestures, scrolling, landscape layout)
test/fixtures/java_boards.json 40 reference boards from the Java 1.7 version
integration_test/notebook_test.dart one on-device end-to-end test (QA flavour only)
scripts/ narration verification, install smoke check, narration rendering
@@ -86,6 +87,7 @@ flowchart TD
game --> progress
book --> puzzle
book --> campaign[("assets/campaign.json")]
+ book --> notebook[("assets/notebook.json")]
book --> scripts[("assets/narration/scripts.json")]
narrator --> manifest[("assets/audio/narration_manifest.json")]
narrator --> wav[("assets/audio/*.wav")]
@@ -129,11 +131,11 @@ stateDiagram-v2
[*] --> home
home --> story: openNotebook / showStory
home --> game: startDaily or startPractice
- story --> story: turn within 0..5
+ story --> story: turn within sixteen cottage leaves
story --> contents: Contents
story --> home: Close book
story --> briefing: leaf 6 lantern link
- contents --> story: opening leaf or bookmark
+ contents --> story: cottage entry, memory or bookmark
contents --> briefing: accessible campaign entry
contents --> reveal: recovered campaign entry
contents --> home: Close the notebook
@@ -153,8 +155,8 @@ stateDiagram-v2
| Screen | Builder in `_NotebookState` | Leaf key | Content | `onTurn` |
| --- | --- | --- | --- | --- |
| `home` | `home()` | none (own `Scaffold` body) | Harbour art, notebook cover, daily ritual, difficulty, rules, privacy, licences | none |
-| `story` | `story()` | `story-` | Six opening leaves: dedication, cottage, match puzzle, memory, folded note, lantern | `turn()` |
-| `contents` | `contents()` | `contents` | Dedication, opening-leaf links, ribbon bookmark, twelve campaign entries with access state, premise | none |
+| `story` | `story()` | `story-` | Sixteen cottage leaves: dedication, four entry/puzzle/memory beats, note, inspection, closing | `turn()` |
+| `contents` | `contents()` | `contents-` | Four chapter entries, ribbon bookmark, reading resume and optional cottage scraps; chapter navigation | none |
| `briefing` | `briefing()` | `briefing-` | Chapter, title, `before` passage, "Restore the pattern →" | `turnCampaign()` |
| `game` | `game()` | `game-` | Puzzle heading, area totals, square board, hint/undo, actions | `turnCampaign()` in campaign mode only |
| `reveal` | `reveal()` | `reveal-` | Object name, watercolour (or `PixelPicture` fallback), `after` passage, ending text on level 12 | `turnCampaign()` |
@@ -165,16 +167,17 @@ stateDiagram-v2
| --- | --- |
| `home()` | `Screen.home`; cancels pending board generation |
| `openNotebook()` | `showStory(index of notebook_last_page, else 0)` |
-| `showStory(i)` | Clamp `i` to 0–5, `mode = campaign`, `campaignIndex = 0`; on `i == 2` load `book.levels[0]` under key `story_v1_0` unless already loaded; persist last page and `viewed_`; `Screen.story` |
-| `contents()` | `Screen.contents` |
-| `briefing(i)` | Clamp to `accessible`, `Screen.briefing` |
-| `reveal(i, {readAhead})` | Redirect to `briefing(i)` unless recovered, or read-ahead is allowed for an accessible level; otherwise `Screen.reveal` |
-| `startCampaign(i)` | No-op if `i > accessible`; recovered levels go to `reveal`; else load `book.levels[i]` under `story_v1_` and open `Screen.game` |
+| `showStory(i)` | Clamp `i` to available pages; set campaign mode and the record’s campaign index; on a puzzle leaf load its `story_v1_` unless already loaded; persist last page and `viewed_`; `Screen.story` |
+| `contents([chapter])` | One chapter’s four entries; persist `notebook_contents_chapter`; default to current campaign chapter |
+| `leaveCottage()` | Open Chapter II for reading without awarding unfinished cottage puzzles |
+| `briefing(i)` | Clamp to `accessible`; cottage entry leaf or later `Screen.briefing` |
+| `reveal(i, {readAhead})` | Redirect to `briefing(i)` unless recovered, or read-ahead is allowed for an accessible level; otherwise the cottage memory leaf or later `Screen.reveal` |
+| `startCampaign(i)` | No-op if `i > accessible`; recovered levels go to `reveal`; else load `book.levels[i]` under `story_v1_` and open the cottage puzzle leaf or later `Screen.game` |
| `startDaily(day)` | Load `Puzzle.seeded(epochDay(date) * 7919)` under `d`; `Screen.game` |
| `startPractice([level])` | Generate 5×5 board off the UI isolate with `compute(generatePractice)`; key `v2__`; `Screen.game` |
| `mark(i)` / `undo()` / `area(i)` | Cycle a cell 0→1→2→0, restore the previous snapshot, select an A/B/C area |
| `applyHint()` | Return one explained `Hint` and apply it (prefers detecting a conflicting earlier mark) |
-| `check()` | Award completion exactly once; campaign solve advances to story leaf 3 or the reveal; classic levels advance; daily updates the streak |
+| `check()` | Award completion exactly once; cottage solves advance to the matching memory record; later solves advance to the reveal; classic levels advance; daily updates the streak |
| `restore()` | Re-open the saved screen (`flutter_screen`), including read-ahead reveals and unfinished campaign/classic boards |
### `main.dart` internal map
@@ -265,10 +268,11 @@ All writes go through `Progress.set` (memory is updated synchronously, disk is w
| Key | Type | Written by | Purpose |
| --- | --- | --- | --- |
-| `notebook_last_page` | page id | `Game.showStory` | Resume the last opening leaf |
+| `notebook_last_page` | page id | `Game.showStory` | Resume the last cottage leaf |
+| `notebook_contents_chapter` | int 0–2 | `Game.contents` | Restored chapter contents leaf |
| `notebook_manual_bookmark` | page id | `bookmark()` | "Return to my ribbon bookmark" in Contents |
| `notebook_note_open` | bool | folded-note leaf | Note unfolded/folded state |
-| `notebook_handle_seen` | bool | `inspect()` | Lantern handle discovered |
+| `notebook_handle_seen` | bool | `inspect()` | Repair margin note read; never reveals pre-puzzle artwork |
| `notebook_read_ahead` | bool | `turn()` | Written when leaving the unsolved story puzzle; currently no reader |
| `viewed_` | bool | `Game.showStory` | Written per visited leaf; currently no reader |
@@ -286,7 +290,7 @@ All writes go through `Progress.set` (memory is updated synchronously, disk is w
| `lastDaily` | int (epoch day) | daily completion | Streak bookkeeping |
| `streak` | int | daily completion | Consecutive daily completions |
| `campaignUnlocked` | int 0–11 | campaign completion | Furthest solved campaign level |
-| `story_access_level` | int 0–11 | `nextCampaign`, leaf 6 link | Furthest readable campaign level (independent of awards) |
+| `story_access_level` | int 0–11 | `nextCampaign`, `leaveCottage` | Furthest readable campaign level; effective access is at least 3 for cottage exploration, independent of awards |
| `storyAd_` | bool | `nextCampaign` | At most one interstitial per fourth campaign step |
| `recording_speed` | double | speed dialog | `0.85`, `1.0` or `1.15` |
@@ -299,14 +303,21 @@ Board key formats (``):
## Content and assets
- `assets/campaign.json`: `{ premise, levels: [{ chapter, title, object, before, after, picture, clues, areas, illustrationAsset? }] }`. `picture` is 49 characters of `0`/`1` (7×7, row-major). `clues` is a comma-separated list of forced-given indices. `areas` is `top,left,height,width` rectangles separated by `;` (labels A, B, C… in order).
-- `assets/narration/scripts.json`: canonical diary text, one record per recorded page (`pageId`, `text`). `Book.load()` matches the six fixed page ids and titles; a missing script yields empty text.
+- `assets/notebook.json`: sixteen ordered records with stable `id`, `type`, `title`, optional `campaignIndex`, `speaker`, `illustrationAsset` and `textSource` (`recording`, `before`, `after`) or inline `text`. `Book.pageFor()` finds a campaign entry/puzzle/memory. Preserve the first six IDs when extending the chapter.
+- Cottage `briefing`, `startCampaign` and `reveal` route to the entry, puzzle or memory leaf for levels 0–3. This migrates older saved routes while retaining marks, hint keys and completion awards. Chapters II/III use the existing screens.
+- `assets/narration/scripts.json`: canonical diary text, one record per recorded page (`pageId`, `text`). `Book.load()` resolves `recording` text by stable page ID; a missing script yields empty text.
- `assets/narration/manifest.json`: source masters, text hashes, WAV/FLAC hashes and cues — the provenance record.
- `assets/audio/narration_manifest.json`: runtime `{ tracks: { pageId: { file, durationMs, cues: [{ startMs, endMs, text }] } } }`. `Narrator` plays `assets/audio/`.
-- Five recordings exist: `cottage.dedication`, `cottage.window`, `cottage.match.memory`, `cottage.folded.note`, `cottage.lantern.sketch`. The match-puzzle leaf has no recording.
+- Five Mara recordings exist: `cottage.dedication`, `cottage.window`, `cottage.match.memory`, `cottage.folded.note`, `cottage.lantern.sketch`. The match-puzzle leaf has no recording.
+- Twenty-three narrator tracks use `bm_george`: seven cottage prose leaves and `campaign.<4..11>.before/after`. `scripts.json` records speaker/voice/speed; the renderer accepts `--speaker Narrator` to preserve Mara’s original takes. The asset checker validates narrator scripts against notebook/campaign text.
+- `audio()` uses the story ID or `campaign..before/after`, with a visible speaker label. Never show a recording control for an ID without a bundled track.
+- `discoveryArt()` returns only a text placeholder until `Game.recovered(index)` is true. This gates both watercolours and pixel fallbacks; entry, inspection and closing leaves never call it, regardless of completed progress. The helper also rejects calls outside a memory/reveal screen. The repair note uses a text action rather than a picture hotspot; completed saves must not re-enable artwork on earlier leaves. Contextual cottage/background art is separate from the discovery images.
+- The `check` Android flavor (`com.lumen.daily.check`) isolates device automation from the user’s installed QA app and progress.
- WAV is the runtime format because FLAC advanced its clock without an audio track on the API 26 Huawei tablet used for testing. FLAC files remain as archives but are not listed in `pubspec.yaml`, so they are not bundled.
- Artwork: `mara-single-page-v2.png` (page), `home-harbour-v2.png`, `home-notebook-cover-v2.png`, `cottage-vignette-v1.png`, `lantern-vignette-v1.png`, `harbour-bell-vignette-v1.png`, plus `match`, `brass-key`, `compass`, `little-boat`, `anchor`, `stone-bridge`, `missing-gear`, `beacon-lens`, `lighthouse` and `home` (each `-vignette-v1.png`); prompts and provenance live beside each file.
- Campaign reveals use optional `CampaignLevel.illustrationAsset` paths from campaign JSON. All twelve discoveries have watercolours; absent or unloadable image assets fall back to `PixelPicture`. The opening match memory shares the first campaign illustration through `discoveryArt()`. No puzzle identity or progress keys change.
- Font: `assets/fonts/DancingScript.ttf` registered as `MaraHand`; `assets/fonts/OFL.txt` is registered with `LicenseRegistry` in `main()`.
+- `android/app/src/qa/AndroidManifest.xml` opts the isolated QA package into external installation (`preferExternal`); the production manifest keeps its existing installation policy. Android/OEM support still determines whether an SD-card install is accepted. The review Huawei reports `sm has-adoptable=false` and rejects new ASEC installs; use a compact release build installed internally there.
- `pubspec.yaml` lists every bundled asset explicitly (no directory globs), so new assets must be added there.
### Audio flow
@@ -332,6 +343,7 @@ Board key formats (``):
| `test/puzzle_test.dart` | 40 Java reference boards (signed 64-bit seeds), 300 graded boards, solver counts vs. exhaustive search, campaign uniqueness/no-guess, streaks, fresh progress, read-ahead, daily awards and practice levels |
| `test/widget_test.dart` | Page swipes vs. grid drags, swipes over text/blank paper, vertical scrolling and cancelled drags, small/landscape/1.5× text, landscape two-column puzzle leaf, illustrated campaign reveals and pixel fallback at 1.5× text |
| `integration_test/notebook_test.dart` | On-device QA flow: six leaves, real WAV playback and pause/resume, bookmarks/discoveries, match and lantern solves, exactly-once awards, QA disk round-trip, screenshots |
+| `integration_test/cottage_test.dart` | All sixteen leaves, larger-text portrait/landscape, bookmarks, legacy-key marks, all four awards, all 23 narrator tracks and isolated test persistence; eight screenshots |
| `integration_test/discovery_art_test.dart` | QA tablet screenshots of all twelve discoveries and the opening match memory, portrait/landscape at 1.5× text; checks reachable controls and unchanged awards |
| `scripts/check_narration_assets.py` | Script text ↔ manifest ↔ WAV masters checksums |
| `scripts/check_flutter_install.py` | Read-only installed-app smoke check and screenshots |
@@ -386,7 +398,7 @@ Each run checks four discoveries in both orientations at 1.5× text, including n
| Goal | Touch | Also |
| --- | --- | --- |
| Edit campaign content or pictures | `assets/campaign.json` | Re-run `flutter test` (uniqueness/no-guess campaign tests) and `scripts/check_narration_assets.py` only if text changes |
-| Add or reorder opening leaves | `_NotebookState.story()` switch, `Book` page ids/titles, `assets/narration/scripts.json` | Add a WAV + manifests + `pubspec.yaml` if narrated; update integration test |
+| Add or reorder cottage leaves | `assets/notebook.json`, `StoryPageType` builders, `Book.pageFor()`, narration scripts if recorded | Add a WAV + manifests + `pubspec.yaml` if narrated; update integration test |
| Add a screen | `Screen` enum, `Game._route`/navigation method, `_NotebookState.build` switch, new builder | Back-button behaviour in `back()` and `PopScope` |
| Change puzzle rules, hints or grading | `lib/domain/puzzle.dart` (`Constraint`, `LogicSolver`, `Puzzle`) | `test/puzzle_test.dart`, `Game.applyHint`, board semantics |
| Change marks, undo, hints or awards | `lib/domain/game.dart` (`mark`, `undo`, `applyHint`, `check`) | `_NotebookState.hint()`, `puzzleNotes()`, widget tests |
@@ -403,7 +415,7 @@ Each run checks four discoveries in both orientations at 1.5× text, including n
- **`pumpAndSettle` can struggle with the full app.** Prefer a bounded `pump()` loop when mounting `LumenApp`; the audio streams keep notifying and may prevent settling.
- **`Game.restore()` must be awaited before `runApp`.** Otherwise the app opens on `home` and ignores the saved screen.
- **Story page 3 is index 2.** Solving the opening match puzzle awards the first campaign entry (`story_v1_0`) and jumps to story page 4 (`showStory(3)`), skipping the campaign reveal.
-- **`showStory()` resets `mode` to campaign and `campaignIndex` to 0.** Daily and classic starts set their own mode afterwards; keep that order.
+- **`showStory()` sets campaign mode and the page record’s campaign index (0 if absent).** Daily and classic starts set their own mode afterwards; keep that order.
- **`startPractice` discards stale results** with `_request`. Do not remove that guard when refactoring.
- **Hints are applied immediately.** `Game.applyHint()` writes a mark and pushes an undo snapshot; the free/ad gate lives in `_NotebookState.hint()` via `hint_`, not in the domain.
- **Read-ahead never bypasses access.** `reveal(i, readAhead: true)` still redirects when `i > accessible`.
diff --git a/integration_test/cottage_test.dart b/integration_test/cottage_test.dart
new file mode 100644
index 0000000..425f309
--- /dev/null
+++ b/integration_test/cottage_test.dart
@@ -0,0 +1,191 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_test/flutter_test.dart';
+import 'package:integration_test/integration_test.dart';
+import 'package:lumen/domain/book.dart';
+import 'package:lumen/domain/game.dart';
+import 'package:lumen/main.dart';
+import 'package:lumen/services/progress.dart';
+import 'package:lumen/services/narrator.dart';
+
+void main() {
+ final binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized();
+ testWidgets('complete cottage chapter, bookmarks and larger-text rotation', (
+ tester,
+ ) async {
+ expect(const bool.fromEnvironment('QA_TEST'), true);
+ final book = await Book.load();
+ final game = Game(book, Progress.memory());
+ final voice = Narrator(book.tracks);
+ for (final id in book.tracks.keys.where(
+ (id) => book.tracks[id]['speaker'] == 'Narrator',
+ )) {
+ await voice.toggle(id, 1);
+ await Future.delayed(const Duration(milliseconds: 900));
+ await voice.pause();
+ expect(voice.error, isEmpty, reason: id);
+ expect(voice.position.inMilliseconds, greaterThan(200), reason: id);
+ await voice.stop();
+ }
+ voice.dispose();
+ addTearDown(() => SystemChrome.setPreferredOrientations([]));
+ await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
+ game.showStory(0);
+ await tester.pumpWidget(
+ MaterialApp(
+ theme: ThemeData(fontFamily: 'MaraHand'),
+ home: Builder(
+ builder: (context) => MediaQuery(
+ data: MediaQuery.of(context)
+ .copyWith(textScaler: const TextScaler.linear(1.5)),
+ child: Notebook(game: game, adsEnabled: false),
+ ),
+ ),
+ ),
+ );
+ await tester.pumpAndSettle();
+ await binding.convertFlutterSurfaceToImage();
+ Future tap(String label) async {
+ await tester.ensureVisible(find.text(label));
+ await tester.pumpAndSettle();
+ await tester.tap(find.text(label));
+ await tester.pumpAndSettle();
+ }
+
+ for (var i = 0; i < book.pages.length; i++) {
+ expect(game.storyIndex, i);
+ final page = book.pages[i];
+ if (page.campaignIndex case final index?) {
+ expect(
+ find.image(AssetImage(book.levels[index].illustrationAsset!)),
+ findsNothing,
+ );
+ }
+ if (page.speaker == 'Narrator') {
+ expect(find.text('Narrator · recorded story'), findsOneWidget);
+ }
+ if (page.type == StoryPageType.puzzle) {
+ final cell = game.puzzle!.given.indexOf(false);
+ final target = find.byKey(ValueKey('cell-$cell'));
+ await tester.ensureVisible(target);
+ await tester.pumpAndSettle();
+ await tester.tap(target);
+ await tester.pumpAndSettle();
+ final marks = List.of(game.cells);
+ await tap('Bookmark');
+ final savedId = game.progress.text('notebook_manual_bookmark');
+ expect(savedId, page.id);
+ final restored = Game(book, Progress.memory(game.progress.snapshot));
+ await restored.restore();
+ expect(restored.storyPage.id, page.id);
+ expect(restored.cells, marks);
+ }
+ if ([6, 10, 14, 15].contains(i)) {
+ await tester.ensureVisible(find.text(page.title));
+ await tester.pumpAndSettle();
+ await binding.takeScreenshot('cottage-$i-portrait');
+ }
+ expect(tester.takeException(), isNull, reason: page.id);
+ await tap(
+ i == book.pages.length - 1 ? 'Across the tide →' : 'Next leaf →',
+ );
+ if (page.type == StoryPageType.puzzle) await tap('Read ahead');
+ expect(game.solved, 0);
+ }
+ expect(game.screen, Screen.briefing);
+ expect(game.campaignIndex, 4);
+ await tester.drag(find.text('At the water’s edge'), const Offset(170, 0));
+ await tester.pumpAndSettle();
+ expect(game.storyPage.type, StoryPageType.closing);
+ expect(game.screen, Screen.story);
+ game.contents(0);
+ await tester.pumpAndSettle();
+ await binding.takeScreenshot('cottage-contents-portrait');
+ await tap('Return to my ribbon bookmark');
+ expect(game.storyPage.id, 'cottage.compass.puzzle');
+ final marks = List.of(game.cells);
+ await SystemChrome.setPreferredOrientations([
+ DeviceOrientation.landscapeLeft,
+ ]);
+ for (
+ var attempt = 0;
+ attempt < 20 &&
+ tester.view.physicalSize.width < tester.view.physicalSize.height;
+ attempt++
+ ) {
+ await tester.pump(const Duration(milliseconds: 100));
+ }
+ await tester.pumpAndSettle();
+ expect(
+ tester.view.physicalSize.width,
+ greaterThan(tester.view.physicalSize.height),
+ );
+ expect(game.cells, marks);
+ await tester.ensureVisible(find.text('Hint · free'));
+ await tester.pumpAndSettle();
+ expect(find.text('Hint · free').hitTestable(), findsOneWidget);
+ final lastCell = tester.getRect(find.byKey(const ValueKey('cell-48')));
+ expect(
+ lastCell.bottom,
+ lessThan(tester.getTopLeft(find.text('Contents')).dy),
+ );
+ await binding.takeScreenshot('cottage-compass-landscape');
+ for (var i = 0; i < 4; i++) {
+ game.showStory(book.pageFor(i, StoryPageType.puzzle));
+ final solution = List.of(game.puzzle!.solution);
+ for (var c = 0; c < solution.length; c++) {
+ while (game.cells[c] != (solution[c] == 1 ? 1 : 2)) {
+ game.mark(c);
+ }
+ }
+ expect(game.storyPage.type, StoryPageType.memory);
+ expect(game.campaignIndex, i);
+ expect(game.solved, i + 1);
+ await tester.pumpAndSettle();
+ expect(
+ find.image(AssetImage(book.levels[i].illustrationAsset!)),
+ findsOneWidget,
+ );
+ game.showStory(book.pageFor(i, StoryPageType.puzzle));
+ game.check();
+ expect(game.solved, i + 1);
+ }
+ for (final index in [5, 6, 9, 12, 15]) {
+ game.showStory(index);
+ await tester.pumpAndSettle();
+ for (final level in book.levels) {
+ expect(
+ find.image(AssetImage(level.illustrationAsset!)),
+ findsNothing,
+ reason:
+ 'Completed progress must not reveal art on ${game.storyPage.id}',
+ );
+ }
+ }
+ game.showStory(6);
+ await tester.pumpAndSettle();
+ await binding.takeScreenshot('cottage-revisit-entry-landscape');
+ game.showStory(8);
+ await tester.pumpAndSettle();
+ expect(
+ find.image(AssetImage(book.levels[1].illustrationAsset!)),
+ findsOneWidget,
+ );
+ await binding.takeScreenshot('cottage-discovery-landscape');
+ game.contents(0);
+ await tester.pumpAndSettle();
+ final disk = await Progress.load();
+ for (final entry in game.progress.snapshot.entries) {
+ await disk.set(entry.key, entry.value);
+ }
+ await disk.flushed;
+ final restarted = Game(book, await Progress.load());
+ await restarted.restore();
+ expect(restarted.screen, Screen.contents);
+ expect(restarted.contentsChapter, 0);
+ expect(restarted.solved, 4);
+ expect(tester.takeException(), isNull);
+ await tester.pumpWidget(const SizedBox());
+ await tester.pumpAndSettle();
+ });
+}
diff --git a/integration_test/discovery_art_test.dart b/integration_test/discovery_art_test.dart
index b4403a4..534e297 100644
--- a/integration_test/discovery_art_test.dart
+++ b/integration_test/discovery_art_test.dart
@@ -19,7 +19,13 @@ void main() {
// in reportData at once exhausts the tablet when the driver encodes JSON.
const chapter = int.fromEnvironment('ART_CHAPTER', defaultValue: 0);
expect(chapter, inInclusiveRange(0, 2));
- final game = Game(book, Progress.memory({'story_access_level': 11}));
+ final game = Game(
+ book,
+ Progress.memory({
+ 'story_access_level': 11,
+ for (var i = 0; i < 12; i++) 'done_story_v1_$i': true,
+ }),
+ );
addTearDown(() => SystemChrome.setPreferredOrientations([]));
await binding.convertFlutterSurfaceToImage();
for (final orientation in [
@@ -54,7 +60,11 @@ void main() {
'discovery-$index-${orientation.name}-art',
);
final next = find.text(
- index == 11 ? 'Return to the notebook' : 'Turn the page →',
+ index < 4
+ ? 'Next leaf →'
+ : index == 11
+ ? 'Return to the notebook'
+ : 'Turn the page →',
);
await tester.ensureVisible(next);
await tester.pumpAndSettle();
diff --git a/integration_test/notebook_test.dart b/integration_test/notebook_test.dart
index 67bf316..2e86d4f 100644
--- a/integration_test/notebook_test.dart
+++ b/integration_test/notebook_test.dart
@@ -118,14 +118,13 @@ void main() {
await tap('Bookmark');
await tap('Next leaf →');
await shot('06-lantern');
- await tester.tap(
+ expect(
find.bySemanticsLabel(
'Watercolour of Mara’s blue storm lantern. Tap to examine the repaired handle.',
),
+ findsNothing,
);
- await tester.pumpAndSettle();
- await tap('Keep that thought');
- expect(store.flag('notebook_handle_seen'), true);
+ expect(store.flag('notebook_handle_seen'), false);
await tap('Contents');
await tap('Return to my ribbon bookmark');
expect(g.storyIndex, 4);
@@ -151,9 +150,9 @@ void main() {
g.showStory(5);
await tester.pumpAndSettle();
await tap('Follow the lantern into the next entry →');
- expect(g.screen, Screen.briefing);
- await tap('Restore the pattern →');
- expect(g.screen, Screen.game);
+ expect(g.storyIndex, 6);
+ await tap('Turn to the pattern →');
+ expect(g.storyIndex, 7);
final lantern = g.puzzle!;
for (var i = 0; i < 49; i++) {
while (g.cells[i] != (lantern.solution[i] == 1 ? 1 : 2)) {
@@ -161,9 +160,17 @@ void main() {
}
}
await tester.pumpAndSettle();
- expect(g.screen, Screen.reveal);
+ expect(g.storyIndex, 8);
expect(g.solved, 2);
await shot('07-campaign-reveal');
+ g.showStory(5);
+ await tester.pumpAndSettle();
+ await tap('Read Gran’s margin note');
+ await tap('Keep that thought');
+ expect(store.flag('notebook_handle_seen'), true);
+ g.showStory(8);
+ await tester.pumpAndSettle();
+
// The later campaign leaves need swipes too, including read-ahead.
Future swipeWriting(String text, double dx) async {
final target = find.text(text);
@@ -172,38 +179,29 @@ void main() {
await tester.pumpAndSettle();
}
- await swipeWriting('The lantern', 170);
- expect(g.screen, Screen.briefing);
- await swipeWriting('Something to carry the flame', -170);
- expect(g.screen, Screen.reveal);
- await swipeWriting('The lantern', -170);
- expect(g.screen, Screen.briefing);
- expect(g.campaignIndex, 2);
+ await swipeWriting('A light at the door', -170);
+ expect(g.storyIndex, 9);
await swipeWriting('Under the loose floorboard', -170);
- expect(g.screen, Screen.game);
+ expect(g.storyIndex, 10);
await tester.ensureVisible(find.byKey(const ValueKey('cell-0')));
await tester.tap(find.byKey(const ValueKey('cell-0')));
await tester.pumpAndSettle();
final keyMarks = List.of(g.cells);
await swipeWriting('Under the loose floorboard', -170);
await tap('Keep solving');
- expect(g.screen, Screen.game);
+ expect(g.storyIndex, 10);
await swipeWriting('Under the loose floorboard', -170);
await tap('Read ahead');
- expect(g.screen, Screen.reveal);
+ expect(g.storyIndex, 11);
expect(g.recovered(2), false);
expect(g.solved, 2);
await shot('08-campaign-read-ahead');
- await swipeWriting('The brass key', -170);
- expect(g.screen, Screen.briefing);
- expect(g.campaignIndex, 3);
+ await swipeWriting('A journey kept ready', -170);
+ expect(g.storyIndex, 12);
await swipeWriting('A direction in the dark', 170);
- expect(g.screen, Screen.reveal);
- expect(g.campaignIndex, 2);
- await swipeWriting('The brass key', 170);
- expect(g.screen, Screen.briefing);
- await swipeWriting('Under the loose floorboard', -170);
- expect(g.screen, Screen.game);
+ expect(g.storyIndex, 11);
+ await swipeWriting('A journey kept ready', 170);
+ expect(g.storyIndex, 10);
expect(g.cells, keyMarks);
expect(g.solved, 2);
// Exercise real plugin persistence without touching main-app data.
diff --git a/lib/domain/book.dart b/lib/domain/book.dart
index b348c5b..f8db904 100644
--- a/lib/domain/book.dart
+++ b/lib/domain/book.dart
@@ -38,9 +38,31 @@ class CampaignLevel {
}
}
+enum StoryPageType {
+ dedication,
+ entry,
+ puzzle,
+ memory,
+ note,
+ inspection,
+ closing,
+}
+
class StoryPage {
- const StoryPage(this.id, this.title, this.text);
+ const StoryPage(
+ this.id,
+ this.title,
+ this.text, {
+ this.type = StoryPageType.entry,
+ this.campaignIndex,
+ this.speaker = '',
+ this.illustrationAsset,
+ });
final String id, title, text;
+ final StoryPageType type;
+ final int? campaignIndex;
+ final String speaker;
+ final String? illustrationAsset;
}
class Book {
@@ -49,6 +71,9 @@ class Book {
final List levels;
final List pages;
final Map tracks;
+ int pageFor(int campaignIndex, StoryPageType type) => pages.indexWhere(
+ (p) => p.campaignIndex == campaignIndex && p.type == type,
+ );
static Future load() async {
final campaign = jsonDecode(
await rootBundle.loadString('assets/campaign.json'),
@@ -63,37 +88,38 @@ class Book {
),
)['tracks']
as Map;
- const ids = [
- 'cottage.dedication',
- 'cottage.window',
- 'cottage.match.puzzle',
- 'cottage.match.memory',
- 'cottage.folded.note',
- 'cottage.lantern.sketch',
- ];
- const titles = [
- 'For you, when you are ready',
- 'By the cottage window',
- 'A spark in the drawer',
- 'One small light',
- 'A note I nearly forgot',
- 'The handle, carefully mended',
- ];
+ final levels = (campaign['levels'] as List)
+ .map((e) => CampaignLevel(e))
+ .toList();
+ final notebook = jsonDecode(
+ await rootBundle.loadString('assets/notebook.json'),
+ ) as Map;
return Book(
campaign['premise'],
- (campaign['levels'] as List).map((e) => CampaignLevel(e)).toList(),
- List.generate(
- 6,
- (i) => StoryPage(
- ids[i],
- titles[i],
- scripts
- .where((s) => s['pageId'] == ids[i])
- .map((s) => s['text'] as String)
- .firstOrNull ??
- '',
- ),
- ),
+ levels,
+ (notebook['pages'] as List).map((record) {
+ final index = record['campaignIndex'] as int?;
+ final text = switch (record['textSource']) {
+ 'before' => levels[index!].before,
+ 'after' => levels[index!].after,
+ 'recording' =>
+ scripts
+ .where((s) => s['pageId'] == record['id'])
+ .map((s) => s['text'] as String)
+ .firstOrNull ??
+ '',
+ _ => record['text'] as String? ?? '',
+ };
+ return StoryPage(
+ record['id'],
+ record['title'],
+ text,
+ type: StoryPageType.values.byName(record['type']),
+ campaignIndex: index,
+ speaker: record['speaker'] as String? ?? '',
+ illustrationAsset: record['illustrationAsset'] as String?,
+ );
+ }).toList(),
tracks,
);
}
diff --git a/lib/domain/game.dart b/lib/domain/game.dart
index 88bd8cb..0c31516 100644
--- a/lib/domain/game.dart
+++ b/lib/domain/game.dart
@@ -25,6 +25,8 @@ class Game extends ChangeNotifier {
Difficulty get difficulty =>
Difficulty.fromStored(progress.text('difficulty', 'EASY'));
int storyIndex = 0, campaignIndex = 0, playingLevel = 1, selectedArea = 0;
+ int contentsChapter = 0;
+ StoryPage get storyPage => book.pages[storyIndex];
DateTime date = DateTime.now();
Puzzle? puzzle;
List cells = [];
@@ -38,8 +40,10 @@ class Game extends ChangeNotifier {
int get recoveredCount =>
List.generate(12, (i) => recovered(i)).where((v) => v).length;
int get unlocked => progress.number('campaignUnlocked').clamp(0, 11);
- int get accessible =>
- math.max(unlocked, progress.number('story_access_level').clamp(0, 11));
+ int get accessible => math.max(
+ 3,
+ math.max(unlocked, progress.number('story_access_level').clamp(0, 11)),
+ );
int get practiceLevel => progress.number('level_${difficulty.stored}', 1);
int get streak => visibleStreak(
progress.number('lastDaily', -99999),
@@ -54,10 +58,10 @@ class Game extends ChangeNotifier {
showStory(
book.pages
.indexWhere((p) => p.id == progress.text('notebook_last_page'))
- .clamp(0, 5),
+ .clamp(0, book.pages.length - 1),
);
} else if (saved == 'contents') {
- contents();
+ contents(progress.number('notebook_contents_chapter'));
} else if (saved == 'briefing') {
briefing(campaignIndex);
} else if (saved == 'reveal' &&
@@ -109,25 +113,37 @@ class Game extends ChangeNotifier {
void showStory(int i) {
_request++;
busy = false;
- storyIndex = i.clamp(0, 5);
+ storyIndex = i.clamp(0, book.pages.length - 1);
mode = Mode.campaign;
- campaignIndex = 0;
- if (storyIndex == 2 && key != 'story_v1_0') {
- _read(book.levels[0].puzzle(), 'story_v1_0');
+ campaignIndex = storyPage.campaignIndex ?? 0;
+ if (storyPage.type == StoryPageType.puzzle &&
+ key != 'story_v1_$campaignIndex') {
+ _read(book.levels[campaignIndex].puzzle(), 'story_v1_$campaignIndex');
}
unawaited(progress.set('notebook_last_page', book.pages[storyIndex].id));
unawaited(progress.set('viewed_${book.pages[storyIndex].id}', true));
_route(Screen.story);
}
- void contents() {
+ void contents([int? chapter]) {
_request++;
busy = false;
+ contentsChapter = (chapter ?? campaignIndex ~/ 4).clamp(0, accessible ~/ 4);
+ unawaited(progress.set('notebook_contents_chapter', contentsChapter));
_route(Screen.contents);
}
+ void leaveCottage() {
+ unawaited(progress.set('story_access_level', math.max(accessible, 4)));
+ briefing(4);
+ }
+
void briefing(int i) {
campaignIndex = i.clamp(0, accessible);
+ if (campaignIndex < 4) {
+ showStory(book.pageFor(campaignIndex, StoryPageType.entry));
+ return;
+ }
mode = Mode.campaign;
_route(Screen.briefing);
}
@@ -138,6 +154,10 @@ class Game extends ChangeNotifier {
return;
}
campaignIndex = i;
+ if (i < 4) {
+ showStory(book.pageFor(i, StoryPageType.memory));
+ return;
+ }
mode = Mode.campaign;
_route(Screen.reveal);
}
@@ -187,6 +207,10 @@ class Game extends ChangeNotifier {
}
campaignIndex = i;
mode = Mode.campaign;
+ if (i < 4) {
+ showStory(book.pageFor(i, StoryPageType.puzzle));
+ return;
+ }
_read(book.levels[i].puzzle(), 'story_v1_$i');
_route(Screen.game);
}
@@ -287,7 +311,7 @@ class Game extends ChangeNotifier {
),
);
if (screen == Screen.story) {
- showStory(3);
+ showStory(book.pageFor(campaignIndex, StoryPageType.memory));
} else {
reveal(campaignIndex);
}
diff --git a/lib/main.dart b/lib/main.dart
index be5221b..1e2a50f 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -167,9 +167,14 @@ class _NotebookState extends State with WidgetsBindingObserver {
}
Future turn(int direction) async {
- final next = (g.storyIndex + direction).clamp(0, 5);
+ if (direction > 0 && g.storyIndex == g.book.pages.length - 1) {
+ crossToHarbour();
+ return;
+ }
+ final next = (g.storyIndex + direction).clamp(0, g.book.pages.length - 1);
if (next == g.storyIndex) return;
- if (g.storyIndex == 2 && direction > 0 && !g.won) {
+ final pageId = g.storyPage.id;
+ if (g.storyPage.type == StoryPageType.puzzle && direction > 0 && !g.won) {
unawaited(narrator.stop());
if (!await confirm(
'Leave a ribbon here?',
@@ -181,7 +186,11 @@ class _NotebookState extends State with WidgetsBindingObserver {
}
await prefs.set('notebook_read_ahead', true);
}
- g.showStory(next);
+ if (mounted && g.storyPage.id == pageId) g.showStory(next);
+ }
+
+ void crossToHarbour() {
+ g.leaveCottage();
}
Future turnCampaign(int direction) async {
@@ -191,7 +200,11 @@ class _NotebookState extends State with WidgetsBindingObserver {
if (direction > 0) {
g.startCampaign(index);
} else if (index > 0) {
- g.reveal(index - 1, readAhead: true);
+ if (index == 4) {
+ g.showStory(g.book.pages.length - 1);
+ } else {
+ g.reveal(index - 1, readAhead: true);
+ }
} else {
g.contents();
}
@@ -435,8 +448,10 @@ class _NotebookState extends State with WidgetsBindingObserver {
size: wide ? 19 : 21,
);
final next = InkButton(
- g.storyIndex == 5 ? 'End of this trail' : 'Next leaf →',
- g.storyIndex < 5 ? () => turn(1) : null,
+ g.storyIndex == g.book.pages.length - 1
+ ? 'Across the tide →'
+ : 'Next leaf →',
+ () => turn(1),
size: wide ? 19 : 21,
);
if (wide) {
@@ -476,7 +491,11 @@ class _NotebookState extends State with WidgetsBindingObserver {
]);
}
- Widget reading(String text) => ListenableBuilder(
+ String get recordingId => g.screen == Screen.story
+ ? g.storyPage.id
+ : 'campaign.${g.campaignIndex}.${g.screen == Screen.briefing ? 'before' : 'after'}';
+
+ Widget reading(String text, {double? size}) => ListenableBuilder(
listenable: narrator,
builder: (context, _) {
final passage = narrator.passage,
@@ -485,7 +504,7 @@ class _NotebookState extends State with WidgetsBindingObserver {
padding: const EdgeInsets.symmetric(vertical: 8),
child: Text.rich(
TextSpan(
- style: hand(g.storyIndex == 0 ? 22 : 21),
+ style: hand(size ?? (g.storyIndex == 0 ? 22 : 21)),
children: index < 0
? [TextSpan(text: text)]
: [
@@ -506,6 +525,13 @@ class _NotebookState extends State with WidgetsBindingObserver {
Widget audio() => ListenableBuilder(
listenable: narrator,
builder: (context, _) => column([
+ writing(
+ g.book.tracks[recordingId]?['speaker'] == 'Narrator'
+ ? 'Narrator · recorded story'
+ : 'Mara · diary reading',
+ size: 17,
+ color: muted,
+ ),
Row(
children: [
Expanded(
@@ -515,7 +541,7 @@ class _NotebookState extends State with WidgetsBindingObserver {
narrator.loading
? null
: () => narrator.toggle(
- g.book.pages[g.storyIndex].id,
+ recordingId,
prefs.decimal('recording_speed'),
),
size: 21,
@@ -530,53 +556,42 @@ class _NotebookState extends State with WidgetsBindingObserver {
writing(narrator.status, size: 17, color: muted),
]),
);
- Widget illustration(
- String asset,
- String description, {
- VoidCallback? onTap,
- }) => Semantics(
- image: true,
- button: onTap != null,
- label: description,
- child: GestureDetector(
- onTap: onTap,
- child: Image.asset(
- 'assets/artwork/$asset',
- height: 155,
- fit: BoxFit.contain,
- excludeFromSemantics: true,
- ),
- ),
- );
Widget story() {
final p = g.book.pages[g.storyIndex];
final heading = [
- folio('MARA’S NOTEBOOK / ${g.storyIndex + 1} OF 6'),
+ folio('THE COTTAGE / ${g.storyIndex + 1} OF ${g.book.pages.length}'),
writing(p.title, size: 31),
];
final body = [...heading];
Widget? wideBody;
- switch (g.storyIndex) {
- case 0:
+ switch (p.type) {
+ case StoryPageType.dedication:
body.addAll([
writing('A few things worth keeping', size: 20, color: muted),
divider(),
reading(p.text),
audio(),
]);
- case 1:
+ case StoryPageType.entry:
body.addAll([
- illustration(
- 'cottage-vignette-v1.png',
- 'Watercolour of Gran’s stone cottage, blue door and warm window.',
- ),
- writing('A note beside the window · Mara', size: 17, color: muted),
+ if (p.illustrationAsset case final asset?)
+ Image.asset(
+ asset,
+ height: 155,
+ fit: BoxFit.contain,
+ semanticLabel: 'Watercolour of Gran’s stone cottage, blue door and warm window.',
+ ),
+ writing(p.speaker, size: 17, color: muted),
reading(p.text),
- audio(),
+ if (g.book.tracks.containsKey(p.id)) audio(),
+ if (p.campaignIndex != 0)
+ action('Turn to the pattern →', () => turn(1)),
]);
- case 2:
+ case StoryPageType.puzzle:
final intro = writing(
- 'Restore a small light, or leave a bookmark and read on.',
+ g.campaignIndex < 2
+ ? 'Restore a small light, or leave a bookmark and read on.'
+ : 'Compare the shared areas. Each cell counts in every area it belongs to.',
size: 21,
color: muted,
);
@@ -584,20 +599,27 @@ class _NotebookState extends State with WidgetsBindingObserver {
wideBody = splitPuzzle(
side: [...heading, intro, areaPicker(), ...puzzleNotes()],
);
- case 3:
+ case StoryPageType.memory:
body.addAll([
- discoveryArt(g.book.levels.first, height: 155),
+ discoveryArt(g.book.levels[p.campaignIndex!], height: 155),
writing(
- g.recovered(0)
+ g.recovered(p.campaignIndex!)
? 'A pattern restored · a memory kept'
: 'A memory to read · your puzzle can wait',
size: 17,
color: muted,
),
reading(p.text),
- audio(),
+ if (g.book.tracks.containsKey(p.id)) audio(),
+ if (!g.recovered(p.campaignIndex!))
+ action(
+ 'Return to this pattern',
+ () => g.showStory(
+ g.book.pageFor(p.campaignIndex!, StoryPageType.puzzle),
+ ),
+ ),
]);
- case 4:
+ case StoryPageType.note:
if (!prefs.flag('notebook_note_open')) {
body.addAll([
writing('A folded scrap, tucked between the leaves.'),
@@ -628,31 +650,39 @@ class _NotebookState extends State with WidgetsBindingObserver {
}),
]);
}
- case 5:
+ case StoryPageType.inspection:
body.addAll([
- illustration(
- 'lantern-vignette-v1.png',
- 'Watercolour of Mara’s blue storm lantern. Tap to examine the repaired handle.',
- onTap: inspect,
- ),
writing(
prefs.flag('notebook_handle_seen')
? 'A repair made to keep small fingers safe.'
- : 'Tap the lantern to look a little closer.',
+ : 'A repair note, tucked into the margin.',
size: 20,
color: muted,
),
reading(p.text),
audio(),
- action('Follow the lantern into the next entry →', () {
- unawaited(
- prefs.set(
- 'story_access_level',
- g.accessible < 1 ? 1 : g.accessible,
- ),
- );
- g.briefing(1);
- }),
+ action('Read Gran’s margin note', inspect),
+ action('Follow the lantern into the next entry →', () => turn(1)),
+ ]);
+ case StoryPageType.closing:
+ body.addAll([
+ reading(p.text),
+ if (g.book.tracks.containsKey(p.id)) audio(),
+ writing(
+ 'Four memories in the cottage · ${List.generate(4, (i) => g.recovered(i)).where((v) => v).length} patterns restored',
+ size: 19,
+ color: muted,
+ ),
+ action(
+ 'Take the path to the harbour →',
+ crossToHarbour,
+ primary: true,
+ ),
+ writing(
+ 'Your unfinished patterns will wait here for you.',
+ size: 19,
+ color: muted,
+ ),
]);
}
return Leaf(
@@ -704,42 +734,36 @@ class _NotebookState extends State with WidgetsBindingObserver {
);
}
- Widget contents() => Leaf(
- key: const ValueKey('contents'),
- body: column([
- folio('THE NOTEBOOK BELONGS TO'),
- writing('Mara Wren', size: 40),
- writing('The Last Light', size: 33),
- writing(
- 'For you, when you are ready.\nWith all my love, Gran.',
- color: const Color(0xff70503b),
- ),
- divider(),
- folio('THE COTTAGE · OPENING LEAVES'),
- for (var i = 0; i < 6; i++)
- action('${i + 1} · ${g.book.pages[i].title}', () => g.showStory(i)),
- action('Return to my ribbon bookmark', () {
- final i = g.book.pages.indexWhere(
- (p) => p.id == prefs.text('notebook_manual_bookmark'),
- );
- g.showStory(i < 0 ? 0 : i);
- }),
- divider(),
- writing(g.book.premise),
- writing(
- '${g.recoveredCount} / 12 memories tucked between these pages',
- size: 20,
- color: muted,
- ),
- for (var i = 0; i < 12; i++) ...[
- if (i % 4 == 0) ...[
- gap(24),
- writing(g.book.levels[i].chapter, size: 28, color: blue),
+ Widget contents() {
+ final chapter = g.contentsChapter;
+ final first = chapter * 4;
+ final savedId = prefs.text('notebook_last_page');
+ final saved = g.book.pages.where((p) => p.id == savedId).firstOrNull;
+ final bookmarkId = prefs.text('notebook_manual_bookmark');
+ final ribbon = g.book.pages.where((p) => p.id == bookmarkId).firstOrNull;
+ return Leaf(
+ key: ValueKey('contents-$chapter'),
+ body: column([
+ folio('MARA’S NOTEBOOK · CONTENTS'),
+ writing(g.book.levels[first].chapter, size: 34),
+ if (chapter == 0) ...[
+ writing(
+ 'For you, when you are ready. With all my love, Gran.',
+ color: const Color(0xff70503b),
+ ),
+ action('Open the dedication', () => g.showStory(0)),
+ if (saved != null)
+ action('Continue reading · ${saved.title}', g.openNotebook),
+ if (ribbon != null)
+ action(
+ 'Return to my ribbon bookmark',
+ () => g.showStory(g.book.pages.indexOf(ribbon)),
+ ),
+ divider(),
],
- Padding(
- padding: const EdgeInsets.symmetric(vertical: 5),
- child: InkButton(
- '${(i + 1).toString().padLeft(2, '0')} · ${g.recovered(i) ? '${g.book.levels[i].object} ✓' : g.book.levels[i].title}${i > g.accessible ? ' · not yet' : ''}',
+ for (var i = first; i < first + 4; i++) ...[
+ InkButton(
+ '${i + 1} · ${g.book.levels[i].title}${g.recovered(i) ? ' ✓' : ''}${chapter == 0 && ribbon?.campaignIndex == i ? ' · ribbon' : ''}',
i <= g.accessible
? () {
if (g.recovered(i)) {
@@ -750,11 +774,48 @@ class _NotebookState extends State with WidgetsBindingObserver {
}
: null,
),
+ ],
+ if (chapter == 0) ...[
+ divider(),
+ action('The folded note', () => g.showStory(4)),
+ action('Gran’s repair note', () => g.showStory(5)),
+ action(
+ 'Before you leave',
+ () => g.showStory(g.book.pages.length - 1),
+ ),
+ ],
+ writing(
+ '${g.recoveredCount} / 12 memories restored',
+ size: 20,
+ color: muted,
),
- ],
- action('Close the notebook', g.home),
- ]),
- );
+ ]),
+ footer: column([
+ Row(
+ children: [
+ Expanded(
+ child: InkButton(
+ '← Previous chapter',
+ chapter > 0 ? () => g.contents(chapter - 1) : null,
+ size: 19,
+ ),
+ ),
+ Expanded(
+ child: InkButton(
+ 'Next chapter →',
+ chapter < 2 && (chapter + 1) * 4 <= g.accessible
+ ? () => g.contents(chapter + 1)
+ : null,
+ size: 19,
+ ),
+ ),
+ ],
+ ),
+ InkButton('Close the notebook', g.home, size: 19),
+ ]),
+ );
+ }
+
Widget briefing() {
final l = g.book.levels[g.campaignIndex];
return Leaf(
@@ -765,7 +826,8 @@ class _NotebookState extends State with WidgetsBindingObserver {
writing(l.chapter, size: 20, color: blue),
writing(l.title, size: 33),
gap(),
- writing(l.before, size: 25),
+ reading(l.before, size: 25),
+ if (g.book.tracks.containsKey(recordingId)) audio(),
divider(),
writing(
g.campaignIndex < 2
@@ -987,7 +1049,8 @@ class _NotebookState extends State with WidgetsBindingObserver {
g.key != requested ||
g.won ||
!(g.screen == Screen.game ||
- g.screen == Screen.story && g.storyIndex == 2)) {
+ g.screen == Screen.story &&
+ g.storyPage.type == StoryPageType.puzzle)) {
return;
}
final h = g.applyHint();
@@ -996,7 +1059,13 @@ class _NotebookState extends State with WidgetsBindingObserver {
'Row ${h.cell ~/ g.puzzle!.size + 1}, column ${h.cell % g.puzzle!.size + 1}',
'${h.explanation}\n\n${h.value == 1 ? 'This cell is lit.' : 'This cell stays dark.'}',
);
- if (mounted && g.key == requested) g.check();
+ if (mounted &&
+ g.key == requested &&
+ (g.screen == Screen.game ||
+ g.screen == Screen.story &&
+ g.storyPage.type == StoryPageType.puzzle)) {
+ g.check();
+ }
}
if (!prefs.flag('hint_$requested')) {
@@ -1027,6 +1096,19 @@ class _NotebookState extends State with WidgetsBindingObserver {
}
Widget discoveryArt(CampaignLevel level, {double height = 190}) {
+ // Discovery images belong only to the leaf after the puzzle, even when
+ // revisiting an earlier page with a completed save.
+ if (!(g.screen == Screen.reveal ||
+ g.screen == Screen.story && g.storyPage.type == StoryPageType.memory)) {
+ return const SizedBox.shrink();
+ }
+ if (!g.recovered(g.book.levels.indexOf(level))) {
+ return writing(
+ 'The picture will appear once you restore the pattern.',
+ size: 19,
+ color: muted,
+ );
+ }
if (level.illustrationAsset case final asset?) {
return Image.asset(
asset,
@@ -1057,7 +1139,10 @@ class _NotebookState extends State with WidgetsBindingObserver {
),
writing(l.object, size: 35),
discoveryArt(l),
- writing(l.after, size: 25),
+ reading(l.after, size: 25),
+ if (g.book.tracks.containsKey(recordingId)) audio(),
+ if (!g.recovered(i))
+ action('Return to this pattern', () => g.startCampaign(i)),
gap(),
writing(
g.recovered(i)
diff --git a/pubspec.yaml b/pubspec.yaml
index 714fef1..9b9724c 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -23,6 +23,7 @@ flutter:
assets:
- assets/fonts/OFL.txt
- assets/campaign.json
+ - assets/notebook.json
- assets/artwork/mara-single-page-v2.png
- assets/artwork/home-harbour-v2.png
- assets/artwork/home-notebook-cover-v2.png
@@ -46,6 +47,29 @@ flutter:
- assets/audio/narration_cottage_match_memory.wav
- assets/audio/narration_cottage_folded_note.wav
- assets/audio/narration_cottage_lantern_sketch.wav
+ - assets/audio/narration_cottage_lantern_entry.wav
+ - assets/audio/narration_cottage_lantern_memory.wav
+ - assets/audio/narration_cottage_key_entry.wav
+ - assets/audio/narration_cottage_key_memory.wav
+ - assets/audio/narration_cottage_compass_entry.wav
+ - assets/audio/narration_cottage_compass_memory.wav
+ - assets/audio/narration_cottage_threshold.wav
+ - assets/audio/narration_campaign_4_before.wav
+ - assets/audio/narration_campaign_4_after.wav
+ - assets/audio/narration_campaign_5_before.wav
+ - assets/audio/narration_campaign_5_after.wav
+ - assets/audio/narration_campaign_6_before.wav
+ - assets/audio/narration_campaign_6_after.wav
+ - assets/audio/narration_campaign_7_before.wav
+ - assets/audio/narration_campaign_7_after.wav
+ - assets/audio/narration_campaign_8_before.wav
+ - assets/audio/narration_campaign_8_after.wav
+ - assets/audio/narration_campaign_9_before.wav
+ - assets/audio/narration_campaign_9_after.wav
+ - assets/audio/narration_campaign_10_before.wav
+ - assets/audio/narration_campaign_10_after.wav
+ - assets/audio/narration_campaign_11_before.wav
+ - assets/audio/narration_campaign_11_after.wav
fonts:
- family: MaraHand
fonts:
diff --git a/scripts/check_narration_assets.py b/scripts/check_narration_assets.py
index 2b19311..5984098 100644
--- a/scripts/check_narration_assets.py
+++ b/scripts/check_narration_assets.py
@@ -5,14 +5,28 @@ from pathlib import Path
root=Path(__file__).resolve().parents[1]
source=root/'assets/narration';raw=root/'assets/audio'
canonical=json.loads((source/'scripts.json').read_text())
+campaign=json.loads((root/'assets/campaign.json').read_text())['levels']
+pages={p['id']:p for p in json.loads((root/'assets/notebook.json').read_text())['pages']}
manifest=json.loads((source/'manifest.json').read_text());runtime=json.loads((raw/'narration_manifest.json').read_text())
assert runtime['tracks']==manifest['tracks']
-assert len(canonical)==5==len(manifest['tracks'])
+assert len(canonical)==len(manifest['tracks'])
+assert {r['pageId'] for r in canonical}==set(manifest['tracks'])
for record in canonical:
+ if record['pageId'].startswith('campaign.'):
+ _,index,phase=record['pageId'].split('.')
+ assert record['text']==campaign[int(index)][phase], 'Campaign narration is stale'
+ elif record.get('speaker')=='Narrator':
+ page=pages[record['pageId']]
+ expected=campaign[page['campaignIndex']][page['textSource']] if page.get('textSource') in ('before','after') else page['text']
+ assert record['text']==expected, 'Notebook narration is stale'
track=manifest['tracks'][record['pageId']]
assert track['text']==record['text']
assert track['textSha256']==hashlib.sha256(record['text'].encode()).hexdigest()
assert track['resource']==record['resource']
+ if record.get('speaker')=='Narrator':
+ assert track['speaker']=='Narrator' and track['voice']=='bm_george'
+ assert track['speed']==record['speed']
+ assert 'assets/audio/'+track['file'] in (root/'pubspec.yaml').read_text()
assert '\n\n'.join(cue['text'] for cue in track['cues'])==record['text']
previous=0
for cue in track['cues']:
@@ -33,4 +47,4 @@ for record in canonical:
print(f"PASS {record['pageId']}: {track['durationMs']/1000:.1f}s, WAV/master match, FLAC lossless, text/cues match")
for p in (root/'lib').rglob('*.dart'):
assert 'flutter_tts' not in p.read_text(),f'Device reader reintroduced in {p}'
-print('All five recordings verified; bundled file playback only.')
+print(f'All {len(canonical)} recordings verified; bundled file playback only.')
diff --git a/scripts/render_narration.py b/scripts/render_narration.py
index c669366..3c74a23 100644
--- a/scripts/render_narration.py
+++ b/scripts/render_narration.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-"""Prepare immutable WAV masters and bundled FLACs; Android performs no speech synthesis."""
+"""Prepare WAV masters, runtime WAVs and archival FLACs; playback never synthesizes speech."""
import argparse, hashlib, importlib.metadata, json, subprocess, shutil
from pathlib import Path
import numpy as np
@@ -14,6 +14,7 @@ parser.add_argument('--model',type=Path,required=True)
parser.add_argument('--voices',type=Path,required=True)
parser.add_argument('--voice',default='bf_emma')
parser.add_argument('--speed',type=float,default=.82)
+parser.add_argument('--speaker', help='Render only this speaker, preserving all other recordings')
parser.add_argument('--root',type=Path,default=Path(__file__).resolve().parents[1])
a=parser.parse_args()
source=a.root/'assets/narration';raw=a.root/'assets/audio'
@@ -23,8 +24,10 @@ session=ort.InferenceSession(str(a.model),sess_options=options,providers=['CPUEx
session.disable_fallback()
config=EspeakConfig(lib_path=str(espeakng_loader.get_library_path()),data_path=str(espeakng_loader.get_data_path()))
engine=Kokoro.from_session(session,str(a.voices),espeak_config=config)
-tracks={}
+previous=json.loads((source/'manifest.json').read_text()) if (source/'manifest.json').exists() else {}
+tracks=dict(previous.get('tracks',{})) if a.speaker else {}
for record in json.loads((source/'scripts.json').read_text()):
+ if a.speaker and record.get('speaker')!=a.speaker: continue
paragraphs=[]
for part in record['text'].split('\n\n'):
if paragraphs and len(part)<45:paragraphs[-1]+='\n\n'+part
@@ -33,7 +36,7 @@ for record in json.loads((source/'scripts.json').read_text()):
rate=24000;pieces=[np.zeros(int(rate*.18),dtype=np.float32)];frames=len(pieces[0]);cues=[]
for part in paragraphs:
print(f"Rendering {record['pageId']} · {len(cues)+1}/{len(paragraphs)}",flush=True)
- samples,sample_rate=engine.create(part.replace('\n',' '),voice=a.voice,speed=a.speed,lang='en-gb',sentence_pause=.38,clause_pause=.14)
+ samples,sample_rate=engine.create(part.replace('\n',' '),voice=record.get('voice',a.voice),speed=record.get('speed',a.speed),lang='en-gb',sentence_pause=.38,clause_pause=.14)
assert sample_rate==rate
samples=np.asarray(samples,dtype=np.float32).reshape(-1)
assert len(samples)>rate*.3 and np.isfinite(samples).all()
@@ -55,8 +58,9 @@ for record in json.loads((source/'scripts.json').read_text()):
'flacSha256':hashlib.sha256(flac.read_bytes()).hexdigest(),'cues':cues}
print(f"Saved {wav.name}: {len(audio)/rate:.1f}s; lossless FLAC verified",flush=True)
manifest={'voice':a.voice,'speed':a.speed,'language':'en-gb','method':'Synthetic narration rendered during development; bundled file playback only.',
+ 'speakers':{'Mara':{'voice':'bf_emma','speed':.82},'Narrator':{'voice':'bm_george','speed':.88}},
'modelSha256':hashlib.sha256(a.model.read_bytes()).hexdigest(),'voicesSha256':hashlib.sha256(a.voices.read_bytes()).hexdigest(),
'packages':{p:importlib.metadata.version(p) for p in ['kokoro-onnx','onnxruntime','soundfile','espeakng-loader']},'tracks':tracks}
(source/'manifest.json').write_text(json.dumps(manifest,ensure_ascii=False,indent=2)+'\n')
(raw/'narration_manifest.json').write_text(json.dumps({'tracks':tracks},ensure_ascii=False,indent=2)+'\n')
-print('All five narration masters and runtime FLACs prepared.',flush=True)
+print(f'{len(tracks)} narration masters and runtime assets prepared.',flush=True)
diff --git a/test/puzzle_test.dart b/test/puzzle_test.dart
index 7f08d52..276d8ac 100644
--- a/test/puzzle_test.dart
+++ b/test/puzzle_test.dart
@@ -10,6 +10,118 @@ import 'package:lumen/services/progress.dart';
void main() {
TestWidgetsFlutterBinding.ensureInitialized();
+ test(
+ 'cottage pages have stable identities and complete puzzle beats',
+ () async {
+ final book = await Book.load();
+ expect(book.pages.length, 16);
+ expect(book.pages.map((p) => p.id).toSet().length, 16);
+ expect(book.pages.take(6).map((p) => p.id), [
+ 'cottage.dedication',
+ 'cottage.window',
+ 'cottage.match.puzzle',
+ 'cottage.match.memory',
+ 'cottage.folded.note',
+ 'cottage.lantern.sketch',
+ ]);
+ for (var i = 0; i < 4; i++) {
+ final entry = book.pageFor(i, StoryPageType.entry);
+ final puzzle = book.pageFor(i, StoryPageType.puzzle);
+ final memory = book.pageFor(i, StoryPageType.memory);
+ expect(entry, lessThan(puzzle));
+ expect(puzzle + 1, memory);
+ expect(book.pages[entry].text, isNotEmpty);
+ expect(book.pages[memory].text, isNotEmpty);
+ }
+ expect(book.pages.last.type, StoryPageType.closing);
+ expect(
+ book.tracks.keys
+ .where((id) => id.startsWith('cottage.'))
+ .every((id) => book.pages.any((p) => p.id == id)),
+ true,
+ );
+ },
+ );
+ test(
+ 'all cottage puzzles survive read-ahead, restart and exactly-once awards',
+ () async {
+ final book = await Book.load();
+ final store = Progress.memory();
+ var g = Game(book, store);
+ for (var i = 0; i < 4; i++) {
+ final puzzle = book.pageFor(i, StoryPageType.puzzle);
+ final memory = book.pageFor(i, StoryPageType.memory);
+ g.showStory(puzzle);
+ final cell = g.puzzle!.given.indexOf(false);
+ g.mark(cell);
+ final marks = List.of(g.cells);
+ g.showStory(memory);
+ await g.progress.set('notebook_manual_bookmark', book.pages[memory].id);
+ g = Game(book, Progress.memory(g.progress.snapshot));
+ await g.restore();
+ expect(g.storyIndex, memory);
+ expect(g.solved, i);
+ g.showStory(puzzle);
+ expect(g.key, 'story_v1_$i');
+ expect(g.cells, marks);
+ final solution = List.of(g.puzzle!.solution);
+ for (var c = 0; c < solution.length; c++) {
+ while (g.cells[c] != (solution[c] == 1 ? 1 : 2)) {
+ g.mark(c);
+ }
+ }
+ expect(g.storyIndex, memory);
+ expect(g.solved, i + 1);
+ g.showStory(puzzle);
+ g.check();
+ expect(g.solved, i + 1);
+ }
+ },
+ );
+ test(
+ 'legacy cottage routes migrate without changing marks or awards',
+ () async {
+ final book = await Book.load();
+ for (var i = 0; i < 4; i++) {
+ for (final route in ['briefing', 'game', 'reveal']) {
+ final store = Progress.memory({
+ 'flutter_screen': route,
+ 'flutter_campaign': i,
+ 'flutter_mode': 'campaign',
+ 'flutter_read_ahead': true,
+ 'grid_story_v1_$i': '1${'0' * 48}',
+ 'solved': 2,
+ });
+ final g = Game(book, store);
+ await g.restore();
+ final type = switch (route) {
+ 'game' => StoryPageType.puzzle,
+ 'reveal' => StoryPageType.memory,
+ _ => StoryPageType.entry,
+ };
+ expect(g.storyPage.type, type);
+ expect(g.campaignIndex, i);
+ expect(g.solved, 2);
+ expect(store.text('grid_story_v1_$i'), startsWith('1'));
+ }
+ }
+ final g = Game(book, Progress.memory());
+ for (var i = 0; i < book.pages.length; i++) {
+ g.showStory(i);
+ final restored = Game(book, Progress.memory(g.progress.snapshot));
+ await restored.restore();
+ expect(restored.storyPage.id, book.pages[i].id);
+ }
+ g.leaveCottage();
+ expect(g.screen, Screen.briefing);
+ expect(g.campaignIndex, 4);
+ expect(g.solved, 0);
+ g.contents(1);
+ final restored = Game(book, Progress.memory(g.progress.snapshot));
+ await restored.restore();
+ expect(restored.contentsChapter, 1);
+ },
+ );
test('Dart generation matches 40 Java reference boards including signed 64-bit seeds', () {
final fixtures = jsonDecode(
File('test/fixtures/java_boards.json').readAsStringSync(),
@@ -167,18 +279,18 @@ void main() {
g.mark(0);
final marks = List.of(g.cells);
g.reveal(2, readAhead: true);
- expect(g.screen, Screen.reveal);
+ expect(g.screen, Screen.story);
expect(g.recovered(2), false);
expect(g.solved, 0);
final restored = Game(g.book, Progress.memory(store.snapshot));
await restored.restore();
- expect(restored.screen, Screen.reveal);
+ expect(restored.screen, Screen.story);
expect(restored.campaignIndex, 2);
expect(restored.solved, 0);
restored.startCampaign(2);
expect(restored.cells, marks);
restored.reveal(5, readAhead: true);
- expect(restored.screen, Screen.briefing);
- expect(restored.campaignIndex, 2);
+ expect(restored.screen, Screen.story);
+ expect(restored.campaignIndex, 3);
});
}
diff --git a/test/widget_test.dart b/test/widget_test.dart
index 6d90f22..d02eec1 100644
--- a/test/widget_test.dart
+++ b/test/widget_test.dart
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:lumen/domain/book.dart';
import 'package:lumen/domain/game.dart';
@@ -9,12 +10,177 @@ import 'package:lumen/ui/board.dart';
import 'package:lumen/ui/paper.dart';
void main() {
+ testWidgets(
+ 'object illustrations remain hidden until their own pattern is solved',
+ (tester) async {
+ tester.view.physicalSize = const Size(600, 960);
+ tester.view.devicePixelRatio = 1;
+ addTearDown(tester.view.reset);
+ final book = (await tester.runAsync(Book.load))!;
+ final game = Game(book, Progress.memory({'story_access_level': 11}));
+ game.showStory(0);
+ await tester.pumpWidget(LumenApp(game: game, adsEnabled: false));
+ await tester.pumpAndSettle();
+ void expectHidden() {
+ for (final level in book.levels) {
+ expect(
+ find.image(AssetImage(level.illustrationAsset!)),
+ findsNothing,
+ );
+ }
+ expect(find.byType(PixelPicture), findsNothing);
+ }
+
+ for (var i = 0; i < 12; i++) {
+ game.reveal(i, readAhead: true);
+ await tester.pumpAndSettle();
+ expectHidden();
+ expect(game.solved, 0);
+ }
+ for (final index in [5, 6, 9, 12, 15]) {
+ game.showStory(index);
+ await tester.pumpAndSettle();
+ expectHidden();
+ }
+ game.showStory(book.pageFor(1, StoryPageType.puzzle));
+ final solution = List.of(game.puzzle!.solution);
+ for (var c = 0; c < solution.length; c++) {
+ while (game.cells[c] != (solution[c] == 1 ? 1 : 2)) {
+ game.mark(c);
+ }
+ }
+ await tester.pumpAndSettle();
+ expect(
+ find.image(AssetImage(book.levels[1].illustrationAsset!)),
+ findsOneWidget,
+ );
+ game.showStory(5);
+ await tester.pumpAndSettle();
+ expectHidden();
+ game.reveal(2, readAhead: true);
+ await tester.pumpAndSettle();
+ expectHidden();
+ expect(game.solved, 1);
+ final restarted = Game(book, Progress.memory(game.progress.snapshot));
+ await restarted.restore();
+ expect(restarted.recovered(1), true);
+ expect(restarted.recovered(2), false);
+ expect(tester.takeException(), isNull);
+ await tester.pumpWidget(const SizedBox());
+ },
+ );
+ testWidgets('completed saves never put discovery art on earlier leaves', (
+ tester,
+ ) async {
+ tester.view.physicalSize = const Size(600, 960);
+ tester.view.devicePixelRatio = 1;
+ addTearDown(tester.view.reset);
+ final book = (await tester.runAsync(Book.load))!;
+ final game = Game(
+ book,
+ Progress.memory({
+ for (var i = 0; i < 12; i++) 'done_story_v1_$i': true,
+ 'notebook_handle_seen': true,
+ }),
+ );
+ game.showStory(0);
+ await tester.pumpWidget(LumenApp(game: game, adsEnabled: false));
+ await tester.pumpAndSettle();
+ for (var i = 0; i < book.pages.length; i++) {
+ game.showStory(i);
+ await tester.pumpAndSettle();
+ final page = book.pages[i];
+ for (var object = 0; object < 12; object++) {
+ expect(
+ find.image(AssetImage(book.levels[object].illustrationAsset!)),
+ page.type == StoryPageType.memory && page.campaignIndex == object
+ ? findsOneWidget
+ : findsNothing,
+ reason: '${page.id} must not reveal object $object before its puzzle',
+ );
+ }
+ expect(find.byType(PixelPicture), findsNothing);
+ expect(tester.takeException(), isNull);
+ }
+ await tester.pumpWidget(const SizedBox());
+ });
+ testWidgets('all cottage leaves turn, offer hints and fit larger text', (
+ tester,
+ ) async {
+ addTearDown(tester.view.reset);
+ await tester.runAsync(() async {
+ final font = FontLoader('MaraHand')
+ ..addFont(rootBundle.load('assets/fonts/DancingScript.ttf'));
+ await font.load();
+ });
+ final book = (await tester.runAsync(Book.load))!;
+ for (final size in [const Size(360, 640), const Size(960, 600)]) {
+ tester.view.physicalSize = size;
+ tester.view.devicePixelRatio = 1;
+ final g = Game(book, Progress.memory());
+ g.showStory(0);
+ await tester.pumpWidget(
+ MaterialApp(
+ home: MediaQuery(
+ data: MediaQueryData(
+ size: size,
+ textScaler: const TextScaler.linear(1.5),
+ ),
+ child: Notebook(game: g, adsEnabled: false),
+ ),
+ ),
+ );
+ await tester.pumpAndSettle();
+ for (var i = 0; i < book.pages.length; i++) {
+ expect(g.storyIndex, i);
+ final page = book.pages[i];
+ if (page.type == StoryPageType.puzzle) {
+ final before = List.of(g.cells);
+ final hint = find.text('Hint · free');
+ await tester.ensureVisible(hint);
+ await tester.pumpAndSettle();
+ await tester.tap(hint);
+ await tester.pumpAndSettle();
+ expect(g.cells, isNot(before), reason: page.id);
+ await tester.tap(find.text('Keep going'));
+ await tester.pumpAndSettle();
+ }
+ final next = find.text(
+ i == book.pages.length - 1 ? 'Across the tide →' : 'Next leaf →',
+ );
+ expect(next.hitTestable(), findsOneWidget, reason: page.id);
+ await tester.tap(next);
+ await tester.pumpAndSettle();
+ if (page.type == StoryPageType.puzzle) {
+ await tester.tap(find.text('Read ahead'));
+ await tester.pumpAndSettle();
+ }
+ expect(g.solved, 0);
+ expect(tester.takeException(), isNull, reason: page.id);
+ }
+ expect(g.screen, Screen.briefing);
+ expect(g.campaignIndex, 4);
+ g.contents(0);
+ await tester.pumpAndSettle();
+ expect(find.text('I · The keeper’s cottage'), findsOneWidget);
+ expect(find.text('2 · Something to carry the flame'), findsOneWidget);
+ expect(tester.takeException(), isNull);
+ await tester.pumpWidget(const SizedBox());
+ await tester.pumpAndSettle();
+ }
+ });
testWidgets('campaign discoveries use bundled art with a pixel fallback', (
tester,
) async {
addTearDown(tester.view.reset);
final book = (await tester.runAsync(Book.load))!;
- final g = Game(book, Progress.memory({'story_access_level': 11}));
+ final g = Game(
+ book,
+ Progress.memory({
+ 'story_access_level': 11,
+ for (var i = 0; i < 12; i++) 'done_story_v1_$i': true,
+ }),
+ );
expect(book.levels.every((l) => l.illustrationAsset != null), true);
for (final size in [const Size(360, 640), const Size(960, 600)]) {
tester.view.physicalSize = size;
@@ -40,12 +206,16 @@ void main() {
expect(find.byType(PixelPicture), findsNothing);
await tester.ensureVisible(art);
await tester.pumpAndSettle();
- expect(tester.getSize(art).height, 190);
+ expect(tester.getSize(art).height, index < 4 ? 155 : 190);
} else {
expect(find.byType(PixelPicture), findsOneWidget);
}
final next = find.text(
- index == 11 ? 'Return to the notebook' : 'Turn the page →',
+ index < 4
+ ? 'Next leaf →'
+ : index == 11
+ ? 'Return to the notebook'
+ : 'Turn the page →',
);
await tester.ensureVisible(next);
await tester.pumpAndSettle();
@@ -84,7 +254,7 @@ void main() {
'clues': original.clues,
'areas': original.areas,
});
- final game = Game(book, Progress.memory());
+ final game = Game(book, Progress.memory({'done_story_v1_0': true}));
game.reveal(0, readAhead: true);
await tester.pumpWidget(LumenApp(game: game, adsEnabled: false));
await tester.pumpAndSettle();
@@ -280,7 +450,7 @@ void main() {
greaterThan(lastCell.right),
);
expect(find.text('Hint · free'), findsOneWidget);
- expect(find.text('Back to notebook'), findsOneWidget);
+ expect(find.text('Next leaf →'), findsOneWidget);
expect(tester.takeException(), isNull);
// The opening notebook's puzzle leaf uses the same two columns, with the