Add watercolour artwork for all campaign discoveries
@@ -22,6 +22,8 @@ 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.
|
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.
|
||||||
|
|
||||||
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).
|
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).
|
||||||
|
|
||||||
## Build and run
|
## Build and run
|
||||||
@@ -65,7 +67,7 @@ flutter drive --driver test_driver/integration_test.dart \
|
|||||||
--dart-define=QA_TEST=true -d YOUR_ANDROID_DEVICE
|
--dart-define=QA_TEST=true -d YOUR_ANDROID_DEVICE
|
||||||
```
|
```
|
||||||
|
|
||||||
The twelve 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 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 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.
|
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.
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ Small, actionable follow-ups that are not yet scheduled in [ROADMAP.md](ROADMAP.
|
|||||||
|
|
||||||
## Artwork
|
## Artwork
|
||||||
|
|
||||||
- [ ] Produce illustrated object artwork for every campaign discovery — match, lantern, brass key, compass, little boat, anchor, stone bridge, harbour bell, missing gear, beacon lens, lighthouse and home — so each reveal has a keepsake image alongside (or instead of) the recovered pixel picture. The match currently has a pencil sketch and the lantern a watercolour vignette; extend that visual language, especially to the bell, and keep the style consistent across chapters.
|
- [x] Produce illustrated object artwork for all twelve campaign discoveries: match, lantern, brass key, compass, little boat, anchor, stone bridge, harbour bell, missing gear, beacon lens, lighthouse and home.
|
||||||
- [ ] One transparent-background watercolour vignette per object with no baked-in text; save the exact generation prompt beside the PNG as `assets/artwork/<object>.prompt.txt`.
|
- [x] One transparent-background watercolour vignette per object with no baked-in text; exact prompts saved beside the PNGs in `assets/artwork/`.
|
||||||
- [ ] Record provenance in `assets/artwork/README.md`, add each PNG to `pubspec.yaml`, and give the campaign data and `CampaignLevel` an optional illustration field so `reveal()` does not hard-code asset paths. Fall back to `PixelPicture` when an object has no art yet.
|
- [x] Record provenance, bundle every PNG and connect optional `CampaignLevel.illustrationAsset` paths with `PixelPicture` fallback. The opening match memory shares the new match illustration.
|
||||||
- [ ] Check each image in the real portrait and landscape leaf with 1.5× text; keep it clear of clues, controls and the leaf navigation.
|
- [x] Check all images on the QA tablet in portrait and landscape at 1.5× text; keep navigation reachable by scrolling.
|
||||||
- [ ] Update [the code map](docs/CODE_MAP.md) asset list and the campaign-content notes once the final asset names are chosen.
|
- [x] Update [the code map](docs/CODE_MAP.md) and [artwork provenance](assets/artwork/README.md) with the complete asset set.
|
||||||
|
|||||||
@@ -19,3 +19,27 @@ The harbour is a soft-edged northern-island watercolour; the closed cover is fad
|
|||||||
## Flutter migration (2.0)
|
## Flutter migration (2.0)
|
||||||
|
|
||||||
Flutter bundles the existing originals from this folder directly. `lib/ui/paper.dart` positions content on the single page and overlays native Flutter handwriting on the cover label. `lib/main.dart` displays the harbour, cottage and lantern art. The earlier Android resource paths above now live under `legacy/android/` for reference. No new pictures were generated for the migration.
|
Flutter bundles the existing originals from this folder directly. `lib/ui/paper.dart` positions content on the single page and overlays native Flutter handwriting on the cover label. `lib/main.dart` displays the harbour, cottage and lantern art. The earlier Android resource paths above now live under `legacy/android/` for reference. No new pictures were generated for the migration.
|
||||||
|
|
||||||
|
## Campaign discovery illustrations
|
||||||
|
|
||||||
|
`harbour-bell-vignette-v1.png` is an original 1180×1333 RGBA watercolour generated with the built-in image generation tool on 2026-10-31. It depicts a tarnished brass bell, weathered timber mounting and knotted rope, with no baked-in text. The generated alpha transparency is preserved. The exact prompt is saved in `harbour-bell-vignette-v1.prompt.txt`; no external reference images were used.
|
||||||
|
|
||||||
|
Campaign entries declare an optional full `illustrationAsset` path in `assets/campaign.json`. All twelve discoveries have a watercolour. The lantern reuses `lantern-vignette-v1.png`; the bell and remaining ten objects have dedicated vignettes. The opening match memory shares the campaign match image. The reveal displays the illustration at a bounded height on the diary paper; entries without an illustration, or images that fail to load, retain their recovered `PixelPicture`. New illustrations must also be listed in `pubspec.yaml`.
|
||||||
|
|
||||||
|
|
||||||
|
### Complete discovery set
|
||||||
|
|
||||||
|
The following ten original vignettes were generated with the built-in image generation tool on 2026-10-31, without external reference images. Each uses transparent-background watercolour and fine graphite pencil, with muted sea blues, warm ivory, worn brass and restrained amber accents. The generated PNGs retain their original alpha channel. No text is baked into these images; the key tag and compass face are intentionally unlettered.
|
||||||
|
|
||||||
|
| Discovery | PNG | Exact prompt |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Match | [match-vignette-v1.png](match-vignette-v1.png) | [match-vignette-v1.prompt.txt](match-vignette-v1.prompt.txt) |
|
||||||
|
| Brass key | [brass-key-vignette-v1.png](brass-key-vignette-v1.png) | [brass-key-vignette-v1.prompt.txt](brass-key-vignette-v1.prompt.txt) |
|
||||||
|
| Compass | [compass-vignette-v1.png](compass-vignette-v1.png) | [compass-vignette-v1.prompt.txt](compass-vignette-v1.prompt.txt) |
|
||||||
|
| Little boat | [little-boat-vignette-v1.png](little-boat-vignette-v1.png) | [little-boat-vignette-v1.prompt.txt](little-boat-vignette-v1.prompt.txt) |
|
||||||
|
| Anchor | [anchor-vignette-v1.png](anchor-vignette-v1.png) | [anchor-vignette-v1.prompt.txt](anchor-vignette-v1.prompt.txt) |
|
||||||
|
| Stone bridge | [stone-bridge-vignette-v1.png](stone-bridge-vignette-v1.png) | [stone-bridge-vignette-v1.prompt.txt](stone-bridge-vignette-v1.prompt.txt) |
|
||||||
|
| Missing gear | [missing-gear-vignette-v1.png](missing-gear-vignette-v1.png) | [missing-gear-vignette-v1.prompt.txt](missing-gear-vignette-v1.prompt.txt) |
|
||||||
|
| Beacon lens | [beacon-lens-vignette-v1.png](beacon-lens-vignette-v1.png) | [beacon-lens-vignette-v1.prompt.txt](beacon-lens-vignette-v1.prompt.txt) |
|
||||||
|
| Lighthouse | [lighthouse-vignette-v1.png](lighthouse-vignette-v1.png) | [lighthouse-vignette-v1.prompt.txt](lighthouse-vignette-v1.prompt.txt) |
|
||||||
|
| Home | [home-vignette-v1.png](home-vignette-v1.png) | [home-vignette-v1.prompt.txt](home-vignette-v1.prompt.txt) |
|
||||||
|
|||||||
|
After Width: | Height: | Size: 1.2 MiB |
@@ -0,0 +1,7 @@
|
|||||||
|
Use case: illustration-story.
|
||||||
|
Asset type: a small recovered-object watercolour for Mara's island lighthouse notebook, matching the lantern and harbour bell keepsakes.
|
||||||
|
Style/medium: delicate traditional watercolour with fine graphite pencil outlines, affectionate observational storybook sketch, muted sea blue, warm ivory, aged brass and faded rust or amber accents as appropriate. Consistent intimate northern European island mood, no photorealism or 3D rendering.
|
||||||
|
Composition/framing: one compact centred isolated vignette, readable at small size, three-quarter view where appropriate, entire subject fully inside the image with clear margins.
|
||||||
|
Scene/backdrop: genuinely transparent background, soft irregular fading pigment edges, no paper texture or opaque backdrop, no enclosing box or frame.
|
||||||
|
Constraints: no letters, numbers, readable text, labels, logos or watermark; no extra unrelated objects. Keep the silhouette clear on warm diary paper.
|
||||||
|
Primary request: one modest old iron boat anchor, its curved flukes and ring clearly visible, with a short length of natural rope. Worn dark iron with restrained rust.
|
||||||
|
After Width: | Height: | Size: 2.5 MiB |
@@ -0,0 +1,7 @@
|
|||||||
|
Use case: illustration-story.
|
||||||
|
Asset type: a small recovered-object watercolour for Mara's island lighthouse notebook, matching the lantern and harbour bell keepsakes.
|
||||||
|
Style/medium: delicate traditional watercolour with fine graphite pencil outlines, affectionate observational storybook sketch, muted sea blue, warm ivory, aged brass and faded rust or amber accents as appropriate. Consistent intimate northern European island mood, no photorealism or 3D rendering.
|
||||||
|
Composition/framing: one compact centred isolated vignette, readable at small size, three-quarter view where appropriate, entire subject fully inside the image with clear margins.
|
||||||
|
Scene/backdrop: genuinely transparent background, soft irregular fading pigment edges, no paper texture or opaque backdrop, no enclosing box or frame.
|
||||||
|
Constraints: no letters, numbers, readable text, labels, logos or watermark; no extra unrelated objects. Keep the silhouette clear on warm diary paper.
|
||||||
|
Primary request: one antique lighthouse Fresnel lens as a compact circle of glass in a simple aged brass rim, clearly visible concentric stepped glass rings catching a small amber reflection. Three-quarter view, delicate sea-blue transparent glass, no surrounding lighthouse.
|
||||||
|
After Width: | Height: | Size: 1.0 MiB |
@@ -0,0 +1,7 @@
|
|||||||
|
Use case: illustration-story.
|
||||||
|
Asset type: a small recovered-object watercolour for Mara's island lighthouse notebook, matching the lantern and harbour bell keepsakes.
|
||||||
|
Style/medium: delicate traditional watercolour with fine graphite pencil outlines, affectionate observational storybook sketch, muted sea blue, warm ivory, aged brass and faded rust or amber accents as appropriate. Consistent intimate northern European island mood, no photorealism or 3D rendering.
|
||||||
|
Composition/framing: one compact centred isolated vignette, readable at small size, three-quarter view where appropriate, entire subject fully inside the image with clear margins.
|
||||||
|
Scene/backdrop: genuinely transparent background, soft irregular fading pigment edges, no paper texture or opaque backdrop, no enclosing box or frame.
|
||||||
|
Constraints: no letters, numbers, readable text, labels, logos or watermark; no extra unrelated objects. Keep the silhouette clear on warm diary paper.
|
||||||
|
Primary request: one small antique brass key with a rounded bow and simple teeth, with a little blank paper tag tied by worn string. The tag has absolutely no writing.
|
||||||
|
After Width: | Height: | Size: 1.8 MiB |
@@ -0,0 +1,7 @@
|
|||||||
|
Use case: illustration-story.
|
||||||
|
Asset type: a small recovered-object watercolour for Mara's island lighthouse notebook, matching the lantern and harbour bell keepsakes.
|
||||||
|
Style/medium: delicate traditional watercolour with fine graphite pencil outlines, affectionate observational storybook sketch, muted sea blue, warm ivory, aged brass and faded rust or amber accents as appropriate. Consistent intimate northern European island mood, no photorealism or 3D rendering.
|
||||||
|
Composition/framing: one compact centred isolated vignette, readable at small size, three-quarter view where appropriate, entire subject fully inside the image with clear margins.
|
||||||
|
Scene/backdrop: genuinely transparent background, soft irregular fading pigment edges, no paper texture or opaque backdrop, no enclosing box or frame.
|
||||||
|
Constraints: no letters, numbers, readable text, labels, logos or watermark; no extra unrelated objects. Keep the silhouette clear on warm diary paper.
|
||||||
|
Primary request: one old open brass pocket compass, its hinged lid and clear needle visible, understated sea-blue compass face with simple unlettered tick marks. No numbers, letters or writing.
|
||||||
|
After Width: | Height: | Size: 1.6 MiB |
@@ -0,0 +1,8 @@
|
|||||||
|
Use case: illustration-story.
|
||||||
|
Asset type: a small recovered-object illustration inside Mara's lighthouse keeper diary, companion to the existing lantern watercolour.
|
||||||
|
Primary request: one old harbour bell suspended beneath a short weathered timber crossbeam, with its clapper visible and a short knotted rope hanging below, recalling a clear note answered through the island fog.
|
||||||
|
Style/medium: delicate watercolour and fine graphite pencil, affectionate observational storybook sketch, muted sea blue, warm aged brass, faded rust accents; intimate northern European island mood.
|
||||||
|
Composition/framing: a single compact centred vignette, three-quarter view, bell silhouette readable at small sizes, all rope and timber fully inside the image with generous clear margins. No surrounding harbour scene.
|
||||||
|
Materials/textures: softly tarnished brass with a little sea-green patina, worn timber and natural rope, restrained fine hand-drawn details.
|
||||||
|
Scene/backdrop: genuinely transparent background with soft irregular fading pigment edges around the object, no paper background, no enclosing box or frame.
|
||||||
|
Constraints: no letters, no readable text, no watermark, no additional objects or characters, no decorative border. The image must sit naturally on warm diary paper.
|
||||||
|
After Width: | Height: | Size: 2.3 MiB |
@@ -0,0 +1,7 @@
|
|||||||
|
Use case: illustration-story.
|
||||||
|
Asset type: a small recovered-object watercolour for Mara's island lighthouse notebook, matching the lantern and harbour bell keepsakes.
|
||||||
|
Style/medium: delicate traditional watercolour with fine graphite pencil outlines, affectionate observational storybook sketch, muted sea blue, warm ivory, aged brass and faded rust or amber accents as appropriate. Consistent intimate northern European island mood, no photorealism or 3D rendering.
|
||||||
|
Composition/framing: one compact centred isolated vignette, readable at small size, three-quarter view where appropriate, entire subject fully inside the image with clear margins.
|
||||||
|
Scene/backdrop: genuinely transparent background, soft irregular fading pigment edges, no paper texture or opaque backdrop, no enclosing box or frame.
|
||||||
|
Constraints: no letters, numbers, readable text, labels, logos or watermark; no extra unrelated objects. Keep the silhouette clear on warm diary paper.
|
||||||
|
Primary request: one cosy northern-island stone cottage with a faded blue door, a softly lit amber window and chimney, a small step and a few tufts of heather around its compact base. Affectionate homecoming mood, no people, no landscape or sky background.
|
||||||
|
After Width: | Height: | Size: 1.8 MiB |
@@ -0,0 +1,7 @@
|
|||||||
|
Use case: illustration-story.
|
||||||
|
Asset type: a small recovered-object watercolour for Mara's island lighthouse notebook, matching the lantern and harbour bell keepsakes.
|
||||||
|
Style/medium: delicate traditional watercolour with fine graphite pencil outlines, affectionate observational storybook sketch, muted sea blue, warm ivory, aged brass and faded rust or amber accents as appropriate. Consistent intimate northern European island mood, no photorealism or 3D rendering.
|
||||||
|
Composition/framing: one compact centred isolated vignette, readable at small size, three-quarter view where appropriate, entire subject fully inside the image with clear margins.
|
||||||
|
Scene/backdrop: genuinely transparent background, soft irregular fading pigment edges, no paper texture or opaque backdrop, no enclosing box or frame.
|
||||||
|
Constraints: no letters, numbers, readable text, labels, logos or watermark; no extra unrelated objects. Keep the silhouette clear on warm diary paper.
|
||||||
|
Primary request: one northern-island lighthouse with an ivory stone tower, faded rust-red band, glazed lantern room giving a gentle amber light, and a tiny adjoining keeper building on a compact rocky base. Restrained sea-blue shadows. Isolated architectural vignette, no sea or sky background.
|
||||||
|
After Width: | Height: | Size: 2.6 MiB |
@@ -0,0 +1,7 @@
|
|||||||
|
Use case: illustration-story.
|
||||||
|
Asset type: a small recovered-object watercolour for Mara's island lighthouse notebook, matching the lantern and harbour bell keepsakes.
|
||||||
|
Style/medium: delicate traditional watercolour with fine graphite pencil outlines, affectionate observational storybook sketch, muted sea blue, warm ivory, aged brass and faded rust or amber accents as appropriate. Consistent intimate northern European island mood, no photorealism or 3D rendering.
|
||||||
|
Composition/framing: one compact centred isolated vignette, readable at small size, three-quarter view where appropriate, entire subject fully inside the image with clear margins.
|
||||||
|
Scene/backdrop: genuinely transparent background, soft irregular fading pigment edges, no paper texture or opaque backdrop, no enclosing box or frame.
|
||||||
|
Constraints: no letters, numbers, readable text, labels, logos or watermark; no extra unrelated objects. Keep the silhouette clear on warm diary paper.
|
||||||
|
Primary request: one small weathered wooden rowing boat, three-quarter view, blue-grey painted hull and plain wooden seats, a short mooring rope curled inside. No sail, people or surrounding seascape.
|
||||||
|
After Width: | Height: | Size: 481 KiB |
@@ -0,0 +1,7 @@
|
|||||||
|
Use case: illustration-story.
|
||||||
|
Asset type: a small recovered-object watercolour for Mara's island lighthouse notebook, matching the lantern and harbour bell keepsakes.
|
||||||
|
Style/medium: delicate traditional watercolour with fine graphite pencil outlines, affectionate observational storybook sketch, muted sea blue, warm ivory, aged brass and faded rust or amber accents as appropriate. Consistent intimate northern European island mood, no photorealism or 3D rendering.
|
||||||
|
Composition/framing: one compact centred isolated vignette, readable at small size, three-quarter view where appropriate, entire subject fully inside the image with clear margins.
|
||||||
|
Scene/backdrop: genuinely transparent background, soft irregular fading pigment edges, no paper texture or opaque backdrop, no enclosing box or frame.
|
||||||
|
Constraints: no letters, numbers, readable text, labels, logos or watermark; no extra unrelated objects. Keep the silhouette clear on warm diary paper.
|
||||||
|
Primary request: one single wooden match held diagonally, with a tiny warm amber flame at its darkened head. The entire match and flame visible; simple intimate keepsake, no hand or matchbox.
|
||||||
|
After Width: | Height: | Size: 2.2 MiB |
@@ -0,0 +1,7 @@
|
|||||||
|
Use case: illustration-story.
|
||||||
|
Asset type: a small recovered-object watercolour for Mara's island lighthouse notebook, matching the lantern and harbour bell keepsakes.
|
||||||
|
Style/medium: delicate traditional watercolour with fine graphite pencil outlines, affectionate observational storybook sketch, muted sea blue, warm ivory, aged brass and faded rust or amber accents as appropriate. Consistent intimate northern European island mood, no photorealism or 3D rendering.
|
||||||
|
Composition/framing: one compact centred isolated vignette, readable at small size, three-quarter view where appropriate, entire subject fully inside the image with clear margins.
|
||||||
|
Scene/backdrop: genuinely transparent background, soft irregular fading pigment edges, no paper texture or opaque backdrop, no enclosing box or frame.
|
||||||
|
Constraints: no letters, numbers, readable text, labels, logos or watermark; no extra unrelated objects. Keep the silhouette clear on warm diary paper.
|
||||||
|
Primary request: one old brass cogwheel from a lighthouse turning mechanism, clearly shaped evenly spaced teeth, central round axle hole, warm worn metal and a few fine graphite construction details. A single cogwheel, no other mechanism.
|
||||||
|
After Width: | Height: | Size: 2.3 MiB |
@@ -0,0 +1,7 @@
|
|||||||
|
Use case: illustration-story.
|
||||||
|
Asset type: a small recovered-object watercolour for Mara's island lighthouse notebook, matching the lantern and harbour bell keepsakes.
|
||||||
|
Style/medium: delicate traditional watercolour with fine graphite pencil outlines, affectionate observational storybook sketch, muted sea blue, warm ivory, aged brass and faded rust or amber accents as appropriate. Consistent intimate northern European island mood, no photorealism or 3D rendering.
|
||||||
|
Composition/framing: one compact centred isolated vignette, readable at small size, three-quarter view where appropriate, entire subject fully inside the image with clear margins.
|
||||||
|
Scene/backdrop: genuinely transparent background, soft irregular fading pigment edges, no paper texture or opaque backdrop, no enclosing box or frame.
|
||||||
|
Constraints: no letters, numbers, readable text, labels, logos or watermark; no extra unrelated objects. Keep the silhouette clear on warm diary paper.
|
||||||
|
Primary request: one small low arched stone footbridge from a northern island, irregular weathered grey stones, a few tufts of reeds near its base, a very small sea-blue water wash underneath fading into transparency. No wider landscape.
|
||||||
@@ -9,12 +9,14 @@
|
|||||||
"after": "A dry match, hidden in a tin. You strike it against the hearth. For a moment, the cottage feels like it remembers you.",
|
"after": "A dry match, hidden in a tin. You strike it against the hearth. For a moment, the cottage feels like it remembers you.",
|
||||||
"picture": "0011000011110000110000001000000100000010000001000",
|
"picture": "0011000011110000110000001000000100000010000001000",
|
||||||
"clues": "",
|
"clues": "",
|
||||||
"areas": ""
|
"areas": "",
|
||||||
|
"illustrationAsset": "assets/artwork/match-vignette-v1.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chapter": "I · The keeper’s cottage",
|
"chapter": "I · The keeper’s cottage",
|
||||||
"title": "Something to carry the flame",
|
"title": "Something to carry the flame",
|
||||||
"object": "The lantern",
|
"object": "The lantern",
|
||||||
|
"illustrationAsset": "assets/artwork/lantern-vignette-v1.png",
|
||||||
"before": "A small flame will not survive the wind. Mara’s next page shows what she carried on her evening rounds.",
|
"before": "A small flame will not survive the wind. Mara’s next page shows what she carried on her evening rounds.",
|
||||||
"after": "The lantern is soot-black but sound. Its warm circle of light reaches the cottage door. Beneath the handle, Mara has scratched your initials.",
|
"after": "The lantern is soot-black but sound. Its warm circle of light reaches the cottage door. Beneath the handle, Mara has scratched your initials.",
|
||||||
"picture": "0011100001010001111100100010010101001000100111110",
|
"picture": "0011100001010001111100100010010101001000100111110",
|
||||||
@@ -29,7 +31,8 @@
|
|||||||
"after": "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.",
|
"after": "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.",
|
||||||
"picture": "0011100010001001000100011100000100000011000001000",
|
"picture": "0011100010001001000100011100000100000011000001000",
|
||||||
"clues": "",
|
"clues": "",
|
||||||
"areas": "1,2,4,3;3,2,2,4;3,2,2,3"
|
"areas": "1,2,4,3;3,2,2,4;3,2,2,3",
|
||||||
|
"illustrationAsset": "assets/artwork/brass-key-vignette-v1.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chapter": "I · The keeper’s cottage",
|
"chapter": "I · The keeper’s cottage",
|
||||||
@@ -39,7 +42,8 @@
|
|||||||
"after": "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.",
|
"after": "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.",
|
||||||
"picture": "0001000001110001010101111111010101000111000001000",
|
"picture": "0001000001110001010101111111010101000111000001000",
|
||||||
"clues": "15,36",
|
"clues": "15,36",
|
||||||
"areas": "1,3,2,2;3,2,3,3;2,0,3,5"
|
"areas": "1,3,2,2;3,2,3,3;2,0,3,5",
|
||||||
|
"illustrationAsset": "assets/artwork/compass-vignette-v1.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chapter": "II · Across the tide",
|
"chapter": "II · Across the tide",
|
||||||
@@ -49,7 +53,8 @@
|
|||||||
"after": "The little boat is still tied fast. You bail out the rainwater, set the lantern in the bow, and push away from the steps.",
|
"after": "The little boat is still tied fast. You bail out the rainwater, set the lantern in the bow, and push away from the steps.",
|
||||||
"picture": "0001000000110000011100001000111111101111101000001",
|
"picture": "0001000000110000011100001000111111101111101000001",
|
||||||
"clues": "",
|
"clues": "",
|
||||||
"areas": "0,3,5,2;3,1,3,3;2,2,4,4"
|
"areas": "0,3,5,2;3,1,3,3;2,2,4,4",
|
||||||
|
"illustrationAsset": "assets/artwork/little-boat-vignette-v1.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chapter": "II · Across the tide",
|
"chapter": "II · Across the tide",
|
||||||
@@ -59,7 +64,8 @@
|
|||||||
"after": "The anchor catches. The boat swings into calmer water. In the pause, you hear a bell somewhere beyond the fog.",
|
"after": "The anchor catches. The boat swings into calmer water. In the pause, you hear a bell somewhere beyond the fog.",
|
||||||
"picture": "0011100001010000111000001000100100101010100011100",
|
"picture": "0011100001010000111000001000100100101010100011100",
|
||||||
"clues": "11,36,40",
|
"clues": "11,36,40",
|
||||||
"areas": "2,3,3,3;2,1,4,2;1,1,3,4"
|
"areas": "2,3,3,3;2,1,4,2;1,1,3,4",
|
||||||
|
"illustrationAsset": "assets/artwork/anchor-vignette-v1.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chapter": "II · Across the tide",
|
"chapter": "II · Across the tide",
|
||||||
@@ -69,12 +75,14 @@
|
|||||||
"after": "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.",
|
"after": "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.",
|
||||||
"picture": "0000000011111011000111000001100000111111110000000",
|
"picture": "0000000011111011000111000001100000111111110000000",
|
||||||
"clues": "",
|
"clues": "",
|
||||||
"areas": "2,1,3,5;0,2,5,3;2,3,2,2"
|
"areas": "2,1,3,5;0,2,5,3;2,3,2,2",
|
||||||
|
"illustrationAsset": "assets/artwork/stone-bridge-vignette-v1.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chapter": "II · Across the tide",
|
"chapter": "II · Across the tide",
|
||||||
"title": "An answer through the fog",
|
"title": "An answer through the fog",
|
||||||
"object": "The harbour bell",
|
"object": "The harbour bell",
|
||||||
|
"illustrationAsset": "assets/artwork/harbour-bell-vignette-v1.png",
|
||||||
"before": "A rope hangs from a timber frame. The bell above it has fallen silent. Restore the pattern before you call out across the water.",
|
"before": "A rope hangs from a timber frame. The bell above it has fallen silent. Restore the pattern before you call out across the water.",
|
||||||
"after": "One clear note travels into the fog. Two notes answer from the hill. Someone is waiting at the lighthouse.",
|
"after": "One clear note travels into the fog. Two notes answer from the hill. Someone is waiting at the lighthouse.",
|
||||||
"picture": "0001000001110000101000100010010001011111110001000",
|
"picture": "0001000001110000101000100010010001011111110001000",
|
||||||
@@ -89,7 +97,8 @@
|
|||||||
"after": "The missing gear slips into place. You turn the handle; the mechanism answers with a familiar, steady ticking. Mara smiles without looking up.",
|
"after": "The missing gear slips into place. You turn the handle; the mechanism answers with a familiar, steady ticking. Mara smiles without looking up.",
|
||||||
"picture": "0010100011111011000110101010110001101111100010100",
|
"picture": "0010100011111011000110101010110001101111100010100",
|
||||||
"clues": "9,24",
|
"clues": "9,24",
|
||||||
"areas": "2,3,3,3;1,3,5,3;1,2,4,3"
|
"areas": "2,3,3,3;1,3,5,3;1,2,4,3",
|
||||||
|
"illustrationAsset": "assets/artwork/missing-gear-vignette-v1.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chapter": "III · The last light",
|
"chapter": "III · The last light",
|
||||||
@@ -99,7 +108,8 @@
|
|||||||
"after": "You wipe the last salt from the lens. The lantern’s tiny flame stretches into a bright arc across the walls. Everything is ready.",
|
"after": "You wipe the last salt from the lens. The lantern’s tiny flame stretches into a bright arc across the walls. Everything is ready.",
|
||||||
"picture": "0011100010001010010011001101100100101000100011100",
|
"picture": "0011100010001010010011001101100100101000100011100",
|
||||||
"clues": "7,13,36,40",
|
"clues": "7,13,36,40",
|
||||||
"areas": "1,2,5,3;2,3,3,2;2,2,3,2"
|
"areas": "1,2,5,3;2,3,3,2;2,2,3,2",
|
||||||
|
"illustrationAsset": "assets/artwork/beacon-lens-vignette-v1.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chapter": "III · The last light",
|
"chapter": "III · The last light",
|
||||||
@@ -109,7 +119,8 @@
|
|||||||
"after": "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.",
|
"after": "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.",
|
||||||
"picture": "0001000001110011111110011100001010001101101111111",
|
"picture": "0001000001110011111110011100001010001101101111111",
|
||||||
"clues": "",
|
"clues": "",
|
||||||
"areas": "1,3,4,2;0,3,2,2;2,2,4,2"
|
"areas": "1,3,4,2;0,3,2,2;2,2,4,2",
|
||||||
|
"illustrationAsset": "assets/artwork/lighthouse-vignette-v1.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chapter": "III · The last light",
|
"chapter": "III · The last light",
|
||||||
@@ -119,7 +130,8 @@
|
|||||||
"after": "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.",
|
"after": "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.",
|
||||||
"picture": "0001000001110001111101111111010001001010100111110",
|
"picture": "0001000001110001111101111111010001001010100111110",
|
||||||
"clues": "",
|
"clues": "",
|
||||||
"areas": "0,1,6,2;2,3,4,3;0,2,4,3"
|
"areas": "0,1,6,2;2,3,4,3;0,2,4,3",
|
||||||
|
"illustrationAsset": "assets/artwork/home-vignette-v1.png"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ lib/
|
|||||||
└── board.dart Board, PencilMark painter, PixelPicture
|
└── board.dart Board, PencilMark painter, PixelPicture
|
||||||
|
|
||||||
assets/
|
assets/
|
||||||
├── campaign.json premise + 12 authored levels (chapter/title/object/before/after/picture/clues/areas)
|
├── campaign.json premise + 12 authored levels (chapter/title/object/before/after/picture/clues/areas; optional illustrationAsset)
|
||||||
├── narration/scripts.json canonical diary text, one record per recorded page
|
├── narration/scripts.json canonical diary text, one record per recorded page
|
||||||
├── narration/manifest.json source masters and checksums for narration
|
├── narration/manifest.json source masters and checksums for narration
|
||||||
├── audio/narration_manifest.json runtime tracks: file, duration, cue timings
|
├── audio/narration_manifest.json runtime tracks: file, duration, cue timings
|
||||||
@@ -52,7 +52,7 @@ assets/
|
|||||||
└── fonts/DancingScript.ttf bundled as family MaraHand; OFL.txt ships with licences
|
└── 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/puzzle_test.dart 8 domain tests (Java parity, generation, solver, awards, restore)
|
||||||
test/widget_test.dart 4 widget tests (page gestures, scrolling, landscape layout)
|
test/widget_test.dart 6 widget tests (page gestures, scrolling, landscape layout)
|
||||||
test/fixtures/java_boards.json 40 reference boards from the Java 1.7 version
|
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)
|
integration_test/notebook_test.dart one on-device end-to-end test (QA flavour only)
|
||||||
scripts/ narration verification, install smoke check, narration rendering
|
scripts/ narration verification, install smoke check, narration rendering
|
||||||
@@ -157,7 +157,7 @@ stateDiagram-v2
|
|||||||
| `contents` | `contents()` | `contents` | Dedication, opening-leaf links, ribbon bookmark, twelve campaign entries with access state, premise | none |
|
| `contents` | `contents()` | `contents` | Dedication, opening-leaf links, ribbon bookmark, twelve campaign entries with access state, premise | none |
|
||||||
| `briefing` | `briefing()` | `briefing-<i>` | Chapter, title, `before` passage, "Restore the pattern →" | `turnCampaign()` |
|
| `briefing` | `briefing()` | `briefing-<i>` | Chapter, title, `before` passage, "Restore the pattern →" | `turnCampaign()` |
|
||||||
| `game` | `game()` | `game-<key>` | Puzzle heading, area totals, square board, hint/undo, actions | `turnCampaign()` in campaign mode only |
|
| `game` | `game()` | `game-<key>` | Puzzle heading, area totals, square board, hint/undo, actions | `turnCampaign()` in campaign mode only |
|
||||||
| `reveal` | `reveal()` | `reveal-<i>` | Object name, `PixelPicture`, `after` passage, ending text on level 12 | `turnCampaign()` |
|
| `reveal` | `reveal()` | `reveal-<i>` | Object name, watercolour (or `PixelPicture` fallback), `after` passage, ending text on level 12 | `turnCampaign()` |
|
||||||
|
|
||||||
### Navigation methods (`Game`)
|
### Navigation methods (`Game`)
|
||||||
|
|
||||||
@@ -298,13 +298,14 @@ Board key formats (`<key>`):
|
|||||||
|
|
||||||
## Content and assets
|
## Content and assets
|
||||||
|
|
||||||
- `assets/campaign.json`: `{ premise, levels: [{ chapter, title, object, before, after, picture, clues, areas }] }`. `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/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/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/narration/manifest.json`: source masters, text hashes, WAV/FLAC hashes and cues — the provenance record.
|
- `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>`.
|
- `assets/audio/narration_manifest.json`: runtime `{ tracks: { pageId: { file, durationMs, cues: [{ startMs, endMs, text }] } } }`. `Narrator` plays `assets/audio/<file>`.
|
||||||
- Five recordings exist: `cottage.dedication`, `cottage.window`, `cottage.match.memory`, `cottage.folded.note`, `cottage.lantern.sketch`. The match-puzzle leaf has no recording.
|
- Five recordings exist: `cottage.dedication`, `cottage.window`, `cottage.match.memory`, `cottage.folded.note`, `cottage.lantern.sketch`. The match-puzzle leaf has no recording.
|
||||||
- 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.
|
- 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`; prompts and provenance live beside each file.
|
- 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 `<name>-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()`.
|
- Font: `assets/fonts/DancingScript.ttf` registered as `MaraHand`; `assets/fonts/OFL.txt` is registered with `LicenseRegistry` in `main()`.
|
||||||
- `pubspec.yaml` lists every bundled asset explicitly (no directory globs), so new assets must be added there.
|
- `pubspec.yaml` lists every bundled asset explicitly (no directory globs), so new assets must be added there.
|
||||||
|
|
||||||
@@ -329,8 +330,9 @@ Board key formats (`<key>`):
|
|||||||
| File | Covers |
|
| File | Covers |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `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/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 |
|
| `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/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/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_narration_assets.py` | Script text ↔ manifest ↔ WAV masters checksums |
|
||||||
| `scripts/check_flutter_install.py` | Read-only installed-app smoke check and screenshots |
|
| `scripts/check_flutter_install.py` | Read-only installed-app smoke check and screenshots |
|
||||||
| `scripts/render_narration.py` | Renders the fixed WAV masters and FLAC archives; the app never synthesises speech |
|
| `scripts/render_narration.py` | Renders the fixed WAV masters and FLAC archives; the app never synthesises speech |
|
||||||
@@ -352,6 +354,16 @@ flutter drive --driver test_driver/integration_test.dart \
|
|||||||
--dart-define=QA_TEST=true -d YOUR_ANDROID_DEVICE
|
--dart-define=QA_TEST=true -d YOUR_ANDROID_DEVICE
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Artwork QA uses one chapter per run to keep full-resolution screenshot exports within tablet memory limits. Run the following with `ART_CHAPTER=0`, `1` and `2` (zero-based chapters):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
flutter drive --driver test_driver/integration_test.dart \
|
||||||
|
--target integration_test/discovery_art_test.dart --flavor qa \
|
||||||
|
--dart-define=QA_TEST=true --dart-define=ART_CHAPTER=0 -d YOUR_ANDROID_DEVICE
|
||||||
|
```
|
||||||
|
|
||||||
|
Each run checks four discoveries in both orientations at 1.5× text, including navigation after scrolling. Chapter 0 also captures the opening match memory. Screenshots go to `artifacts/flutter-check/`.
|
||||||
|
|
||||||
## Conventions and invariants
|
## Conventions and invariants
|
||||||
|
|
||||||
1. **One state owner.** Navigation, the active puzzle and awards live in `Game`. Screens are pure builders in `_NotebookState`; UI-only toggles (e.g. folding the note) use `setState` after persisting the preference.
|
1. **One state owner.** Navigation, the active puzzle and awards live in `Game`. Screens are pure builders in `_NotebookState`; UI-only toggles (e.g. folding the note) use `setState` after persisting the preference.
|
||||||
|
|||||||
@@ -0,0 +1,82 @@
|
|||||||
|
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/ui/board.dart';
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
final binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
||||||
|
testWidgets('discovery artwork fits real leaves at larger text', (
|
||||||
|
tester,
|
||||||
|
) async {
|
||||||
|
expect(const bool.fromEnvironment('QA_TEST'), true);
|
||||||
|
final book = await Book.load();
|
||||||
|
// Export one chapter per run: retaining every full-resolution screenshot
|
||||||
|
// 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}));
|
||||||
|
addTearDown(() => SystemChrome.setPreferredOrientations([]));
|
||||||
|
await binding.convertFlutterSurfaceToImage();
|
||||||
|
for (final orientation in [
|
||||||
|
DeviceOrientation.portraitUp,
|
||||||
|
DeviceOrientation.landscapeLeft,
|
||||||
|
]) {
|
||||||
|
await SystemChrome.setPreferredOrientations([orientation]);
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
for (var index = chapter * 4; index < (chapter + 1) * 4; index++) {
|
||||||
|
game.reveal(index, readAhead: true);
|
||||||
|
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();
|
||||||
|
final asset = book.levels[index].illustrationAsset;
|
||||||
|
final art = asset == null
|
||||||
|
? find.byType(PixelPicture)
|
||||||
|
: find.image(AssetImage(asset));
|
||||||
|
expect(art, findsOneWidget);
|
||||||
|
await tester.ensureVisible(art);
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
await binding.takeScreenshot(
|
||||||
|
'discovery-$index-${orientation.name}-art',
|
||||||
|
);
|
||||||
|
final next = find.text(
|
||||||
|
index == 11 ? 'Return to the notebook' : 'Turn the page →',
|
||||||
|
);
|
||||||
|
await tester.ensureVisible(next);
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
expect(next.hitTestable(), findsOneWidget);
|
||||||
|
expect(game.solved, 0);
|
||||||
|
expect(tester.takeException(), isNull);
|
||||||
|
}
|
||||||
|
if (chapter == 0) {
|
||||||
|
game.showStory(3);
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
final match = find.image(
|
||||||
|
AssetImage(book.levels.first.illustrationAsset!),
|
||||||
|
);
|
||||||
|
expect(match, findsOneWidget);
|
||||||
|
await tester.ensureVisible(match);
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
await binding.takeScreenshot('opening-match-${orientation.name}');
|
||||||
|
expect(find.text('Next leaf →').hitTestable(), findsOneWidget);
|
||||||
|
expect(tester.takeException(), isNull);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await tester.pumpWidget(const SizedBox());
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -11,10 +11,12 @@ class CampaignLevel {
|
|||||||
object = data['object'],
|
object = data['object'],
|
||||||
before = data['before'],
|
before = data['before'],
|
||||||
after = data['after'],
|
after = data['after'],
|
||||||
|
illustrationAsset = data['illustrationAsset'] as String?,
|
||||||
picture = (data['picture'] as String).split('').map(int.parse).toList(),
|
picture = (data['picture'] as String).split('').map(int.parse).toList(),
|
||||||
clues = data['clues'],
|
clues = data['clues'],
|
||||||
areas = data['areas'];
|
areas = data['areas'];
|
||||||
final String chapter, title, object, before, after, clues, areas;
|
final String chapter, title, object, before, after, clues, areas;
|
||||||
|
final String? illustrationAsset;
|
||||||
final List<int> picture;
|
final List<int> picture;
|
||||||
Puzzle puzzle() {
|
Puzzle puzzle() {
|
||||||
final p = Puzzle(7, picture);
|
final p = Puzzle(7, picture);
|
||||||
|
|||||||
@@ -586,7 +586,7 @@ class _NotebookState extends State<Notebook> with WidgetsBindingObserver {
|
|||||||
);
|
);
|
||||||
case 3:
|
case 3:
|
||||||
body.addAll([
|
body.addAll([
|
||||||
const Sketch('match'),
|
discoveryArt(g.book.levels.first, height: 155),
|
||||||
writing(
|
writing(
|
||||||
g.recovered(0)
|
g.recovered(0)
|
||||||
? 'A pattern restored · a memory kept'
|
? 'A pattern restored · a memory kept'
|
||||||
@@ -1026,6 +1026,21 @@ class _NotebookState extends State<Notebook> with WidgetsBindingObserver {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget discoveryArt(CampaignLevel level, {double height = 190}) {
|
||||||
|
if (level.illustrationAsset case final asset?) {
|
||||||
|
return Image.asset(
|
||||||
|
asset,
|
||||||
|
height: height,
|
||||||
|
width: double.infinity,
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
semanticLabel: 'Watercolour illustration: ${level.object}',
|
||||||
|
errorBuilder: (_, _, _) =>
|
||||||
|
PixelPicture(level.picture, label: level.object, height: height),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return PixelPicture(level.picture, label: level.object, height: height);
|
||||||
|
}
|
||||||
|
|
||||||
Widget reveal() {
|
Widget reveal() {
|
||||||
final i = g.campaignIndex, l = g.book.levels[i];
|
final i = g.campaignIndex, l = g.book.levels[i];
|
||||||
return Leaf(
|
return Leaf(
|
||||||
@@ -1041,7 +1056,7 @@ class _NotebookState extends State<Notebook> with WidgetsBindingObserver {
|
|||||||
color: muted,
|
color: muted,
|
||||||
),
|
),
|
||||||
writing(l.object, size: 35),
|
writing(l.object, size: 35),
|
||||||
PixelPicture(l.picture, label: l.object),
|
discoveryArt(l),
|
||||||
writing(l.after, size: 25),
|
writing(l.after, size: 25),
|
||||||
gap(),
|
gap(),
|
||||||
writing(
|
writing(
|
||||||
|
|||||||
@@ -28,6 +28,17 @@ flutter:
|
|||||||
- assets/artwork/home-notebook-cover-v2.png
|
- assets/artwork/home-notebook-cover-v2.png
|
||||||
- assets/artwork/cottage-vignette-v1.png
|
- assets/artwork/cottage-vignette-v1.png
|
||||||
- assets/artwork/lantern-vignette-v1.png
|
- assets/artwork/lantern-vignette-v1.png
|
||||||
|
- assets/artwork/harbour-bell-vignette-v1.png
|
||||||
|
- assets/artwork/match-vignette-v1.png
|
||||||
|
- assets/artwork/brass-key-vignette-v1.png
|
||||||
|
- assets/artwork/compass-vignette-v1.png
|
||||||
|
- assets/artwork/little-boat-vignette-v1.png
|
||||||
|
- assets/artwork/anchor-vignette-v1.png
|
||||||
|
- assets/artwork/stone-bridge-vignette-v1.png
|
||||||
|
- assets/artwork/missing-gear-vignette-v1.png
|
||||||
|
- assets/artwork/beacon-lens-vignette-v1.png
|
||||||
|
- assets/artwork/lighthouse-vignette-v1.png
|
||||||
|
- assets/artwork/home-vignette-v1.png
|
||||||
- assets/narration/scripts.json
|
- assets/narration/scripts.json
|
||||||
- assets/audio/narration_manifest.json
|
- assets/audio/narration_manifest.json
|
||||||
- assets/audio/narration_cottage_dedication.wav
|
- assets/audio/narration_cottage_dedication.wav
|
||||||
|
|||||||
@@ -9,6 +9,91 @@ import 'package:lumen/ui/board.dart';
|
|||||||
import 'package:lumen/ui/paper.dart';
|
import 'package:lumen/ui/paper.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
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}));
|
||||||
|
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;
|
||||||
|
tester.view.devicePixelRatio = 1;
|
||||||
|
for (var index = 0; index < book.levels.length; index++) {
|
||||||
|
g.reveal(index, readAhead: true);
|
||||||
|
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();
|
||||||
|
final asset = book.levels[index].illustrationAsset;
|
||||||
|
if (asset != null) {
|
||||||
|
final art = find.image(AssetImage(asset));
|
||||||
|
expect(art, findsOneWidget);
|
||||||
|
expect(find.byType(PixelPicture), findsNothing);
|
||||||
|
await tester.ensureVisible(art);
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
expect(tester.getSize(art).height, 190);
|
||||||
|
} else {
|
||||||
|
expect(find.byType(PixelPicture), findsOneWidget);
|
||||||
|
}
|
||||||
|
final next = find.text(
|
||||||
|
index == 11 ? 'Return to the notebook' : 'Turn the page →',
|
||||||
|
);
|
||||||
|
await tester.ensureVisible(next);
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
expect(tester.getRect(next).bottom, lessThan(size.height));
|
||||||
|
expect(g.solved, 0);
|
||||||
|
expect(tester.takeException(), isNull);
|
||||||
|
}
|
||||||
|
g.showStory(3);
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
final match = find.image(
|
||||||
|
AssetImage(book.levels.first.illustrationAsset!),
|
||||||
|
);
|
||||||
|
expect(match, findsOneWidget);
|
||||||
|
expect(tester.getSize(match).height, 155);
|
||||||
|
final nextLeaf = find.text('Next leaf →');
|
||||||
|
await tester.ensureVisible(nextLeaf);
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
expect(nextLeaf.hitTestable(), findsOneWidget);
|
||||||
|
expect(tester.takeException(), isNull);
|
||||||
|
}
|
||||||
|
await tester.pumpWidget(const SizedBox());
|
||||||
|
});
|
||||||
|
|
||||||
|
testWidgets('a discovery without artwork keeps its pixel picture', (
|
||||||
|
tester,
|
||||||
|
) async {
|
||||||
|
final book = (await tester.runAsync(Book.load))!;
|
||||||
|
final original = book.levels.first;
|
||||||
|
book.levels[0] = CampaignLevel({
|
||||||
|
'chapter': original.chapter,
|
||||||
|
'title': original.title,
|
||||||
|
'object': original.object,
|
||||||
|
'before': original.before,
|
||||||
|
'after': original.after,
|
||||||
|
'picture': original.picture.join(),
|
||||||
|
'clues': original.clues,
|
||||||
|
'areas': original.areas,
|
||||||
|
});
|
||||||
|
final game = Game(book, Progress.memory());
|
||||||
|
game.reveal(0, readAhead: true);
|
||||||
|
await tester.pumpWidget(LumenApp(game: game, adsEnabled: false));
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
expect(find.byType(PixelPicture), findsOneWidget);
|
||||||
|
expect(game.solved, 0);
|
||||||
|
expect(tester.takeException(), isNull);
|
||||||
|
await tester.pumpWidget(const SizedBox());
|
||||||
|
});
|
||||||
|
|
||||||
testWidgets('page margins turn leaves; grid drags never turn', (
|
testWidgets('page margins turn leaves; grid drags never turn', (
|
||||||
tester,
|
tester,
|
||||||
) async {
|
) async {
|
||||||
@@ -179,7 +264,7 @@ void main() {
|
|||||||
tester.view.physicalSize = const Size(width, height);
|
tester.view.physicalSize = const Size(width, height);
|
||||||
tester.view.devicePixelRatio = 1;
|
tester.view.devicePixelRatio = 1;
|
||||||
addTearDown(tester.view.reset);
|
addTearDown(tester.view.reset);
|
||||||
final book = await Book.load();
|
final book = (await tester.runAsync(Book.load))!;
|
||||||
final game = Game(book, Progress.memory());
|
final game = Game(book, Progress.memory());
|
||||||
game.startCampaign(0);
|
game.startCampaign(0);
|
||||||
await tester.pumpWidget(LumenApp(game: game, adsEnabled: false));
|
await tester.pumpWidget(LumenApp(game: game, adsEnabled: false));
|
||||||
|
|||||||