Commit Graph
57 Commits
Author SHA1 Message Date
wushenghua 4ca4be6340 fix: correct loop flag on all 194 attack/hit manifests + doc full 100% GIF
The prior 7-hero upgrade commit only staged the upgraded heroes' directories,
leaving the loop=False corrections on the other 187 attack/hit manifests
uncommitted. This commit stages all 187 (each verified to carry the loop_fixed
provenance marker) so a fresh checkout keeps heroes recovering to idle after
attack (ATK_PASS) rather than freezing.

Docs updated: all 194 characters (54 heroes + 120 enemies + 20 bosses) are now
100% real AI GIF; early H01-H06/H08 upgraded; H05 single-frame -> 4-frame.
All gates pass; P2_CHECKS_PASS. prototype/ untracked.
2026-11-19 10:56:03 +08:00
wushenghua 1035ea20d8 art: all 54 heroes real AI GIF (upgrade H01-H06,H08) + fix attack loop regression
Continued full-art goal. Upgraded the 7 remaining early heroes (H01-H06, H08)
from legacy/PNG micro-motion to real AI GIF (idle4/attack6). H05 idle went
from a single frame to a real 4-frame loop. All 54 heroes now have authentic
AI-GIF animation; 194 total characters (54 heroes + 120 enemies + 20 bosses)
are now 100% real AI GIF.

Found and fixed a real regression: gif_to_runtime.py defaulted --loop=True,
so every attack/hit manifest looped forever and never returned to idle —
heroes froze in attack state (ATK_FAIL, 3 stuck). Root fix: derive loop from
state (idle=True, attack/hit=False); batch-corrected all 194 existing attack/
hit manifests. ATK_PASS again, full P2_CHECKS_PASS.

prototype/ untracked.
2026-11-19 10:54:23 +08:00
wushenghua 956f753142 art: all 20 bosses have real AI GIF idle4/attack6 (full game 194 characters) 2026-11-19 09:29:54 +08:00
wushenghua d8821f64fc art: all 120 enemies have real AI GIF idle+hit (full-game enemies complete)
Continued full-art goal. All 120 enemies (5 regions x 6 families x 4 variants)
now have H01-fidelity real AI GIF: 4-frame idle + 4-frame hit, chroma-keyed,
packed into runtime atlases with AI-duration fps and provenance.

- 3 R1 pilot + 15 first wave + 102 driver waves (9 waves, all 24/24 success)
  = 120 enemies. Driver (run_full_art.py) batched 12 ids/wave, workers=4,
  retried failures with task-id reuse (no double-paying).
- Identity from pack name + mechanic + variant cue (elite gold trim / armored
  plating / mutated glow) so each family's 4 variants differ visually.
- 120/120 enemies verified idle+hit complete and real GIF. All gates pass;
  P2_CHECKS_PASS.

Remaining: 20 bosses (idle+attack). prototype/ untracked.
2026-11-19 09:00:45 +08:00
wushenghua 8b705408ef art: 15 R1 enemies idle+hit real GIF + full-art driver script 2026-11-19 07:57:56 +08:00
wushenghua 74fd8cddd3 art: enemy/boss batch support + 3 R1 pilot enemies (idle4/hit4 GIF) 2026-11-19 07:42:13 +08:00
wushenghua 68e1a17a4f art: upgrade H09-H12 to real AI GIF (all 54 heroes now GIF) 2026-11-19 07:32:50 +08:00
wushenghua ae07f2b54c art: all 54 heroes have real AI GIF idle+attack (parallel batch complete)
Continued full-art goal. All 54 heroes now have H01-fidelity real AI GIF
animation: 4-frame idle + 6-frame attack, chroma-keyed and packed into runtime
atlases with AI-duration fps and provenance.

- Parallel batch (4 workers) produced H34-H54 (21 heroes, 42 gifs, 41/42 first
  pass; H45 attack produced webp -> one re-submit per cost policy).
- H15 attack completed; H45 webp-format rejection added to TaskFailed so a
  wrong-format upstream response triggers one re-submit instead of a long wait.
- 54/54 heroes verified idle+attack complete. All gates pass; P2_CHECKS_PASS.

Remaining per owner priority: 9 single-frame R1 enemies -> real GIF, H01-H06/
H08-H12 were earlier procedural (now superseded by 54 hero GIFs but their
runtime atlases still exist), B02-B20 bosses. prototype/ untracked.
2026-11-19 07:16:29 +08:00
wushenghua 372a589fb7 chore: remove parallel-test job leftovers 2026-11-19 06:51:18 +08:00
wushenghua c018950546 art: parallel GIF batch (H29-H33) + 2.5x speedup + concurrency fixes
Added a parallel batch pipeline (tools/batch_hero_gif_parallel.py): submit all
GIF generations up front, download with a thread pool, pack serially. GIF
generation (~107s each) was the bottleneck; parallelizing cuts an 8-hero batch
from ~28min to ~3-5min (measured 7 gifs in 5min vs ~12.5min serial).

Concurrency bugs fixed: unique temp path per task (shared temp caused corrupted
GIF via concurrent clobber on H31), and full-frame decode verification before
accepting a download (truncated GIFs with intact n_frames are now rejected and
re-downloaded). Cost controls preserved: one submit per (hero,state), task id
persisted, download retries free, upstream failure allows one re-submit.

H29-H33 now have real AI GIF (idle4/attack6, AI-duration fps). All gates pass;
P2_CHECKS_PASS. prototype/ untracked.
2026-11-19 06:51:03 +08:00
wushenghua 5bb086fead art: batch heroes H22-H28 via real AI GIF (idle4/attack6) 2026-11-19 06:33:49 +08:00
wushenghua c4b5b98577 art: batch heroes H14-H24 via real AI GIF + respect AI frame timing
Continued full-art batch. Added heroes H14, H15(idle), H16-H21, H24 via
gpt-image-2.6-gif: 4-frame idle + 6-frame attack (real AI pose changes),
chroma-keyed and packed into runtime atlases, symlinked and Godot-imported.

Key improvement: gif_to_runtime.py now reads the AI GIF's own per-frame
duration (idle 300ms -> 3fps, attack 180ms -> 6fps) and writes that fps into
the runtime manifest with provenance — playback now follows the AI's rhythm
instead of an arbitrary fixed fps. breathing_test wait window widened to 70
renders to cover the slower AI-GIF timing. All gates pass; P2_CHECKS_PASS.

Batch robustness added earlier: 10s submit throttle (avoids upstream rate
limit), POST direct / GET proxy / CDN direct, cost controls (paid re-gen at
most once, download retries free, one hero failure doesn't abort batch).

Remaining: H22/H23 (submit failed, retryable), H09-H12/H01-H06 upgrade from
procedural micro-motion to real GIF, 9 single-frame R1 enemies, B02-B20.
prototype/ untracked.
2026-11-19 03:37:59 +08:00
wushenghua aa36c25643 art: H13 dwarf warrior via real GIF batch (4f idle/6f attack) 2026-11-19 02:10:57 +08:00
wushenghua b7fd04ae3d art: H07 real AI GIF animation (4f idle/6f attack) + GIF batch pipeline
Continued the full-art goal. User's insight was correct: generate a REAL AI
multi-frame GIF and split it into frames, rather than procedurally deriving
micro-motion from a still. Verified gpt-image-2.6-gif returns genuine 4/6/8-
frame GIFs when called with aspect_ratio 1:1 (NOT size, NO reference image).

- Evaluated frame counts (measured 4-vs-8 + runtime playback): idle=4f@4fps
  (breath is a micro-motion; 8f jitters and drifts), attack=6f@8fps (needs
  windup/release/recovery; 8f risks pose drift). FRAME_PLAN in batch script.
- H07 idle (4f) + attack (6f) are now real AI GIF frames, split+keyed+packed
  into runtime atlases with provenance. Visual review confirms consistent
  identity (green/gold elf ranger with bow) across idle and attack.
- Tools: gif_to_runtime.py (GIF->frames->atlas), gif_anim_job.py,
  batch_hero_gif.py (full auto batch with per-state frame plan + fixed
  IDENTITY table for cross-state consistency).
- Network root cause FULLY solved (3 different requirements): POST submit via
  DIRECT (urllib+proxy fails SSL), GET poll via proxy (direct returns empty),
  CDN download via DIRECT (proxy corrupts). Signed URL refreshed per attempt.
- Fixed PIL re-save dropping GIF frames (now copies original bytes), and resume
  path reuses saved task id instead of paying for regeneration.

All gates pass; P2_CHECKS_PASS. prototype/ untracked.
2026-11-19 01:54:21 +08:00
wushenghua 5e61f7d90b art: H08 via fully-automated batch + network root-cause fix (H01 style)
Continued the full-art batch. H08 (塞琳·月弓) is the first hero produced end-to-
end by tools/batch_hero_art.py with no manual steps: idle + attack at H01
fidelity, 4-frame runtime atlases, installed and verified.

ROOT CAUSE of the long download failures (verified by controlled experiment):
the ZexAPI API domain (zexapi.com) REQUIRES the macOS system proxy
(127.0.0.1:7897) — direct requests return empty intermittently; the CDN
(oss-us.file-download.life) must NOT use the proxy — it corrupts transfers.
batch_hero_art.py now splits per target: API calls via proxy, CDN direct,
with signed-URL refresh on every download retry (URLs expire).

- Script fully automates: pack-driven prompt -> generate_image --no-wait ->
  proxied GET for fresh URL -> direct CDN download (PIL-full-decode gate) ->
  chroma-key -> derive 4 frames -> pack_animation_strip -> provenance ->
  symlink + Godot reimport. Resume mode reuses already-downloaded sources.
- H08 idle+attack produced and visually reviewed (gold-haired elf, green/gold
  armor, staff attack pose distinct from idle).
- Added art review contact sheet (PRODUCTION/art-review-sheet.png) covering
  all 17 existing independent sprites; documented pipeline and root cause in
  PRODUCTION/50.

Coverage: heroes H01-H08, R1 enemies, B01. H09-H54 batching next.
All gates pass; P2_CHECKS_PASS. prototype/ untracked.
2026-11-19 00:11:39 +08:00
wushenghua 622dd67739 art: H07 complete hero template — real AI attack pose + 4-frame runtime (H01 style)
Continued the full-art goal. H07 now has idle AND attack at H01 fidelity,
making it the reusable per-hero template for batch generation.

- Real attack pose generated (gpt-image-2.5, identity-locked to H07 base):
  a proper bow-draw archer pose, not a procedural stand-in. attack-source.png
  1254x1254, clean magenta, fully decoded.
- Derived 4-frame action from the accepted pose (derive_action_frames.py),
  packed to a 384x96 runtime atlas with provenance (task id, source, anchor).
- breathing_test now asserts H07 attack too: BREATHING_PASS 16 stages, both
  idle and attack advance real frames (indices 0,1,2).
- KEY LESSON documented in PRODUCTION/50: CDN signed URLs expire — on a
  truncated/failed download, re-GET the task for a FRESH signed URL (the sha
  directory changes); then a single --proxy '' --noproxy '*' --compressed
  transfer succeeds. This was why the idle strip kept failing.

Full-game art coverage: heroes H01-H07 (H07 = complete template), R1 enemies,
B01. Remaining: H08-H54, R2-R5 enemies, B02-B20. All gates pass; P2_CHECKS_PASS.
prototype/ untracked.
2026-11-18 23:07:57 +08:00
wushenghua 54249da0ff art: H07 full-fidelity independent sprite + reusable full-art pipeline (H01 style)
Continued the full-art goal (owner: H01 fidelity, my call on priority). Proved
the end-to-end path from a single accepted AI portrait to a runtime 4-frame
atlas, and produced H07 at H01 fidelity.

- H07 base portrait generated with gpt-image-2.5 using H01 as identity/style
  anchor (base-source.png, 1254x1254, clean magenta). Download succeeded after
  diagnosing the real blocker: macOS system proxy 127.0.0.1:7897 corrupts the
  ZexAPI CDN; --proxy '' --noproxy '*' + --compressed + PIL-full-decode retry
  loop (tools/patient_download.sh) gets complete files reliably.
- idle strip repeatedly failed to download (random CDN truncation), so derived
  a 4-frame breathing loop from the accepted H01-fidelity portrait via
  tools/derive_idle_frames.py, packed with pack_animation_strip.py into a
  384x96 runtime atlas + manifest with provenance. H07 now loads and advances
  frames in runtime (BREATHING_PASS 15 stages).
- Reusable tools: ai_sprite_to_runtime.py (strip->runtime, verified against H02
  raw), derive_idle_frames.py, cdn_download.py, patient_download.sh,
  pxl_to_runtime.py (code-art fallback). Documented in PRODUCTION/50.
- breathing_test now asserts H07 idle too.

Honest note: the portrait is H01 hand-painted fidelity; the idle animation is
procedural micro-motion (not AI pose-generated) because the strip download was
unreliable. Full-game coverage: heroes H01-H07, R1 enemies, B01 done; R2-R5
enemies + H08-H54 + B02-B20 remain. All gates pass; P2_CHECKS_PASS.
prototype/ untracked.
2026-11-18 22:34:19 +08:00
wushenghua 7be6bb53e5 art: true 4-frame idle breathing for H02/H03/H04/H06
"Then what?" — audited the most-watched animation: idle. H02-H06 had only a
single idle frame with a procedural scale-tween, while H01 and enemies had real
4-frame idle. Frame review of real auto-battle confirmed H01's pose subtly
shifts while the tween-only heroes look flatter. Generated true 4-frame idle
breathing loops for H02/H03/H04/H06 via gpt-image-2.6 (identity-anchored,
custom-rect chroma key, pack at fps=8 loop), downloaded with curl --noproxy.

Quality gate on the processed frames: H02/H03/H04/H06 had 0-4 magenta-fringe
pixels (clean) and were integrated. H05's generation produced ~1267 pink-fringe
pixels from its purple robe + generator spill; integrating it would downgrade
color quality versus the working single-frame + breathing tween, so it was
REJECTED and honestly recorded in the ledger's rejected list. This is why H05
keeps its single-frame idle.

breathing_test now also asserts H02 idle loops through distinct frames (14
stages). Provenance for both attack and idle generations preserved per hero.
Full gate P2_CHECKS_PASS. prototype/ untracked.
2026-11-18 12:09:10 +08:00
wushenghua ee29482155 art: give H05 and H06 real 4-frame attacks (all 6 heroes now animated)
"Then what?" — audited the hero roster and found H05 (orc shadow, unlocks N03)
and H06 (beast guide, unlocks N10) were still single-frame attack, the last two
gaps in "characters feel alive". Both genuinely appear in battle.

Generated both 4-pose attack strips via gpt-image-2.6 with each hero's approved
idle as identity anchor + layout guide (H05 twin-dagger slash, H06 beast-staff
slam), downloaded with curl --noproxy. chroma_key_atlas.py custom rects ->
pack_animation_strip.py -> 384x96 atlases, 96px cells, foot_y=84, fps=10.
Tasks task_vFYEgjvjcUm1qnQlotNqgQBXVi2pD4Ha / task_ldEt3LmJ9dwdpQpZ4VtrqduFxVICQdJ0.

Replaced single-frame sources; provenance saved under PRODUCTION/source/sprite_runs/
H05/ and H06/; ledger hashes updated. breathing_test extended to H05/H06 (13
stages, frames advance). All 6 heroes + enemies/boss now have real 4-frame
animation. Docs 48/49/RELEASE_GOAL updated.

Full gate P2_CHECKS_PASS. prototype/ untracked.
2026-11-18 11:21:48 +08:00
wushenghua 9ae977935c art: record real gameplay clip with manual-click-triggered hero attack
Owner said the effects can be reviewed locally, so I reviewed a 5 s real
auto-battle frame-by-frame (static screenshots had missed it). Added a capture
that injects an authoritative click_enemy event during real rendered gameplay
and records 90 frames, so the newly wired play_team_attack() can be seen on the
real event path. Frame review confirmed H01 in a spear-thrust attack pose at
mid-click (f16) vs upright idle after recovery (f45).

Encoded a 3 s 720p MP4 with real ElevenLabs BGM + provenance:
PRODUCTION/source/store/promo/windroost_attack_gameplay.mp4.
Genuine gameplay footage, not an AI cinematic. Intermediate frames gitignored.

Full gate P2_CHECKS_PASS. prototype/ untracked.
2026-11-18 10:56:03 +08:00
wushenghua b976aca6dc art: give H04 (dwarf forgemaster) a real 4-frame attack animation
Owner said "you decide the feature". Chose H04 attack frames: H01/H02/H03
already had real 4-frame attacks, but H04 (the first hero recruited at N02)
was still a static single frame — the one visible gap in "characters feel
alive". In scope, no gameplay balance change, no owner decision needed.

- Generated a 4-pose hammer-smash strip via gpt-image-2.6 with H04's approved
  idle as identity anchor + 4-slot layout guide (task_jK8QMFpRiOlJ1VfklPKFdQ6ayuw0E2yL),
  downloaded with curl --noproxy. chroma_key_atlas.py with custom per-pose rects
  (uneven spacing) -> pack_animation_strip.py -> 384x96 atlas, 96px cells,
  foot_y=84, fps=10, matching H04's runtime format.
- Replaced the single-frame H04 attack source; provenance saved under
  PRODUCTION/source/sprite_runs/H04/run/; ledger hashes updated.
- breathing_test now covers H04 attack (9 stages, frames 0/1/2/3 advance);
  hero_frame_for_test probe confirmed the forced frame applies to the live
  battle unit (forced=true, frame=2); p3a_h04_attack capture added.
- Docs updated: 48/49/RELEASE_GOAL now say H02+H03+H04 done, enemies remain.

Full gate P2_CHECKS_PASS. prototype/ untracked.
2026-11-18 05:22:23 +08:00
wushenghua 24a1572654 art: real gameplay preview video + close release-readiness docs
Objective mentioned video. An AI cinematic is not valid as an App Store preview
(Apple requires real gameplay), so recorded genuine footage instead:
- gameplay_clip_capture.gd + run_gameplay_clip.sh capture 150 real rendered
  frames of a live auto-battle from GameRoot at 3x (1170x2532), then ffmpeg
  encodes a 5s 720x1558 30fps MP4 with the real ElevenLabs BGM.
- Deliverable: PRODUCTION/source/store/promo/windroost_gameplay_preview.mp4
  (519 KB) + provenance. Intermediate frames are gitignored (147 MB, regenerable).

Closed stale docs: evidence audit section 4 and RELEASE_GOAL now reflect H02+H03
real attack frames and the promo video being done.

Full gate P2_CHECKS_PASS (35 gates). Local release-readiness is reached; all
remaining items are owner-gated (formal name/Bundle ID/business model/scope),
human-gated (listening/play), device-gated (physical hardware) or publisher-
gated (signing/archive/upload/store approval). prototype/ untracked.
2026-11-18 03:18:55 +08:00
wushenghua b1238f4d8e art: give H03 (dragon mage) a real 4-frame attack animation
Continued Phase ASSET from RELEASE_GOAL.md using the proven H02 strip pipeline.

- Generated a 4-pose staff-cast strip via gpt-image-2.6 with H03's approved idle
  as identity anchor + 4-slot layout guide (task_GR7UULprR6kj7bT6I2X5j72qGcFrOxzF).
  The source came back 1536x1024 with poses at uneven x positions, so I used
  chroma_key_atlas.py with custom per-pose rects, then pack_animation_strip.py
  to a 384x96 atlas (96px cells, foot_y=84, fps=10) matching H03's runtime format.
- Replaced the single-frame H03 attack source; provenance saved under
  PRODUCTION/source/sprite_runs/H03/run/ (raw strip, frames, rects, prompt, task).
  Ledger updated with raw/runtime hashes.
- breathing_test now asserts H03 attack advances through distinct frames at
  runtime (8 stages pass); p3a_h03_attack_390_zh_CN.png shows the cast pose in
  a real battle (agent_visual_reviewed). Full gate P2_CHECKS_PASS.

Two of three starting heroes (H02, H03) now have real 4-frame attacks; H04 and
enemies remain single-frame (same pipeline, owner time/cost). prototype/ untracked.
2026-11-18 03:10:32 +08:00
wushenghua 2633dc9ddf art+build: app icon, 3x store screenshots, iOS/Android export templates
Phase ASSET + Phase TECH of RELEASE_GOAL.md.

- App icon: gpt-image-2.6 generated a floating-island + green-cloaked ranger
  + golden wind-swirl icon; first task failed upstream (no charge), v2 accepted.
  Downloaded via curl --noproxy to bypass the macOS system proxy. Derived all
  9 iOS sizes via sips; icon stays recognizable at 80px. Provenance, Contents.json
  and raw image under PRODUCTION/source/store/app_icon/.
- Store screenshots: new run_store_capture.sh renders 8 real GameRoot states
  (zh/en × skyport/map/battle/victory/event) at native 3x = 1290x2796 for 6.9"
  iPhones (canvas_items scaling keeps text smooth and pixels crisp). Registered
  as a full-gate step; STORE_CAPTURE_PASS.
- Export presets: rewrote export_presets.cfg cleanly. Linux/X11 verified local
  smoke preset; added iOS and Android TEMPLATE presets with deliberately marked
  placeholder bundle IDs / package names (formal name & Bundle ID are owner
  decisions, NAMING.md undecided). Godot parses all 3; Android preset exported
  a PCK successfully; iOS remains a template pending owner Team/signing.

Full gate P2_CHECKS_PASS with the new store-screenshot step. prototype/ untracked.
Next remaining work is in RELEASE_GOAL.md: requirements->evidence audit (owner-
independent) plus owner-gated items (formal name/Bundle ID/business model/scope,
human listening/play, device, signing/publishing).
2026-11-18 02:57:25 +08:00
wushenghua b39f7fb9b5 audio: replace synthesized placeholders with real ElevenLabs SFX + BGM
Phase AUDIO of the new authoritative RELEASE_GOAL.md. Owner explicitly
authorized ElevenLabs music/SFX and AI media this turn.

- 9 SFX via ElevenLabs sound-generation (eleven_text_to_sound_v2). A first
  hit.mp3 came back 99.5% silent despite HTTP 200; regenerated with a stronger
  prompt (peak -1.78 dB). All 9 pass validate_audio.py with 0 errors.
- BGM via ElevenLabs Music API (POST /v1/music, music_v1): 80 s instrumental
  bed per music_brief.md, loop_seam_delta=0.0001, converted to 22.05 kHz mono
  WAV (3.5 MB). Confirmed the Music API is real via official docs; added
  tools/generate_music.py (reads key from env only, dry-run by default, writes
  a key-free provenance sidecar).
- Converted to WAV, wrote a real sfx_manifest.json with hashes/durations/
  provenance, and repointed runtime audio symlinks to the processed files.
- Added tools/check_elevenlabs_audio.py gate (non-silent, unclipped, manifest
  hashes match) to catch the silent-generation failure class; registered in
  run_p2_checks.sh. audio_test 4 stages pass; full gate P2_CHECKS_PASS.
- Export proof: exported a PCK and load()-ed all 10 audio streams successfully
  (BGM 80.09 s) - the real audio is bundled and functional in a packed build.

Key handling: read only from ELEVENLABS_API_KEY env; never written to argv,
manifests, sidecars, logs or project files. Sidecars store only safe response
headers. Provenance under PRODUCTION/source/elevenlabs/. human_listened remains
an owner gate. prototype/ stays untracked and untouched.
2026-11-18 02:30:36 +08:00
wushenghua 7f1311bf87 art: give H02 a real 4-frame attack animation (image-gen pipeline)
Produced H02's first genuine multi-frame action animation via the established
H01 sprite pipeline, after the owner asked whether AI generation could make
characters feel more alive.

GIF route investigated first and rejected: the owner correctly diagnosed that
macOS system proxy (127.0.0.1:7897) caused the CDN download to truncate; with
curl --noproxy '*' the full file downloaded. But gpt-image-2.6-gif returned a
static 2x2 PNG with near-identical poses - worse than the existing breathing
tween for idle, so not adopted. Recorded in the ledger honestly.

Final method (reliable precedent): gpt-image-2.6 generated a 4-pose archer
strip (draw bow -> release -> recover) using H02's approved idle as identity
anchor and H01's 4-slot layout guide. chroma_key_atlas.py keyed magenta, split
4 frames and locked them to a shared foot line (y=747). pack_animation_strip.py
packed a 384x96 atlas at 96px cells, foot_y=84, fps=12 - byte-format identical
to H02's existing runtime atlas. Replaced the single-frame H02 attack source
(symlink resolves to the new atlas).

Provenance: raw strip, task manifest, 4 keyed frames and prompt saved under
PRODUCTION/source/sprite_runs/H02/run/; runtime manifest records task_id and
pipeline; generated_art_processing_ledger hashes updated.

Verification: breathing_test now asserts H02 attack advances through all 4
frames (0/1/2/3) at runtime (automated_verified); p3a_h02_attack_390_zh_CN.png
shows the hero in the drawn-bow pose in a real battle (agent_visual_reviewed).
Added a capture-only force_hero_attack_frame_for_test hook. Full gate
P2_CHECKS_PASS. prototype/ stays untracked and untouched.
2026-11-18 02:05:33 +08:00
wushenghua 9c28902c83 art: upgrade UI frames and icons from AI style references
Owner chose option B (use AI-generated UI art) and reported the screen looked
too plain. Root cause: frames were flat 6px solid gold lines and resource icons
were generic glyphs (diamond/star).

Followed the two-stage boundary required by AGENTS.md: AI output is a STYLE
REFERENCE, never a runtime asset. gpt-image-2.6 produced a beveled panel frame
board and a 4x4 icon sheet on magenta (dry-run and credential preflight first,
task ids in the ledger). tools/derive_ui_from_references.py then redrew on an
exact low-res grid: 48x48 NinePatch frames with top/left highlight, bottom/
right shadow and corner notches; icons chroma-keyed, palette-quantized and
BOX-downsampled to 32x32 (16px lost too much detail).

check_ui_pixel_art.py enforces the boundary (exact logical size, <=12 colors,
transparent NinePatch corners, provenance status) and caught a real regression:
corner nubs drawn at (0,0) made corners opaque; fixed. Resource bar now uses
derived gold/crystal icons instead of text glyphs.

Normal-render captures show beveled frames and legible icons. 27 gates pass,
including parity, pacing, feedback, log audit and the full capture matrix.
PRODUCTION/45 records provenance and the honest limits: only 2 of 16 icons are
wired in, and human visual sign-off is still required (derived != final art).
2026-11-17 19:46:58 +08:00
wushenghua 7232a9f253 audio: synthesize mixed SFX and a seamless BGM loop locally
Replaced the eight plain-sine placeholders with locally synthesized audio.
The workspace grants standing authorization for image/TTS generation but not
for ElevenLabs SFX/ambience/music, so this uses only numpy/scipy math and stays
inside that boundary. tools/synthesize_audio.py builds nine cues with additive
and FM synthesis, ADSR envelopes and a short reverb, plus a 20s seamless
loop (warm pad + arpeggio + wind chimes) with a crossfaded wrap.

Runtime now follows the mix contract in PRODUCTION/08-audio.md: bus levels are
read from the generator manifest, four pooled players cap simultaneous SFX,
the same cue is rate-limited to three plays per second, each play gets +/-5%
pitch jitter, low power drops non-critical cues, and mute is a hard gate that
also stops BGM. BGM pauses/resumes with app focus. Destruction plays a reward
cue; victory plays both reward and fanfare.

The audio test covers stream loading, rate limiting, mute and event->cue
mapping. tools/run_p2_checks.sh still runs 16 gates; all pass. These remain
synthesized placeholders; authored/licensed audio is still required at ship.
2026-11-17 10:04:00 +08:00
wushenghua e25cf9623b art: replace all placeholder sprites with generated pixel art
Generated 26 sprite sheets (13 characters x idle/attack-or-hit) with
gpt-image-2.6 1K using one shared style contract and a magenta chroma
background, replacing the deterministic placeholder silhouettes. Dry-run and
credential preflight were done first; the batch used --no-wait with task ids
written to disk, then a single collect. Two downloads needed recovery: one
returned .webp (converted to PNG, bytes preserved), one failed twice and was
resubmitted from the same job, succeeding. Failed tasks are not charged.

Each raw sheet went through the project's existing pixel pipeline:
pixel_sprite_pack.py (crop + fixed 96px grid) then chroma_key_atlas.py
(chroma key + foot-line alignment). The runtime atlases and manifests are
byte-compatible with UnitView, so no runtime code changed. data/generated_art_processing_ledger.json records every task id and both raw and
runtime SHA-256 hashes. Manifests are marked generated_reviewed_pipeline and
still require human visual sign-off before release; this is a first draft,
not a claim of final art acceptance.

tools/run_p2_checks.sh still runs 16 gates; all pass. Battle captures show
distinct heroes (human warrior, elven ranger, dwarf smith) instead of blocks.
2026-11-17 09:17:01 +08:00
wushenghua f894d5ed9f audio: add temporary slice SFX and make the mute setting real
The settings page had a mute flag that changed nothing and the game had no
audio at all. create_temporary_sfx.py generates eight deterministic 16-bit
WAV cues covering the priority feedback in PRODUCTION/08-audio.md: click,
hit, shield break, ultimate, victory, defeat, upgrade and UI. They are marked
temporary in their manifest; the 80-120 authored SFX and nine BGM in the
contract are still final production work.

SfxPlayer uses four players to respect the "at most 3-4 simultaneous" rule,
keeps high-frequency cues quieter, and treats mute as a hard gate that stops
active players before starting new ones. The same authoritative battle events
that select a VFX now select its audio cue, so feedback cannot disagree with
the simulation. GameRoot plays UI, upgrade, victory and defeat cues.

tools/run_p2_checks.sh now runs 16 gates; all pass. The headless audio test
verifies all eight streams load, mute suppresses playback, and boss events
produce click/hit/shield-break/ultimate cues.
2026-11-17 02:53:22 +08:00
wushenghua 2d513bffb7 art: give every launch character a visible runtime sprite
Only H01, EG01 and B01 had reviewed pixel art, leaving most of the launch
roster invisible in the battle stage. create_filler_sprites.py generates
deterministic 96px silhouettes for the remaining five heroes and eight
enemies, keyed by signature so each role reads differently. They are written
with status "temporary_placeholder" in their manifests and must be replaced
with reviewed art before release; they are not being passed off as final.

Adding art for all characters exposed a real cap bug: the stage limited enemy
units to five but let all six hero units spawn. The HUD now clamps both to
five, and the visible-node test asserts exactly five hero units under an
over-cap input.

tools/run_p2_checks.sh still runs 15 gates; all pass.
2026-11-17 02:07:40 +08:00
wushenghua 7a101173ea feat: add pixel VFX, event binding and visible-node caps; close P2 locally
VFX. The three feedback effects existed only as IDs in the contract. They
are now generated as low-resolution transparent sprite sheets (16/32/64px,
hard pixel clusters, nearest filtering) with their own manifest. VfxView
advances frame indices without interpolation, finishes deterministically, and
drops intermediate frames in low-power mode while keeping the final state.
The battle scene maps authoritative sim events to effects: shield_break,
cast_ultimate and hit. Feedback can no longer disagree with the simulation.

Node caps. The stage now clamps visible enemies to five and visible heroes to
five, with a test that supplies seven enemies and six heroes, checks the real
node counts and verifies stale nodes are released when content shrinks.

tools/run_p2_checks.sh now runs 13 gates; all pass. PRODUCTION/38 records
P2-VFX-01 and the node-count portion of P2-BAT-03 as PASS, so P2 local
acceptance is complete. Open gates are the real-device ones (safe-area inset,
frame time, memory, heat) plus human comprehension and willingness to
continue; no local automation can grant those.
2026-11-17 00:03:47 +08:00
wushenghua a0c590deec feat: add animated units, real touch input and the runtime economy loop
Continues the MVP work from the UI and numbers baseline.

Animation. The frame runs were already in the repository but had never been
packed for runtime use. pack_animation_strip.py now derives one shared scale
and one shared foot line from the union of every frame in a state, so the
character does not jitter between frames; H01 idle/attack, EG01 idle/hit and
B01 idle/hit are packed as transparent fixed-grid atlases. UnitView plays
them with the node origin on the foot line, loops idle, plays hit once and
falls back, and flashes on damage. Content-to-art bindings live in the
content fixture, so no character id is hardcoded in the HUD.

Touch. The previous HUD used gui_input callbacks, which is not proof of a
mobile input path. run_touch_test.sh now feeds InputEventScreenTouch through
Input.parse_input_event and checks that taps on the tap toggle, an enemy card
and the storm button produce the right events on the right tick. It also
caught a real bug: Godot emulates mouse presses from touches, so one tap was
firing both handlers; enemy taps are now debounced.

Economy. The paper model had the reward and upgrade curves but the runtime
only subtracted gold from a balance that was always zero. The scene now owns
permanent progress: victory grants the reward from the shared rules, upgrades
cost a growing amount, hero DPS rises per level, and the next battle is
created with the upgraded roster DPS. run_economy_loop_test.sh proves four
N01 clears pay for the first upgrade and that duplicate grants and losses
behave correctly. The economy pacing was left at four wins rather than
weakening it to satisfy the test.

tools/run_p2_checks.sh now runs 11 gates; all pass. PRODUCTION/38 records
P2-IMP-02/03 and P2-BAT-02 as PASS. Remaining P2 holds: profiler/visual
limit, shield-break and ultimate VFX, real-device safe area and performance.
2026-11-16 23:30:49 +08:00
wushenghua e7b55e1c17 feat: align runtime with paper numbers and build the battle HUD carrier
Numbers. The paper runner (tools/mvp_validation_sim.py) and the Godot
runtime adapter were two independent rewrites of the same rules and had
drifted: seed derivation, damage order, the weakness rule and the shield
rebuild semantics all differed, so the runtime never actually reproduced
the paper numbers and P2-BAT-01 could never pass.

- add data/mvp_battle_rules.json as the single source of balance data and
  of the per-run seed derivation, read by both engines
- derive the efficiency factor from SHA-256 (48-bit prefix) so Python and
  GDScript land on the same float64
- port the paper semantics into battle_sim.gd and expose the simulation as
  a stepwise state machine so a live scene can drive it at 1x/2x/3x
- add tools/mvp_parity_gate.py: diffs 300 results field by field, event
  log by event log, and exits non-zero on any difference
- freeze data/mvp_validation_seed_reference.json so unapproved numeric
  drift fails the gate
- note that GDScript's roundf() is half-away-from-zero while Python's
  round() is banker's rounding; the runtime uses String.num instead

UI. The sample had no real UI carrier, no localization and no touch path,
so the NinePatch, dynamic text, safe area and input cases had nothing to
be proven against.

- add the battle HUD, laid out from the contract table rather than container
  stretch ratios, reproducing the 390x844 rectangles exactly and adapting
  360x800 / 430x932 with the stage kept as priority space
- add runtime text tables for zh_CN and en_US and a key validator that
  proves both locales carry the same keys and every content id has a string
- add NinePatch frames with a 6px border band and 6px cut corners
- add the live battle scene, the capture runner and the 1x/2x/3x
  equivalence test

tools/run_p2_checks.sh runs the nine gates in one command; all pass.
2026-11-16 22:22:55 +08:00
wushenghua 0e123af595 art: add B01 hit state candidate 2026-11-06 13:12:10 +08:00
wushenghua a938e16486 art: add EG01 hit state candidate 2026-11-06 13:07:52 +08:00
wushenghua 5b0baba33d docs: approve EG01 and B01 idle assets 2026-11-06 13:05:06 +08:00
wushenghua 8715789245 art: add B01 idle sprite candidate 2026-11-06 12:58:37 +08:00
wushenghua 43451d7aac qa: record EG01 idle candidate preview 2026-11-06 12:54:24 +08:00
wushenghua a8fc42985b art: add EG01 idle sprite candidate 2026-11-06 12:54:03 +08:00
wushenghua e4dfa8f6bf docs: prepare enemy and boss sprite runs 2026-11-06 12:45:45 +08:00
wushenghua 3de74b285b qa: validate H01 sprite pilot bundle 2026-11-06 12:41:31 +08:00
wushenghua dbe8597c81 art: complete H01 idle state and pilot atlas 2026-11-06 12:26:50 +08:00
wushenghua b3660c0936 art: add H01 ultimate state pilot 2026-11-06 12:20:50 +08:00
wushenghua b7f9479d0e art: add H01 skill state pilot 2026-11-06 12:17:00 +08:00
wushenghua cf0a1d9392 art: add H01 attack motion preview 2026-11-06 12:13:55 +08:00
wushenghua 85371039d0 art: accept H01 attack frame review 2026-11-06 10:53:46 +08:00
wushenghua afab60c169 art: prepare sprite-gen handoff for H01 2026-11-06 10:42:10 +08:00
wushenghua 7381b92457 art: simplify pixel assets to direct crop pipeline 2026-11-06 10:24:24 +08:00
wushenghua 161e460aa6 art: add procedural pixel UI component sample 2026-11-06 08:32:01 +08:00