- Start the app on a shelf of every installed book instead of the last book's home. Cards show the cover, translated metadata, available languages, restored patterns and either "Continue reading" or a way in. - Keep each book's saved route: the shelf is never written to flutter_screen, so choosing a book resumes its own leaf. - Lay the shelf out responsively: dense single-column cards on phones, a two-column grid from 720 logical pixels, a centred 860 px column on tablets and a chevron that exists in the bundled handwriting font. - Keep Settings reachable from the shelf and let the home page's story library button open the shelf instead of a dialog. - Add tool/shelf_screenshots_test.dart, which renders the shelf at phone and tablet metrics, checks that every card and Settings stay reachable without overflow, and writes artifacts/library/shelf-*.png. - Commit the pending Midnight Invitation package (campaign, notebook, narration and artwork), cast drama and ambience tooling, region selection, phone/tablet integration coverage and related docs. flutter analyze is clean and all 74 widget/domain tests pass.
6.1 KiB
The Midnight Invitation
A complete English Gothic Halloween story, told through postman Elias Ward's private delivery diary. A letter in his own handwriting leads him to Thorne Hall, where twelve missing guests wait for someone to accept the thirteenth place. The suspense comes from borrowed voices, impossible rooms, a false reflection, and the gradually uncovered delivery instructions. The main mystery resolves; the diary ends with an unsettling aftermath. No gameplay timer or graphic gore.
Content and authoring
- Three chapters, twelve original 7×7 picture puzzles, 38 leaves.
- 3,718 words of first-person diary prose; 26 cast recordings, about 24.9 minutes.
- Thirteen original watercolour illustrations plus a dedicated Gothic diary-page background with dark binding, raven feather, cracked wax seal and blank paper.
- Stable page, puzzle and story IDs; the revision preserves all existing puzzle grids, givens, overlapping regions, artwork associations and save keys.
STORY.md is the editable manuscript. Compile it into campaign.json,
notebook.json and the exact-text narration scripts with:
python3 tool/compile_midnight_diary.py
The compiler preserves puzzle data. It assigns cast segments and a few editorial pauses/Foley events. After editing prose, always re-render affected recordings before building; stale audio fails the package checker. Puzzle instruction leaves remain unvoiced and instructional. Diaries describe the experience of the puzzle; they do not provide its solution.
Puzzle design and controls
Every picture has one solution and is solvable without assumptions. The first two use row/column deductions. The next ten require overlapping-region comparisons, with four to eight snapshot reasoning rounds and two to four comparison steps. The final chair has no fixed cells but offers a direct first deduction.
puzzle-report.json contains the spoiler-bearing proof traces. To regenerate the
same silhouettes' clue sets: dart run tool/author_midnight_puzzles.dart.
Area buttons have a filled selected state and check mark. A continuous dark frame surrounds the selected region's actual cells. The frame ignores pointer input; cells still cycle light → cross → clear. The redundant undo button is removed from all puzzle pages; hints remain available.
Artwork and notebook
The catalogue's paperAsset binds artwork/diary-page-v1.png to this book's
reading, contents and puzzle pages. Other books keep their own paper. No island,
lighthouse or floral decoration appears in this diary background.
All fourteen images were generated with the built-in OpenAI image-generation
tool. artwork/prompts.json contains the original thirteen illustration prompts;
artwork/diary-page-v1.prompt.txt records the complete new page prompt. The original
illustrations retain their transparent alpha; the diary background is opaque.
Discovery artwork remains hidden until its own puzzle is solved.
Recorded diary and atmosphere
Speech is synthetic Kokoro ONNX audio, prepared offline, bundled as mono 24 kHz PCM16 WAV. No runtime synthesis or downloads. The full diary now uses cast reads:
- Elias:
bm_george, 0.93, the writer recalling what happened. - Iris:
bf_emma, 0.91, the house's guarded caretaker. - Ada:
bf_isabella, 0.94, the postmistress. - Borrowed voices reuse the imitated person's voice at a slightly slower pace, gently filtered through the door. Their role labels identify the imitation.
narration/cast.json defines roles. direction remains editorial metadata, not
an emotion command understood by Kokoro. Exact-text segments preserve quotations,
paragraphs and spoken-role cue timing. Small procedural knocks, chair movement
and paper rustle are placed in pauses, not over words. All original second-person
recordings have been replaced with the matching first-person performances.
audio/atmosphere.json maps scenes across the nocturnal story: wind at the gates,
stove/embers in the kitchen, low air/timber movement in the hall and tower. The
ending is quiet. There are no clock ticks before the stopped clock is restarted.
Separate background loops duck under speech and obey Sound & atmosphere controls.
The effects inside a reading follow that recording's play/pause/speed controls.
Model licences are under assets/narration/licenses/. Checksums, durations,
per-segment voices and cues are recorded in narration/manifest.json. WAV masters
and lossless FLAC archives are excluded from the APK. Atmosphere provenance is
in audio/atmosphere_provenance.json.
python scripts/render_narration.py \
--model /path/to/kokoro-v1.0.onnx \
--voices /path/to/voices-v1.0.bin \
--story-root assets/stories/midnight-invitation
python scripts/render_drama_atmosphere.py
python3 scripts/render_drama_previews.py
Use the pinned narration Python environment for rendering. Repeatable
--page <page-id> arguments regenerate selected readings while preserving others.
The preview exporter writes the current door and kitchen readings with background
audio to artifacts/audio-pilot/; these local review files are not app assets.
Validation
flutter analyze --no-pub
flutter test --no-pub
python3 scripts/check_story_package.py assets/stories/midnight-invitation
The package checker verifies exact text/script/cue agreement, cast, PCM format,
checksums, peak levels, effect placement, lossless archive agreement and seamless
background loops. Tests also cover puzzle uniqueness, progress, read-ahead,
translations, all leaves at 1.5× text in both orientations, theme switching and
region-frame alignment with cell hit testing. integration_test/diary_test.dart
combines the complete story playthrough and native cast playback checks.
The full revised diary passed 72 Flutter tests, asset verification, and the
Huawei API 26 playthrough (all twelve puzzles, all 26 native recordings,
bookmarks, read-ahead and cast controls). A separate
integration_test/region_test.dart captures marked cells inside the selected
block in both orientations, so visual review checks contrast as well as geometry.
Local screenshots are under artifacts/flutter-check/halloween-*.png.