Expand narrated story, preserve solved patterns, and add ambience

Connect the island story with new character memories and narrative transitions.
Blend each solved symbol into its artwork and retain a replayable pattern stamp.
Allow completed grids to be inspected after navigation and app restarts.
Reduce campaign difficulty spikes and keep explained story hints free.

Append 24 narrated continuations while preserving original PCM takes. Add
four offline environmental loops with saved mute/volume controls, scene
fades, narration ducking and lifecycle handling.

Validation: 31 unit/widget tests, Flutter analysis, narration and soundscape
asset checks, tablet discovery layouts and extended-audio integration,
including simultaneous active voice and ambience mixer tracks.
This commit is contained in:
Hadrian Burkhardt
2026-11-02 05:04:57 +01:00
parent 6bd14a9e20
commit 68871ec573
102 changed files with 2322 additions and 520 deletions
+9 -4
View File
@@ -12,7 +12,9 @@ Android is the tested target. iOS project scaffolding and test AdMob configurati
- 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. 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.
- Undo and unlimited free explained hints in the story. Daily and classic puzzles have one free explained hint, then optional rewarded hints. Rewarded hints require the AdMob reward callback. An unavailable ad never blocks the board.
- Expanded story passages connect the harbour key, crossing, bell signals and reunion with Mara. All added passages are narrated; original takes continue seamlessly into the new sections.
- Solved patterns remain available when turning back from discoveries, including after restarting. Discoveries blend the exact pixel symbol into the watercolour, keep a small copy of the symbol visible, and offer a replay.
- Local daily streaks, independent difficulty levels and exactly-once puzzle completion awards.
- AdMob/UMP consent, optional rewarded hints, practice interstitials after every fourth completion and one-time campaign chapter transitions. No ads interrupt opening notebook leaves or recorded readings.
@@ -24,7 +26,9 @@ All app-created text uses the bundled Dancing Script handwriting font, including
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.
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).
Twenty-eight fixed, pre-rendered synthetic recordings play from bundled PCM16 WAV files. Twenty-four readings include the expanded story; the original PCM takes are preserved, followed by the added narrator passages. A single Play control covers the whole page and highlighting follows both parts. Mara’s five original British-English diary takes 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).
Four bundled, original sound textures accompany the story: air around the cottage, harbour water, the stream under the bridge and wind around the lighthouse. They loop quietly, fade when locations change and duck beneath narration. Sound & atmosphere offers a saved mute switch and independent atmosphere volume. Leaving the story or backgrounding the app stops them; readings never start automatically. These are procedurally rendered soundscapes, not field recordings. See [soundscape provenance](assets/audio/AMBIENCE.md).
## Build and run
@@ -61,6 +65,7 @@ The development release build currently uses the Android debug signing key so it
flutter analyze
flutter test
python3 scripts/check_narration_assets.py
python3 scripts/check_soundscape_assets.py
# Launch/playback/restart smoke test after installing the normal APK
python3 scripts/check_flutter_install.py --serial YOUR_ANDROID_DEVICE
@@ -71,7 +76,7 @@ flutter drive --driver test_driver/integration_test.dart \
--dart-define=QA_TEST=true -d YOUR_ANDROID_DEVICE
```
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 thirty-one 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, bounded campaign comparison chains, solved-grid inspection after restart, discovery animation/replay, repeated free story hints, 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.
@@ -101,7 +106,7 @@ For Android, supply the app ID using Gradle property `ADMOB_APP_ID`. Rewarded/in
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.
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 takes are retained as PCM within the expanded recordings.
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/`.