P11.1: juicier match pops & brighter bursts (sx / iOS)
Visual-juice vibe-pass, FX-only — no logic/state changes, input gating still owned by BoardAnim.active. - board_fx.sx: bigger, punchier match bursts — peak size 1.95->2.50 cells, combo bonus 0.55->0.72, and the per-gem fx tints saturated a touch (low channel trimmed, dominant/mid lifted) so every burst pops as a brighter, more vivid candy colour. The hot per-pixel tint loop's hoisted locals are preserved (issue 0001). - gem_anim.sx: snappier clear pop — faster rise (0.30->0.18 of the window) to a bigger overshoot (CLEAR_POP_A 0.22->0.34) so the matched-gem clear reads as a candy snap. gem_pose's clear-pop invariants still hold. - main.sx: M3TE_FX=<n> deterministic match-FX capture hook, mirroring the M3TE_SELECT pattern. Commits the n-th currently-legal swap at startup via the normal plan_and_commit path and begins the move timeline + burst/popup FX; M3TE_ANIM_TIME pins the phase and the frame loop holds the move/FX frozen while pinned, so the burst + "+points" screenshot identically every run. A larger M3TE_ANIM_TIME captures the settled, FX-gone board. Startup- only and guarded, so normal play is untouched. - README.md: document the new M3TE_FX pin alongside the other capture hooks. - goldens/p6_fx_match.png: updated deterministic golden (iOS 26 sim, SIMCTL_CHILD_M3TE_FX=3 SIMCTL_CHILD_M3TE_ANIM_TIME=0.22) — the vertical red 3-match, burst region +1.4% mean luminance / 3.2:1 brighter:dimmer vs the same scene on the pre-juice constants. Gate: ios-sim build links, 19/19 logic tests green (incl. gem_pose t=0 rest).
This commit is contained in:
37
main.sx
37
main.sx
@@ -180,10 +180,15 @@ frame :: () {
|
||||
g_pipeline.dispatch_event(ev);
|
||||
}
|
||||
|
||||
// Advance the in-flight move animation by this frame's delta before rendering,
|
||||
// so the board view draws the timeline slice for the current wall-clock time.
|
||||
if g_anim != null { g_anim.tick(g_delta_time); }
|
||||
if g_fx != null { g_fx.tick(g_delta_time); }
|
||||
// Advance the in-flight move animation + its match FX by this frame's delta
|
||||
// before rendering, so the board view draws the timeline slice for the current
|
||||
// wall-clock time. Capture mode pins the animation clock (M3TE_ANIM_TIME);
|
||||
// while pinned the move/FX timelines stay frozen at the phase the startup
|
||||
// hooks set, so the FX-match scene (M3TE_FX) screenshots identically each run.
|
||||
if g_motion == null or !g_motion.pinned {
|
||||
if g_anim != null { g_anim.tick(g_delta_time); }
|
||||
if g_fx != null { g_fx.tick(g_delta_time); }
|
||||
}
|
||||
|
||||
// Advance the always-on per-gem animation clock (idle/select/land). Capture
|
||||
// mode pins the clock, so it only moves when not pinned. On the exact frame a
|
||||
@@ -326,6 +331,30 @@ main :: () -> void {
|
||||
}
|
||||
}
|
||||
|
||||
// Match-FX capture hook (P11.1). The bursts/popups spawn off a committed move,
|
||||
// which the sim can't script (no public touch injection), so M3TE_FX forces a
|
||||
// representative match at startup the same way a swipe would: it commits the
|
||||
// n-th currently-legal swap (1-based, clamped; =1 is the first) via the normal
|
||||
// plan_and_commit path, then begins the move timeline + its FX. M3TE_ANIM_TIME
|
||||
// pins the phase — advancing both to that time, after which the frozen frame
|
||||
// loop holds them there — so the burst + "+points" popup screenshot identically
|
||||
// every run. A larger M3TE_ANIM_TIME lands past the timeline, capturing the
|
||||
// settled board with the FX fully pruned. Startup-only and unset → fully live.
|
||||
if fx := read_env("M3TE_FX") {
|
||||
swaps := legal_swaps(g_board);
|
||||
if swaps.len > 0 {
|
||||
n := parse_s64(fx);
|
||||
if n < 1 { n = 1; }
|
||||
if n > swaps.len { n = swaps.len; }
|
||||
sw := swaps.items[n - 1];
|
||||
mv := plan_and_commit(g_board, sw.a, sw.b);
|
||||
g_anim.begin(mv);
|
||||
g_fx.begin(@mv);
|
||||
g_anim.tick(g_motion.clock);
|
||||
g_fx.tick(g_motion.clock);
|
||||
}
|
||||
}
|
||||
|
||||
// Level-state capture hooks (P7.2): override the goal / move budget so a
|
||||
// terminal status can be screenshot without scripting a swipe. M3TE_TARGET=0
|
||||
// makes the fresh board read WON immediately (score 0 ≥ goal 0);
|
||||
|
||||
Reference in New Issue
Block a user