Expand Lumen stories and add island postcards
This commit is contained in:
+17
-3
@@ -355,15 +355,15 @@ Board key formats (`<key>`):
|
||||
|
||||
- `assets/campaign.json`: `{ premise, levels: [{ chapter, title, object, before, after, picture, clues, areas, illustrationAsset?, beforeContinuation?, afterContinuation? }] }`. `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/notebook.json`: sixteen ordered records with stable `id`, `type`, `title`, optional `campaignIndex`, `speaker`, `illustrationAsset` and `textSource` (`recording`, `before`, `after`) or inline `text`, plus optional `continuation`. `Book.pageFor()` finds a campaign entry/puzzle/memory. Preserve the first six IDs when extending the chapter.
|
||||
- Campaign `beforeContinuation`/`afterContinuation` add narrative after the original passage, with one audio control after the full text. Cottage entries/memories inherit these by text source; custom recording leaves can supply their own `continuation`. Recorded scripts include both parts. Recording-source leaves read `baseText` for the original displayed passage. Every new continuation has narrator cues; the original take remains byte-identical as PCM and has its own prefix checksum in the manifest.
|
||||
- Campaign `beforeContinuation`/`afterContinuation` add narrative after the original passage, with one audio control after the full text. Cottage entries/memories inherit these by text source; custom recording leaves can supply their own `continuation`. Recorded scripts include both parts. Recording-source leaves read `baseText` for the original displayed passage. The lighthouse rewrite uses continuations only to separate Mara’s letter from the present-day narrator on two leaves; its audio is regenerated in full, with no preserved PCM prefixes.
|
||||
- Campaign balance: all area puzzles have at least seven initial single-clue deductions; solver comparison counts are capped at 3 for the key, 5 for the crossing chapter and 6 for the final chapter. These are regression bounds, not a substitute for player feedback. Every area puzzle still needs comparison and has a unique, no-guess solution.
|
||||
- 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 complete diary text, one record per recorded page (`pageId`, `text`, optional `baseText`, `continuation`, `continuationSpeaker`). `Book.load()` resolves `recording` base 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/<file>`.
|
||||
- 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. `--append-continuations` appends only the narrator additions to existing PCM masters and records the original PCM frame count and checksum; use it when adding to existing recordings. The asset checker validates narrator scripts against notebook/campaign text.
|
||||
- `audio()` follows the current cue speaker, including the switch from Mara to the narrator on the window/match memory pages. Both original and continuation paragraphs use cue highlighting.
|
||||
- `tool/compile_mara_story.py` compiles `assets/narration/STORY.md` into all 28 scripts and displayed prose. `cast.json` defines Mara and the narrator; `performance.json` pins Qwen VoiceDesign and its scene directions. `scripts/render_qwen_narration.py --story-root assets --flac-dir assets/audio` stages or publishes complete recordings. Twenty-three readings lead with the narrator, switching to Mara for her dialogue. The asset checker validates displayed text, cast, actual model instructions, cue coverage and lossless archives.
|
||||
- `audio()` follows the current cue speaker, including the switch from Mara to the narrator on the window/match memory pages. Both letter and present-day paragraphs use cue highlighting.
|
||||
- `audio()` uses the story ID or `campaign.<index>.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.
|
||||
@@ -550,3 +550,17 @@ Halloween now uses `Book.paperAsset` through `PaperSkin` on all notebook pages.
|
||||
into stable content and cast scripts. `RegionButton` provides a filled selected
|
||||
state; `Board` overlays a pointer-transparent frame around the selected region.
|
||||
`test/region_selection_test.dart` verifies frame geometry, marking and book skins.
|
||||
|
||||
## Island postcard collection (November 2026)
|
||||
|
||||
`lib/domain/postcards.dart` contains fourteen original written scenes;
|
||||
`postcard_patterns.dart` freezes their 42 independently validated boards.
|
||||
`Game` exposes `Screen.postcards` and `Mode.postcard`, with global save keys
|
||||
and exactly-once completion/break claims. `ui/postcards.dart` adds the shelf
|
||||
activities and collection; `main.dart` uses the existing accessible puzzle
|
||||
layout and a scrollable postcard reader. Global puzzle starts preserve book
|
||||
reading routes. `services/ad_pacing.dart` persists full-screen spacing and a
|
||||
six-per-day automatic cap. `services/play_metrics.dart` keeps local daily
|
||||
activity and SDK revenue receipts, with currencies and test units separated.
|
||||
QA/debug Settings can copy its JSON. There is no analytics upload or campaign
|
||||
attribution. See [the operating guide](RETENTION_MONETIZATION.md).
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
# Returning to Lumen
|
||||
|
||||
The November 2026 content update adds a reason to return to the bookshelf:
|
||||
**Island postcards**, fourteen short outings with Mara after the lighthouse
|
||||
story. Each outing has three fixed 5×5 patterns and an original written scene
|
||||
that stays in the collection once all three patterns are solved. There are
|
||||
42 distinct boards. All are uniquely solvable with the existing deduction
|
||||
solver. Opening outings are gentle; later outings mix easy, medium and hard
|
||||
practice-style reasoning. These grids are abstract patterns, not new picture
|
||||
puzzles. The postcards are English text without recorded narration; existing
|
||||
Qwen recordings remain with their original stories. Controls support English
|
||||
and German.
|
||||
|
||||
The shelf now offers today's puzzle and the postcard collection before the
|
||||
books. Outings can be taken in any order, never expire, and have no energy,
|
||||
waiting period, paid unlock or streak penalty. Partial grids persist; collected
|
||||
cards can be reread without ads. A resume button returns to the last unfinished
|
||||
outing. Daily and postcard play leave a book's reading position intact. Android
|
||||
Back returns to the collection or shelf from these activities.
|
||||
|
||||
## Ads at breaks
|
||||
|
||||
- Each completed outing has at most one automatic-ad opportunity, **after** the
|
||||
player reads the postcard and selects “Keep this postcard”. Closing the
|
||||
dialog with Back or tapping outside it does not start an ad.
|
||||
- The opportunity is claimed once and saved. Replays, duplicate taps and
|
||||
restarts cannot create more opportunities for that outing. No-fill or pacing
|
||||
suppression continues immediately and does not retry that outing later.
|
||||
- Practice retains one opportunity after every fourth completion, now claimed
|
||||
once per milestone. The existing three-break lifetime limit per book remains.
|
||||
- Automatic ads have a three-minute opening grace period, at least three minutes
|
||||
since the last full-screen ad (including a rewarded hint), and a limit of six
|
||||
automatic displays per device-calendar day. The clock and cap persist across
|
||||
restarts; the opening grace period also starts again on app launch.
|
||||
- No automatic ad is requested at app launch, on the shelf, mid-puzzle or while
|
||||
the new postcard is being read. Background and overlapping full-screen ads
|
||||
are blocked. No-fill and show failures continue the flow.
|
||||
- Rewarded hints remain optional and require the reward callback. The daily
|
||||
automatic-ad cap does not limit voluntarily requested rewarded hints.
|
||||
|
||||
The spacing is an initial product choice, not an AdMob-prescribed interval.
|
||||
[Google's guidance](https://support.google.com/admob/answer/6066980?hl=en)
|
||||
recommends natural transitions and preserving the experience.
|
||||
|
||||
## What break-even means
|
||||
|
||||
The user's acquisition assumption is **€0.05 per Indian install**. The other
|
||||
app's **€3 worldwide eCPM is not a measured India or Lumen rate**. A planning
|
||||
case at €3 needs 17 served impressions per acquired install to cover acquisition
|
||||
alone, or 25 to earn €0.075 before other costs. At €1, those same 25 impressions
|
||||
earn only €0.025. New content is an experiment in repeat play, not a revenue
|
||||
guarantee. Fourteen opportunities are not fourteen served impressions: users
|
||||
may stop, pacing may suppress ads, and inventory may be unavailable.
|
||||
|
||||
Validate a small campaign before scaling. For example, 1,000 installs at €0.05
|
||||
cost €50. Sum **that install cohort's** cumulative ad revenue after 7 and 30
|
||||
days, divided by **all 1,000 installs**, including people who never returned or
|
||||
saw an ad. Do not divide by active users or mix organic revenue into the paid
|
||||
cohort. Compare cohorts with the same observation window, country, platform,
|
||||
campaign and app version. Wait for the full window before judging D30. Track
|
||||
D1/D7/D30 return rates, completed outings, impressions per acquired install,
|
||||
rewarded participation and format-specific eCPM alongside revenue. Revenue
|
||||
must exceed acquisition and any other variable costs, not merely equal CPI.
|
||||
|
||||
## Local QA report and its limits
|
||||
|
||||
Settings → **Playtest report** is available in debug, QA and check builds. Copy
|
||||
exports local JSON with first-observed time, sessions separated by at least 30
|
||||
minutes of inactivity, daily activity/completion/ad-event counts, collected
|
||||
postcards and impression-level revenue callbacks. Observations begin with this
|
||||
version, not necessarily the original install. Reinstalling deletes the report.
|
||||
It contains no generated device identifier and is never uploaded by Lumen.
|
||||
|
||||
`Ads` registers `onAdImpression` and `onPaidEvent` separately. Money is stored
|
||||
in SDK micros (divide by 1,000,000), separated by currency, format, precision,
|
||||
date, and test-unit/configured-unit status. There is no inferred revenue for
|
||||
requests, completed puzzles, absent callbacks or unavailable ads. Sample Google
|
||||
ad units are marked `test`; configured units can still be running on SDK test
|
||||
devices. Exclude **all QA and test-device traffic** from financial analysis.
|
||||
Precision can be estimated or unknown; reconcile receipts with AdMob reporting.
|
||||
Enable impression-level revenue reporting in the production AdMob setup before
|
||||
checking those callbacks on a release device.
|
||||
|
||||
**This is not campaign analytics.** No production analytics backend, country
|
||||
lookup, install attribution, consent integration for a new analytics service,
|
||||
or multi-device cohort export has been configured. Campaign payback cannot be
|
||||
proved by one device's report or by AdMob's overall daily revenue. Select and
|
||||
configure an attribution/analytics destination before scaling acquisition; join
|
||||
acquired installs (including zero-revenue installs) to their subsequent revenue
|
||||
in a common reporting currency. Never silently add USD to EUR. Current builds
|
||||
still default to Google's test ad IDs unless release configuration supplies
|
||||
production IDs.
|
||||
|
||||
## Maintenance and verification
|
||||
|
||||
- Content: `lib/domain/postcards.dart`; stable boards:
|
||||
`lib/domain/postcard_patterns.dart`. Do not reorder or change existing boards
|
||||
under the v1 save keys after release. `dart tool/author_postcard_puzzles.dart`
|
||||
reproduces the initial board set; use new IDs for future content.
|
||||
- Saved grids/completions use global `postcard_v1_<id>_<slot>` keys. Book saves
|
||||
keep their original namespaces. Collected means **all three** completed,
|
||||
never a rounded total across different outings.
|
||||
- `test/postcards_test.dart`: all 42 boards, saving/resuming, exactly-once
|
||||
awards, replay prevention, pacing, restart caps, currency and test separation.
|
||||
- `test/postcards_widget_test.dart`: the full three-puzzle collection flow,
|
||||
no-fill continuation, rereading, shelf navigation, portrait/landscape and
|
||||
large text. Optional `--dart-define=CAPTURE_POSTCARDS=true` saves review PNGs
|
||||
in `artifacts/postcard-review/`.
|
||||
- Live SDK revenue, UMP and actual reward/dismiss/failure callbacks still need
|
||||
device validation using the production configuration. Automated tests verify
|
||||
the ledger and pacing rules and inject no-fill; they do not generate paid ads.
|
||||
|
||||
Any tablet deployment must follow `AGENTS.md`: verify the intended QA APK,
|
||||
uninstall `com.lumen.daily.qa`, then install fresh without restoring data.
|
||||
+14
-6
@@ -214,16 +214,24 @@ assignments and optional `segments` in `narration/scripts.json`:
|
||||
Concatenating segment text **without a separator** must reproduce the page text
|
||||
exactly, including whitespace and punctuation. Each segment names a cast member;
|
||||
optional `speed`, `sentencePause`, `pauseMs`, `perspective` and `afterEffect`
|
||||
control the offline performance. `direction` is a production note for a human
|
||||
or a future expressive speech engine; Kokoro does not interpret emotion prompts.
|
||||
The current renderer supports `near` / `behind-door` perspective and three soft
|
||||
control the offline performance. Midnight now uses Qwen3-TTS 1.7B VoiceDesign,
|
||||
the selected engine for expressive story narration. Its renderer sends
|
||||
`direction`, the scene's performance notes and the cast's voice description to
|
||||
`generate_voice_design(..., instruct=...)`, separately from the exact spoken
|
||||
text. `narration/performance.json` pins the model revision and scene directions.
|
||||
Mara’s lighthouse story now uses the same directed Qwen workflow; its compiler
|
||||
is `tool/compile_mara_story.py` and its assets remain under `assets/narration`
|
||||
and `assets/audio`. For historical Kokoro packages, directions are editorial only. The renderers support `near` / `behind-door` perspective and three soft
|
||||
procedural effects (`door-knock`, `chair-shift`, `paper`) placed in the pauses.
|
||||
These effects are part of the reading, so pause/replay/speed changes keep them in
|
||||
sync. The atmosphere switch controls the separate background layer.
|
||||
|
||||
Render selected pages with repeatable `--page <stable-page-id>` arguments to
|
||||
`scripts/render_narration.py --story-root <package> ...`. Other tracks are
|
||||
preserved. Per-segment cue speakers drive highlighting and the live speaker label;
|
||||
For Midnight, use `scripts/render_qwen_narration.py`; see its package README for
|
||||
the pinned runtime, staging, batched rendering, transcription review and
|
||||
`--publish` workflow. Repeatable `--page <stable-page-id>` arguments select
|
||||
readings; a first Qwen publication must replace the entire story. The older
|
||||
`scripts/render_narration.py --story-root <package> ...` handles Kokoro packages.
|
||||
Per-segment cue speakers drive highlighting and the live speaker label;
|
||||
the role remains displayed through its pause. Generated drama tracks use
|
||||
`cueJoin: ""`; legacy paragraph tracks retain their double-newline convention.
|
||||
Master WAV, runtime WAV and FLAC archive checks remain mandatory.
|
||||
|
||||
Reference in New Issue
Block a user