# Overnight prologue candidate package

User authorization: independently build candidates for every piece required for the prologue, including character appearances, bust portraits and emotions, dialogue UI with speaker names, animation, tile maps, background presentation, and a scripted Godot prototype. Use the entire book for guidance; future descriptions and spoilers are allowed. The user reviews results later. No player movement, collision or pathfinding is required for this prologue.

The overnight heartbeat `malazan-prologue-overnight-candidates` is now **PAUSED**, confirmed through the automation tool and saved configuration. The candidate milestone is complete; it will not resume additional overnight work automatically.

## Walk head/weight movement — 17 October

User found the new walks improved but still missing head movement and invited online sprite study. Consulted schwarnhild's free itch.io four-direction NPC public preview, SLYNYRD's Human Walk Cycle and Top Down Character Animation articles. Sources and findings are recorded in WALK_STUDY.md; no reference art is integrated into the game.

The old face locks also froze head position. Added a native-pixel Aseprite weight pass: eight timed phases from the four existing limb drawings. Ganoes/Fiddler move through a two-pixel low-to-high range; commander/Surly use one pixel. Whole figures move rigidly, with planted soles retained by a tiny boot-edge adjustment. No limb/torso stretching or image scaling. Motion profiles are in characters.json and prepare_motion.py --weight-only reproduces the pass.

All four speaker walk_v6 sheets are 384x256; guards and separate Fiddler run retain their existing sources. ActorScript supports relative frame durations and uses their sum when matching cadence to travel speed. The gallery shares these assets. A dedicated walk_review.tscn compares old/new at matched cycle time across four directions and matched travel, without story captions or changes to book content. Focused preview and study are on the review board; the full v5 film remains labelled as predating the newer features. No new automated tests added or run.

## Portrait expression blends — 17 October

User requested a slight morphing effect when emotions change. The existing portrait variants line up closely, so implemented a shared 0.20-second in-place blend with no geometric deformation or bust movement. scripts/portrait_view.gd and art/portrait_blend.gdshader are used in dialogue and the F2 gallery.

Each component caches portrait history by character. Returning speakers blend from their own previous expression; different speakers never blend faces together. Repeated layout/gallery refreshes keep the current blend running. Rapid changes queue the most recent requested expression until the active blend finishes. Node-bound tweens respect the dialogue/gallery pause behavior. The text reveal is not blocked.

Rendered a dedicated --review-emotions study using the real gallery/dialogue views and separate expression-preview captions. The 11-second clip and unique portrait_blend_* captures are on the review board. The longer prologue v5 film is labelled as predating this feature. No new art generation or automated tests were needed or run.

## Surly head proportion candidate — 17 October

User noted Surly's head proportions compared with the cast. The sprite's rounded hair mass, especially in profile/back view, read younger and bulkier than her close-cropped portrait.

Generated walk_surly_v5 using built-in ImageGen with the previous sheet as edit target, the selected neutral portrait for identity, and the commander sheet for style/relative scale. Prompt and source are preserved. Aseprite uniformly slices/scales the new sheet into walk_v5 and idle_v5, using this source's own full head/neck reference per direction (cuts 37/35/35/30) instead of reusing the older oversized head. All four direction previews and a same-foot-anchor comparison are saved. Portraits remain the existing selected pair.

Comparison order is commander / previous Surly / revised Surly / Fiddler, direction rows south/west/east/north, displayed at exact 3x. The static Godot review render now also refreshes cast_gallery so it does not retain an older candidate. Current film is prologue_preview_v5.mp4. No new automated tests added or run. The revised proportions remain an unapproved candidate for user review.

## Tiptoe proportion correction — 17 October

User rejected Ganoes’s elongated legs. The old exporter stretched a four-pixel shin strip across ten pixels during a six-pixel rise, and the final generated source pose also had longer trousers. Removed both sources of elongation.

Current tiptoe_v3 preserves the complete neutral head/torso/legs and uses only the bent-forearm regions from source pose 2. All three frames translate by 0/1/2 pixels, with short boot/toe contacts staying at the floor. No thigh/shin/torso band is stretched. It still settles and holds, then lowers before turning. The source masters remain unchanged. This was an Aseprite adjustment to existing ImageGen artwork, with no new generation.

Added --poses-only to the reproducible preparation tool and fixed its held-pose selection indentation so exporting Ganoes cannot accidentally overwrite the soldiers. Updated selected assets, pose sheet, GIF, map/detail screenshots and review board. Full preview v4 refreshes the scene with this correction. No new automated tests added or run.

## Wall, arms and running correction — 17 October

Latest review: commander arms missing while leaning, actors facing merlons instead of gaps, duplicate chin/artifacts in Fiddler’s run.

Cause: rectangular idle-reference patches erased the leaning arm pixels and mixed upright idle-head anatomy with forward-leaning run anatomy. Removed the held-pose overlays entirely and disabled idle-head/back-core overlays for running. Re-exported existing ImageGen masters with Aseprite as commander/fiddler lean_v3 and fiddler run_v2. No new generated art was required. The reproducible export tools and character manifest now select the corrected variants; old variants remain for comparison.

Moved wall positions 32 px right into gap centres: Ganoes (304,164), commander (368,164), Fiddler (432,164). Updated both authored routes and map metadata. Ganoes’s initial position now reads the map stop instead of a second hardcoded coordinate. Soldier entry/exit is shorter by 32 px; same movement speeds and typewriter settings.

Static Godot staging render inspected at game scale. Full scene recording completed all 48 speaking paragraphs and 7600 frames at 60 fps (126.67 seconds). All four Fiddler run directions are linked in the review board. Refreshed full film is prologue_preview_v3.mp4. Visual rendering only; no new automated tests added or run. Earlier motion notes below are history.

## Motion revision after user review — complete

User feedback: move actors closer to the wall; visible tiptoe height; natural held wall poses; stronger arm/leg motion; stop eye/hair shimmer and fiddle flipping; shorten arrivals; show fast typewriter text. Later steering: fiddle soldier should run in and run out after the order.

Implemented: speaker feet y=164 rather than 184, aligned with merlons; nearby stair entry at (496, 224); commander 84 px/s, fiddle entry 124/run exit144 px/s, escort76 px/s. Four speaker walks now use 192×256 four-phase sheets; stable idle strips 48×256; guards unchanged. Separate fiddle run has four directions and two airborne phases, not a sped-up walk. Head and core pixels are stabilised in Aseprite. Fiddle attachment stays consistent. Ganoes’s upper body rises 6 px with toes fixed. Held soldier poses replace the looping motions. Ganoes lowers out of tiptoe before turning. Final cleanup corrects repeated contact/passing leg phases within a central leg mask, preserving asymmetric gear. tools/prepare_motion.py reproduces these preparations from the saved masters. Pixel snapping and shorter establishing timing are enabled. Camera stays fixed for this pass. Typewriter 70 characters/s with 35/90 ms punctuation pauses now appears in the actual review film; manual reveal/advance remains.

Built-in ImageGen generated the new sources; exact prompts are preserved. The first six-column commander attempt was discarded for repeated poses. Current selected source/runtime paths come from content/characters.json and art/CANDIDATE_MANIFEST.json. New revision assets remain unapproved.

Visual production: full Godot film rendered 48 speaking paragraphs, 7652 frames at 60 fps (127.53 seconds), plus a static coordinate/pose render. Partial-dialogue capture demonstrates typewriter reveal. No new automated tests were added or run in this iteration. Logs are under review-evidence/motion-v2/. Historical overnight test results below refer to the previous candidate build. The existing asset validator’s dimension assumptions were maintained for the new selected frame counts.

Start at MOTION_REVISION.md or review.html; video is art/previews/prologue_preview_v2.mp4. F2 gallery, arrows facing, V fiddle walk/run. Earlier film remains for comparison. The overnight heartbeat remains PAUSED.

## Current handoff — candidate milestone complete

The selected scene is now **scenes/prologue.tscn** and run.sh launches it. Start with REVIEW_START_HERE.md or review.html. All assets remain unapproved.

- Cast: Ganoes four busts + walk/tiptoe; commander two busts + walk/lean; fiddle soldier two revised busts + walk/lean; Surly two revised busts + walk; one reusable hooded guard model for two actors.
- Current paths are authoritative in content/characters.json. Fiddler and Surly use runtime walk_v3 and portrait_v2; the other walks use_v2. Do not accidentally revert to clipped walk_v1 exports.
- Environment: panorama_v2, city_band_v4, masonry atlas_v1, quiet floor_v2 (dense alternative with M), portal_v1 and pike-tip vane_v2. The map has real TileMapLayers and a zero-based coordinate overlay.
- Runtime: 108 cues, 48 speaking paragraphs, 58 exact speech fragments; separate narration, original paragraph reference, pagination, manual/autoplay, speaker-name tags, large/compact portraits and a pauseable cast gallery. Surly’s speaker label changes to Laseen after her correction.
- Walk routes now pass around the tower footprint and approach its south-facing door. No collision/pathfinding was added. Review-film inspection caught and corrected the earlier route across the prop.
- Actual Godot check: PROLOGUE_TEST_OK cues=108 dialogue_paragraphs=48 captures=22. Read-only validator passed quote order/exactness, five walk atlases, three pose strips, ten busts and tile/map contracts. Film run and decode results are recorded in review-evidence/.
- Review board indexes 24 selected assets and 36 generated source masters, all with exact prompts. art/CANDIDATE_MANIFEST.json includes source hashes. All 147 local review-page references resolved.
- The silent 1080p film is approximately two minutes (2877 frames / 24fps) and uses accelerated text and hides narration for a compact overview. Interactive gameplay retains slower pacing and optional narration.
- Remaining review issues: small-sprite polish/foot contact/hair consistency; commander scar asymmetry in map views; damaged fiddle clarity; Surly’s plainness; tower integration and flat battlement composition; busy masonry; city geography interpretation; final typography/timing/audio. These are explicitly documented, not silently approved.
- New art used built-in ImageGen. Aseprite performed preparation/export; Python image processing was read-only boundary/contract analysis. The optional 64-colour palette cleanup is not selected in the engine.

The book is always authoritative and can be read ahead freely, with spoilers allowed. Later appearances guide continuity; prologue age/equipment/actions remain appropriate to that time. Do not use the old Fire Emblem art as a visual reference.

## Production choices to exercise

- Game: 640x360 logical, 3x integer scaling at 1080p, 32x32 environment tiles.
- Map animation candidates: 48x64 frames. The user has not approved a final sprite style; these are exploratory candidates, never the rejected v2 art.
- Dialogue bust candidates: 160x192 logical source exports. Exercise a 128x160 display alternative in UI to compare visibility and map coverage. Busts may extend above a bottom dialogue panel.
- Speaker name is part of the dialogue panel. Characters face inward; do not flip the commander's scar to the wrong anatomical side.
- World layers: distant-city art, floor tiles, actors with foot anchors and depth sorting, foreground walls/props, smoke, dialogue overlay.
- Main scene is fully scripted: authored waypoints, walk/idle/facing/pose cues, dialogue and camera waits.
- ImageGen creates new art. Aseprite only performs cleanup, palette work, slicing, alignment, scaling and exports. Save generated source masters, exact prompts and processed candidates separately.
- Rejecting a candidate never approves its successor. All overnight art remains reviewable draft material.

## Milestones

- [x] Read prologue and later appearance notes; verify Surly's brown eyes/fair short hair from Chapter 1.
- [x] Godot 4.7.2 installed; generic starter imports and the separate sprite-review scene runs.
- [x] Mark distorted v2 small sprite rejected. Save fresh 32x48/48x64 comparison and beginner guide.
- [x] Produce a coherent neutral bust candidate for each speaking character: Ganoes, commander, fiddle-carrying Bridgeburner, Surly.
- [x] Produce restrained expression variations; exercise surprise/shock on Ganoes as a separate review test rather than force it into an inappropriate moment.
- [x] Produce map animation source candidates for four speakers and a generic hooded guard; keep guards reusable and without large portraits.
- [x] Produce modular limestone floor/wall tile candidates, a citadel portal and the correct demon-vane prop, then assemble a coordinate-indexed battlement.
- [x] Implement two portrait/layout size candidates with speaker names, page advance, and legible book dialogue.
- [x] Assemble a cutscene-only preview with entry/exit choreography, walking animation and dialogue; use the supplied prologue text for dialogue.
- [x] Exercise an opening establishing-art presentation that fades into the top-down map, plus restrained smoke/vane animation.
- [x] Run Godot import/startup checks, capture screenshots and preview animations, record visual defects honestly.
- [x] Create a review index with thumbnails, source evidence, exact prompts, candidate labels, controls, and next decisions. Pause the overnight heartbeat at completion.

## Character evidence

Prologue is authoritative for age, current outfit and scene condition. Later descriptions guide continuity, never retroactively add future equipment or age.

- **Ganoes:** twelve, noble wine merchant's son, black hair (Chapter 1:625), pleasant face (1:303), tall and broad later (1:387, 3:121). Prologue outfit is unspecified; tailored indigo civilian clothing, ivory linen and restrained trim are user-directed interpretations. No armour or sword.
- **Commander:** young for rank; grey eyes; burn/scarring on anatomical LEFT cheek and jaw; dark-grey shoulder cloak; silver stone bridge with ruby flames brooch; armour, vambraces, longsword. Later Whiskeyjack descriptions guide a reserved, sturdy veteran face without making this younger man an elderly greybeard. Facial hair and exact hair colour remain interpretation where prologue is silent.
- **Fiddle-carrying Bridgeburner:** wiry adolescent a few years older than twelve; pockmarked face and backs of hands; mixed foreign armour over threadbare stained uniform; broken scorched fiddle on his back; shortsword in cracked wooden scabbard. Later Fiddler description explicitly has lank RED hair (Chapter 4:89). Keep the prologue boy young, without an adult beard or later equipment.
- **Surly:** dusky blue Napan skin, thin plain/unmemorable features, close-cropped mousy hair like a soldier, salt-stained grey robe; Chapter 1:701 confirms fair hair and BROWN eyes, little changed seven years later. Impassive expression and a restrained cold smile are the main prologue states. No crown, glamorous costume or beauty treatment.
- **Two Claw acolytes:** tall, black-robed, hands inside sleeves, hood-shadowed faces. One reusable generic model with slight pose/timing variation is sufficient. No glowing eyes, skull masks, visible faces or invented insignia.

## Earlier progress notes (chronological history)

Current deliverable root is this directory. Original book chapters are at `/home/vladc/HomeLab/media/ebooks/reading/gardens-of-the-moon-chapters`; prior textual design notes are under `/home/vladc/HomeLab/malazan-fe/design/bible/out-full`. Do not use old Fire Emblem art as a visual reference. `art/ASSET_STATUS.md` records existing rejected and draft sprites. `review_art.sh` launches the size comparison; the generic `run.sh` currently launches the old causeway demonstration, the current main scene is now the verified prologue.

### Neutral portrait pass completed

Four neutral transparent bust source candidates and exact prompts are saved in `art/source/portrait_*_neutral_v1.*`. These still need runtime-size exports and visual checks. Commander left-cheek scar is on viewer-right as intended. Fiddler has red hair and the scorched fiddle, but the face reads a little older and the generator added thin linear facial scars beyond the specified pockmarks; refine or flag. Surly has the correct blue skin, short fair mousy hair, brown eyes and salt-stained grey robe, but the face still leans conventionally attractive; flag this as a fidelity issue rather than claim the plainness is solved.

### Walk-sheet source pass completed

Five generated3x4 source sheets and exact prompts now exist at `art/source/walk_{ganoes,commander,fiddler,surly,claw}_v1.*`. Their rows are south, west, east, north; columns step, idle, opposite step. They need processing into aligned48x64 frame atlases and animation checks. Child/adolescent/adult target rendered heights44/50/56 pixels; Surly54 and guards58. Known source fidelity issues: the commander scar is mirrored into both side views; Surly's hair is fuller than the close-cropped text description; Fiddler's fiddle neck is not unambiguously broken at map scale. Record these for review, do not silently approve.

### Processed assets and first environment/emotion candidates

- Processed walk atlases: `art/sprites/*_walk_v2.png`, 144x256, twelve48x64 cells;3x animated south-walk previews in `art/previews/*_walk_south_v2.gif`. Do not use `_walk_v1.png`: naive equal-row cutting clipped source figures. Fixed by read-only Python connected-component analysis and Aseprite slicing/alignment using `art/source/walk_*_v1.frames.json`. Each character uses one scale factor for all frames.
- Four neutral runtime busts: `art/portraits/{ganoes,commander,fiddler,surly}/neutral_v1.png`,160x192.
- New emotion source candidates saved: Ganoes proud and surprised; Surly cold smile. Need runtime exports.
- Masonry atlas source `art/source/tiles_mocks_hold_v1.png` is4x4 cells; remove thin generated grid lines by inset cropping before runtime export.
- Citadel portal source saved.
- Vane source v1 is still too dragonlike and has the shaft continuing above the figure, contrary to the vane squatting on the pike point. Make a targeted correction or explicitly flag before review.

### Additional source candidates

- Ganoes scowl, commander grimace and Fiddler wry expression sources saved beside the neutral portraits. With Ganoes proud/surprised and Surly cold smile, all speakers now have expression variation candidates.
- `prop_vane_v2.png` corrects the mounting: the crouched winged demon is at the pike tip. Prefer this to v1. Its sculptural treatment is still an interpretation of cold-hammered iron.
- `pose_ganoes_tiptoe_v1.png` is a3-frame north-facing idle/rise/lean source strip for the book's initial tiptoe action. Needs component slicing and animation scale matching.

### Assembly and first full runtime check

Implemented `scripts/prologue.gd`, `prologue_actor.gd`, `dialogue_view.gd`, `map_overlay.gd`, `scenes/prologue.tscn`, a smoke shader, and `tools/compile_prologue.py`. Timeline contains101 cues,48 speaking paragraphs and58 verbatim quoted fragments extracted from the user's book. Pure narration paragraphs are also included; B opens the original paragraph including attributions. Main scene is not yet switched from generic until final checks.

A first Xvfb Godot run completed with `PROLOGUE_TEST_OK cues=101 dialogue_paragraphs=48 captures=19`. Actual engine captures are at `art/previews/prologue/`. Found and corrected a crop bug that left the city background blank on the right; new crop exported through Lua as `city_band_v2.png`, later superseded by `city_band_v3.png` from a more faithful panorama. Changed wall row to alternate merlons/gaps and reduced repetitive floor variation. Ending smoke now rolls across the whole view. Need repeat runtime check after these and later refinements.

### Fidelity refinements

Fiddler neutral/wry v2 sources and runtime160x192 busts remove invented linear scars, soften age toward15 and reduce spiky hair toward lank red. Surly neutral/cold-smile v2 sources and runtime busts use a closer soldier-like haircut and plainer face. Surly source walk sheet v2 mirrors this haircut but still needs component analysis and runtime export. Prefer these new portrait families in the character manifest once it exists.

Panorama `mocks_hold_background_v2.png` is substantially closer to the book: intact intervening city, fires/smoke concentrated at the distant inland edge, one silt-coloured river, correct crouched demon on pike tip. It still interprets city architecture and bridges. Update the establishing view and band to this version.
