realtime-game-loop
Runs real-time play - fixed-step UI-thread loop, typed-array sims, (tick, command) replays, simulate-then-replay, swept circles, spatial hash. Use when building Halo Drift, Bank Shot, bouncing balls or live motion. Not for turn animations (board-rendering-skia) or touch (board-gestures-and-input).
- License 许可
- MIT
- 最近更新
- 2026-11-05
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- realtime-game-loop
- description
- Runs real-time play - fixed-step UI-thread loop, typed-array sims, (tick, command) replays, simulate-then-replay, swept circles, spatial hash. Use when building Halo Drift, Bank Shot, bouncing balls or live motion. Not for turn animations (board-rendering-skia) or touch (board-gestures-and-input).
02 资源文件 500
- 资产文件assets/shared.json194 B
- 脚本examples/bank-shot/simulate-volley.test.ts2.6 KB
- 脚本examples/bank-shot/simulate-volley.ts3.7 KB
- 脚本examples/bank-shot/volley-timeline.ts1.1 KB
- 脚本examples/halo-drift/halo-sim.test.ts2.1 KB
- 脚本examples/halo-drift/halo-sim.ts3.8 KB
- 参考文档references/fixed-step-loop.md9.6 KB
- 参考文档references/geom-kit.md4.2 KB
- 参考文档references/sim-design.md9.0 KB
- 参考文档references/simulate-then-replay.md4.2 KB
- 脚本scripts/check-lib.mjs44.4 KB
- 脚本scripts/check-realtime-loop.mjs24.1 KB
- 脚本scripts/lib/source-scan.mjs3.5 KB
- 脚本scripts/selftest.mjs564 B
- 脚本templates/game-kit/geom/spatial-hash.test.ts1.6 KB
- 脚本templates/game-kit/geom/spatial-hash.ts2.2 KB
- 脚本templates/game-kit/geom/sweep.test.ts1.2 KB
- 脚本templates/game-kit/geom/sweep.ts2.8 KB
- 脚本templates/game-kit/geom/vec2.test.ts1.1 KB
- 脚本templates/game-kit/geom/vec2.ts1.3 KB
- 脚本templates/game-kit/testing/replay-commands.test.ts1.4 KB
- 脚本templates/game-kit/testing/replay-commands.ts1.9 KB
- 脚本templates/game-kit/timeline/fixed-step.test.ts1.5 KB
- 脚本templates/game-kit/timeline/fixed-step.ts942 B
- 参考文档templates/game/board/board-contrast.json119 B
- 参考文档templates/game/board/board-palettes.json501 B
- 脚本templates/game/board/board-palettes.ts490 B
- 脚本templates/game/board/draw-arena.test.ts3.1 KB
- 脚本templates/game/board/draw-arena.ts1.5 KB
- 脚本templates/game/sim/__GAME_ID__-sim.test.ts2.4 KB
- 脚本templates/game/sim/__GAME_ID__-sim.ts5.2 KB
- 脚本templates/shell/game-host/paint-sim-png.ts1.2 KB
- 其他templates/shell/game-host/realtime-board-host.test.tsx4.4 KB
- 其他templates/shell/game-host/realtime-board-host.tsx4.8 KB
- 脚本templates/shell/game-host/record-sim.test.ts1.9 KB
- 脚本templates/shell/game-host/record-sim.ts1.4 KB
- 脚本templates/shell/game-host/run-loop-frame.test.ts2.4 KB
- 脚本templates/shell/game-host/run-loop-frame.ts1.5 KB
- 脚本templates/shell/game-host/use-fixed-step-loop.ts2.2 KB
- 脚本templates/test/goldens/boards/__GAME_ID__-board.golden.test.ts2.5 KB
- 脚本tests/fixtures/bad-arena-budget-in-comment/apps/bank-shot/src/rules/simulate-volley.ts3.7 KB
- 脚本tests/fixtures/bad-arena-budget-in-comment/apps/demo-arena/src/board/draw-arena.test.ts3.2 KB
- 脚本tests/fixtures/bad-arena-budget-in-comment/apps/demo-arena/src/board/draw-arena.ts1.5 KB
- 脚本tests/fixtures/bad-arena-budget-in-comment/apps/demo-arena/src/sim/demo-arena-sim.test.ts2.3 KB
- 脚本tests/fixtures/bad-arena-budget-in-comment/apps/demo-arena/src/sim/demo-arena-sim.ts5.1 KB
- 参考文档tests/fixtures/bad-arena-budget-in-comment/EXPECT.txt84 B
- 脚本tests/fixtures/bad-arena-budget-in-comment/packages/game-kit/src/geom/spatial-hash.ts2.2 KB
- 脚本tests/fixtures/bad-arena-budget-in-comment/packages/game-kit/src/geom/sweep.ts2.8 KB
- 脚本tests/fixtures/bad-arena-budget-in-comment/packages/game-kit/src/geom/vec2.ts1.3 KB
- 脚本tests/fixtures/bad-arena-budget-in-comment/packages/game-kit/src/rng/sfc32.ts2.7 KB
- 脚本tests/fixtures/bad-arena-budget-in-comment/packages/game-kit/src/testing/replay-commands.ts1.5 KB
- 脚本tests/fixtures/bad-arena-budget-in-comment/packages/game-kit/src/timeline/fixed-step.test.ts1.5 KB
- 脚本tests/fixtures/bad-arena-budget-in-comment/packages/game-kit/src/timeline/fixed-step.ts942 B
- 脚本tests/fixtures/bad-arena-budget-in-comment/packages/shell/src/game-host/describe-error.ts286 B
- 脚本tests/fixtures/bad-arena-budget-in-comment/packages/shell/src/game-host/paint-sim-png.ts1.1 KB
- 其他tests/fixtures/bad-arena-budget-in-comment/packages/shell/src/game-host/realtime-board-host.test.tsx4.3 KB
- 其他tests/fixtures/bad-arena-budget-in-comment/packages/shell/src/game-host/realtime-board-host.tsx4.8 KB
- 脚本tests/fixtures/bad-arena-budget-in-comment/packages/shell/src/game-host/record-sim.ts1.4 KB
- 脚本tests/fixtures/bad-arena-budget-in-comment/packages/shell/src/game-host/run-loop-frame.test.ts2.4 KB
- 脚本tests/fixtures/bad-arena-budget-in-comment/packages/shell/src/game-host/run-loop-frame.ts1.5 KB
- 脚本tests/fixtures/bad-arena-budget-in-comment/packages/shell/src/game-host/use-fixed-step-loop.ts2.0 KB
- 脚本tests/fixtures/bad-arena-budget-in-comment/packages/shell/src/game-host/use-game-lifecycle.ts1.2 KB
- 资产文件tests/fixtures/bad-arena-budget-in-comment/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.5.png70 B
- 资产文件tests/fixtures/bad-arena-budget-in-comment/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.png70 B
- 资产文件tests/fixtures/bad-arena-budget-in-comment/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-1.png70 B
- 资产文件tests/fixtures/bad-arena-budget-in-comment/test/goldens/boards/__image_snapshots__/demo-arena-small-0.5.png70 B
- 资产文件tests/fixtures/bad-arena-budget-in-comment/test/goldens/boards/__image_snapshots__/demo-arena-small-0.png70 B
- 资产文件tests/fixtures/bad-arena-budget-in-comment/test/goldens/boards/__image_snapshots__/demo-arena-small-1.png70 B
- 资产文件tests/fixtures/bad-arena-budget-in-comment/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.5.png70 B
- 资产文件tests/fixtures/bad-arena-budget-in-comment/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.png70 B
- 资产文件tests/fixtures/bad-arena-budget-in-comment/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-1.png70 B
- 脚本tests/fixtures/bad-arena-budget-in-comment/test/goldens/boards/demo-arena-board.golden.test.ts2.5 KB
- 脚本tests/fixtures/bad-arena-budget-unasserted/apps/bank-shot/src/rules/simulate-volley.ts3.7 KB
- 脚本tests/fixtures/bad-arena-budget-unasserted/apps/demo-arena/src/board/draw-arena.test.ts3.1 KB
- 脚本tests/fixtures/bad-arena-budget-unasserted/apps/demo-arena/src/board/draw-arena.ts1.5 KB
- 脚本tests/fixtures/bad-arena-budget-unasserted/apps/demo-arena/src/sim/demo-arena-sim.test.ts2.3 KB
- 脚本tests/fixtures/bad-arena-budget-unasserted/apps/demo-arena/src/sim/demo-arena-sim.ts5.1 KB
- 参考文档tests/fixtures/bad-arena-budget-unasserted/EXPECT.txt84 B
- 脚本tests/fixtures/bad-arena-budget-unasserted/packages/game-kit/src/geom/spatial-hash.ts2.2 KB
- 脚本tests/fixtures/bad-arena-budget-unasserted/packages/game-kit/src/geom/sweep.ts2.8 KB
- 脚本tests/fixtures/bad-arena-budget-unasserted/packages/game-kit/src/geom/vec2.ts1.3 KB
- 脚本tests/fixtures/bad-arena-budget-unasserted/packages/game-kit/src/rng/sfc32.ts2.7 KB
- 脚本tests/fixtures/bad-arena-budget-unasserted/packages/game-kit/src/testing/replay-commands.ts1.5 KB
- 脚本tests/fixtures/bad-arena-budget-unasserted/packages/game-kit/src/timeline/fixed-step.test.ts1.5 KB
- 脚本tests/fixtures/bad-arena-budget-unasserted/packages/game-kit/src/timeline/fixed-step.ts942 B
- 脚本tests/fixtures/bad-arena-budget-unasserted/packages/shell/src/game-host/describe-error.ts286 B
- 脚本tests/fixtures/bad-arena-budget-unasserted/packages/shell/src/game-host/paint-sim-png.ts1.1 KB
- 其他tests/fixtures/bad-arena-budget-unasserted/packages/shell/src/game-host/realtime-board-host.test.tsx4.3 KB
- 其他tests/fixtures/bad-arena-budget-unasserted/packages/shell/src/game-host/realtime-board-host.tsx4.8 KB
- 脚本tests/fixtures/bad-arena-budget-unasserted/packages/shell/src/game-host/record-sim.ts1.4 KB
- 脚本tests/fixtures/bad-arena-budget-unasserted/packages/shell/src/game-host/run-loop-frame.test.ts2.4 KB
- 脚本tests/fixtures/bad-arena-budget-unasserted/packages/shell/src/game-host/run-loop-frame.ts1.5 KB
- 脚本tests/fixtures/bad-arena-budget-unasserted/packages/shell/src/game-host/use-fixed-step-loop.ts2.0 KB
- 脚本tests/fixtures/bad-arena-budget-unasserted/packages/shell/src/game-host/use-game-lifecycle.ts1.2 KB
- 资产文件tests/fixtures/bad-arena-budget-unasserted/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.5.png70 B
- 资产文件tests/fixtures/bad-arena-budget-unasserted/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.png70 B
- 资产文件tests/fixtures/bad-arena-budget-unasserted/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-1.png70 B
- 资产文件tests/fixtures/bad-arena-budget-unasserted/test/goldens/boards/__image_snapshots__/demo-arena-small-0.5.png70 B
- 资产文件tests/fixtures/bad-arena-budget-unasserted/test/goldens/boards/__image_snapshots__/demo-arena-small-0.png70 B
- 资产文件tests/fixtures/bad-arena-budget-unasserted/test/goldens/boards/__image_snapshots__/demo-arena-small-1.png70 B
- 资产文件tests/fixtures/bad-arena-budget-unasserted/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.5.png70 B
- 资产文件tests/fixtures/bad-arena-budget-unasserted/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.png70 B
- 资产文件tests/fixtures/bad-arena-budget-unasserted/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-1.png70 B
- 脚本tests/fixtures/bad-arena-budget-unasserted/test/goldens/boards/demo-arena-board.golden.test.ts2.5 KB
- 脚本tests/fixtures/bad-arena-budget/apps/bank-shot/src/rules/simulate-volley.ts3.7 KB
- 脚本tests/fixtures/bad-arena-budget/apps/demo-arena/src/board/draw-arena.test.ts3.1 KB
- 脚本tests/fixtures/bad-arena-budget/apps/demo-arena/src/board/draw-arena.ts1.5 KB
- 脚本tests/fixtures/bad-arena-budget/apps/demo-arena/src/sim/demo-arena-sim.test.ts2.3 KB
- 脚本tests/fixtures/bad-arena-budget/apps/demo-arena/src/sim/demo-arena-sim.ts5.1 KB
- 参考文档tests/fixtures/bad-arena-budget/EXPECT.txt71 B
- 脚本tests/fixtures/bad-arena-budget/packages/game-kit/src/geom/spatial-hash.ts2.2 KB
- 脚本tests/fixtures/bad-arena-budget/packages/game-kit/src/geom/sweep.ts2.8 KB
- 脚本tests/fixtures/bad-arena-budget/packages/game-kit/src/geom/vec2.ts1.3 KB
- 脚本tests/fixtures/bad-arena-budget/packages/game-kit/src/rng/sfc32.ts2.7 KB
- 脚本tests/fixtures/bad-arena-budget/packages/game-kit/src/testing/replay-commands.ts1.5 KB
- 脚本tests/fixtures/bad-arena-budget/packages/game-kit/src/timeline/fixed-step.test.ts1.5 KB
- 脚本tests/fixtures/bad-arena-budget/packages/game-kit/src/timeline/fixed-step.ts942 B
- 脚本tests/fixtures/bad-arena-budget/packages/shell/src/game-host/describe-error.ts286 B
- 脚本tests/fixtures/bad-arena-budget/packages/shell/src/game-host/paint-sim-png.ts1.1 KB
- 其他tests/fixtures/bad-arena-budget/packages/shell/src/game-host/realtime-board-host.test.tsx4.3 KB
- 其他tests/fixtures/bad-arena-budget/packages/shell/src/game-host/realtime-board-host.tsx4.8 KB
- 脚本tests/fixtures/bad-arena-budget/packages/shell/src/game-host/record-sim.ts1.4 KB
- 脚本tests/fixtures/bad-arena-budget/packages/shell/src/game-host/run-loop-frame.test.ts2.4 KB
- 脚本tests/fixtures/bad-arena-budget/packages/shell/src/game-host/run-loop-frame.ts1.5 KB
- 脚本tests/fixtures/bad-arena-budget/packages/shell/src/game-host/use-fixed-step-loop.ts2.0 KB
- 脚本tests/fixtures/bad-arena-budget/packages/shell/src/game-host/use-game-lifecycle.ts1.2 KB
- 资产文件tests/fixtures/bad-arena-budget/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.5.png70 B
- 资产文件tests/fixtures/bad-arena-budget/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.png70 B
- 资产文件tests/fixtures/bad-arena-budget/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-1.png70 B
- 资产文件tests/fixtures/bad-arena-budget/test/goldens/boards/__image_snapshots__/demo-arena-small-0.5.png70 B
- 资产文件tests/fixtures/bad-arena-budget/test/goldens/boards/__image_snapshots__/demo-arena-small-0.png70 B
- 资产文件tests/fixtures/bad-arena-budget/test/goldens/boards/__image_snapshots__/demo-arena-small-1.png70 B
- 资产文件tests/fixtures/bad-arena-budget/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.5.png70 B
- 资产文件tests/fixtures/bad-arena-budget/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.png70 B
- 资产文件tests/fixtures/bad-arena-budget/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-1.png70 B
- 脚本tests/fixtures/bad-arena-budget/test/goldens/boards/demo-arena-board.golden.test.ts2.5 KB
- 脚本tests/fixtures/bad-arena-draw-no-worklet/apps/bank-shot/src/rules/simulate-volley.ts3.7 KB
- 脚本tests/fixtures/bad-arena-draw-no-worklet/apps/demo-arena/src/board/draw-arena.test.ts3.1 KB
- 脚本tests/fixtures/bad-arena-draw-no-worklet/apps/demo-arena/src/board/draw-arena.ts1.5 KB
- 脚本tests/fixtures/bad-arena-draw-no-worklet/apps/demo-arena/src/sim/demo-arena-sim.test.ts2.3 KB
- 脚本tests/fixtures/bad-arena-draw-no-worklet/apps/demo-arena/src/sim/demo-arena-sim.ts5.1 KB
- 参考文档tests/fixtures/bad-arena-draw-no-worklet/EXPECT.txt60 B
- 脚本tests/fixtures/bad-arena-draw-no-worklet/packages/game-kit/src/geom/spatial-hash.ts2.2 KB
- 脚本tests/fixtures/bad-arena-draw-no-worklet/packages/game-kit/src/geom/sweep.ts2.8 KB
- 脚本tests/fixtures/bad-arena-draw-no-worklet/packages/game-kit/src/geom/vec2.ts1.3 KB
- 脚本tests/fixtures/bad-arena-draw-no-worklet/packages/game-kit/src/rng/sfc32.ts2.7 KB
- 脚本tests/fixtures/bad-arena-draw-no-worklet/packages/game-kit/src/testing/replay-commands.ts1.5 KB
- 脚本tests/fixtures/bad-arena-draw-no-worklet/packages/game-kit/src/timeline/fixed-step.test.ts1.5 KB
- 脚本tests/fixtures/bad-arena-draw-no-worklet/packages/game-kit/src/timeline/fixed-step.ts942 B
- 脚本tests/fixtures/bad-arena-draw-no-worklet/packages/shell/src/game-host/describe-error.ts286 B
- 脚本tests/fixtures/bad-arena-draw-no-worklet/packages/shell/src/game-host/paint-sim-png.ts1.1 KB
- 其他tests/fixtures/bad-arena-draw-no-worklet/packages/shell/src/game-host/realtime-board-host.test.tsx4.3 KB
- 其他tests/fixtures/bad-arena-draw-no-worklet/packages/shell/src/game-host/realtime-board-host.tsx4.8 KB
- 脚本tests/fixtures/bad-arena-draw-no-worklet/packages/shell/src/game-host/record-sim.ts1.4 KB
- 脚本tests/fixtures/bad-arena-draw-no-worklet/packages/shell/src/game-host/run-loop-frame.test.ts2.4 KB
- 脚本tests/fixtures/bad-arena-draw-no-worklet/packages/shell/src/game-host/run-loop-frame.ts1.5 KB
- 脚本tests/fixtures/bad-arena-draw-no-worklet/packages/shell/src/game-host/use-fixed-step-loop.ts2.0 KB
- 脚本tests/fixtures/bad-arena-draw-no-worklet/packages/shell/src/game-host/use-game-lifecycle.ts1.2 KB
- 资产文件tests/fixtures/bad-arena-draw-no-worklet/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.5.png70 B
- 资产文件tests/fixtures/bad-arena-draw-no-worklet/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.png70 B
- 资产文件tests/fixtures/bad-arena-draw-no-worklet/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-1.png70 B
- 资产文件tests/fixtures/bad-arena-draw-no-worklet/test/goldens/boards/__image_snapshots__/demo-arena-small-0.5.png70 B
- 资产文件tests/fixtures/bad-arena-draw-no-worklet/test/goldens/boards/__image_snapshots__/demo-arena-small-0.png70 B
- 资产文件tests/fixtures/bad-arena-draw-no-worklet/test/goldens/boards/__image_snapshots__/demo-arena-small-1.png70 B
- 资产文件tests/fixtures/bad-arena-draw-no-worklet/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.5.png70 B
- 资产文件tests/fixtures/bad-arena-draw-no-worklet/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.png70 B
- 资产文件tests/fixtures/bad-arena-draw-no-worklet/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-1.png70 B
- 脚本tests/fixtures/bad-arena-draw-no-worklet/test/goldens/boards/demo-arena-board.golden.test.ts2.5 KB
- 脚本tests/fixtures/bad-arena-no-golden/apps/bank-shot/src/rules/simulate-volley.ts3.7 KB
- 脚本tests/fixtures/bad-arena-no-golden/apps/demo-arena/src/board/draw-arena.test.ts3.1 KB
- 脚本tests/fixtures/bad-arena-no-golden/apps/demo-arena/src/board/draw-arena.ts1.5 KB
- 脚本tests/fixtures/bad-arena-no-golden/apps/demo-arena/src/sim/demo-arena-sim.test.ts2.3 KB
- 脚本tests/fixtures/bad-arena-no-golden/apps/demo-arena/src/sim/demo-arena-sim.ts5.1 KB
- 参考文档tests/fixtures/bad-arena-no-golden/EXPECT.txt105 B
- 脚本tests/fixtures/bad-arena-no-golden/packages/game-kit/src/geom/spatial-hash.ts2.2 KB
- 脚本tests/fixtures/bad-arena-no-golden/packages/game-kit/src/geom/sweep.ts2.8 KB
- 脚本tests/fixtures/bad-arena-no-golden/packages/game-kit/src/geom/vec2.ts1.3 KB
- 脚本tests/fixtures/bad-arena-no-golden/packages/game-kit/src/rng/sfc32.ts2.7 KB
- 脚本tests/fixtures/bad-arena-no-golden/packages/game-kit/src/testing/replay-commands.ts1.5 KB
- 脚本tests/fixtures/bad-arena-no-golden/packages/game-kit/src/timeline/fixed-step.test.ts1.5 KB
- 脚本tests/fixtures/bad-arena-no-golden/packages/game-kit/src/timeline/fixed-step.ts942 B
- 脚本tests/fixtures/bad-arena-no-golden/packages/shell/src/game-host/describe-error.ts286 B
- 脚本tests/fixtures/bad-arena-no-golden/packages/shell/src/game-host/paint-sim-png.ts1.1 KB
- 其他tests/fixtures/bad-arena-no-golden/packages/shell/src/game-host/realtime-board-host.test.tsx4.3 KB
- 其他tests/fixtures/bad-arena-no-golden/packages/shell/src/game-host/realtime-board-host.tsx4.8 KB
- 脚本tests/fixtures/bad-arena-no-golden/packages/shell/src/game-host/record-sim.ts1.4 KB
- 脚本tests/fixtures/bad-arena-no-golden/packages/shell/src/game-host/run-loop-frame.test.ts2.4 KB
- 脚本tests/fixtures/bad-arena-no-golden/packages/shell/src/game-host/run-loop-frame.ts1.5 KB
- 脚本tests/fixtures/bad-arena-no-golden/packages/shell/src/game-host/use-fixed-step-loop.ts2.0 KB
- 脚本tests/fixtures/bad-arena-no-golden/packages/shell/src/game-host/use-game-lifecycle.ts1.2 KB
- 资产文件tests/fixtures/bad-arena-no-golden/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.5.png70 B
- 资产文件tests/fixtures/bad-arena-no-golden/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.png70 B
- 资产文件tests/fixtures/bad-arena-no-golden/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-1.png70 B
- 资产文件tests/fixtures/bad-arena-no-golden/test/goldens/boards/__image_snapshots__/demo-arena-small-0.5.png70 B
- 资产文件tests/fixtures/bad-arena-no-golden/test/goldens/boards/__image_snapshots__/demo-arena-small-0.png70 B
- 资产文件tests/fixtures/bad-arena-no-golden/test/goldens/boards/__image_snapshots__/demo-arena-small-1.png70 B
- 资产文件tests/fixtures/bad-arena-no-golden/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.5.png70 B
- 资产文件tests/fixtures/bad-arena-no-golden/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.png70 B
- 资产文件tests/fixtures/bad-arena-no-golden/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-1.png70 B
- 脚本tests/fixtures/bad-frame-callback/apps/bank-shot/src/rules/simulate-volley.ts3.7 KB
- 脚本tests/fixtures/bad-frame-callback/apps/demo-arena/src/board/draw-arena.test.ts3.1 KB
- 脚本tests/fixtures/bad-frame-callback/apps/demo-arena/src/board/draw-arena.ts1.5 KB
- 脚本tests/fixtures/bad-frame-callback/apps/demo-arena/src/sim/demo-arena-sim.test.ts2.3 KB
- 脚本tests/fixtures/bad-frame-callback/apps/demo-arena/src/sim/demo-arena-sim.ts5.1 KB
- 参考文档tests/fixtures/bad-frame-callback/EXPECT.txt44 B
- 脚本tests/fixtures/bad-frame-callback/packages/game-kit/src/geom/spatial-hash.ts2.2 KB
- 脚本tests/fixtures/bad-frame-callback/packages/game-kit/src/geom/sweep.ts2.8 KB
- 脚本tests/fixtures/bad-frame-callback/packages/game-kit/src/geom/vec2.ts1.3 KB
- 脚本tests/fixtures/bad-frame-callback/packages/game-kit/src/rng/sfc32.ts2.7 KB
- 脚本tests/fixtures/bad-frame-callback/packages/game-kit/src/testing/replay-commands.ts1.5 KB
- 脚本tests/fixtures/bad-frame-callback/packages/game-kit/src/timeline/fixed-step.test.ts1.5 KB
- 脚本tests/fixtures/bad-frame-callback/packages/game-kit/src/timeline/fixed-step.ts942 B
- 脚本tests/fixtures/bad-frame-callback/packages/shell/src/game-host/describe-error.ts286 B
- 脚本tests/fixtures/bad-frame-callback/packages/shell/src/game-host/paint-sim-png.ts1.1 KB
- 其他tests/fixtures/bad-frame-callback/packages/shell/src/game-host/realtime-board-host.test.tsx4.3 KB
- 其他tests/fixtures/bad-frame-callback/packages/shell/src/game-host/realtime-board-host.tsx4.8 KB
- 脚本tests/fixtures/bad-frame-callback/packages/shell/src/game-host/record-sim.ts1.4 KB
- 脚本tests/fixtures/bad-frame-callback/packages/shell/src/game-host/run-loop-frame.test.ts2.4 KB
- 脚本tests/fixtures/bad-frame-callback/packages/shell/src/game-host/run-loop-frame.ts1.5 KB
- 脚本tests/fixtures/bad-frame-callback/packages/shell/src/game-host/use-fixed-step-loop.ts2.1 KB
- 脚本tests/fixtures/bad-frame-callback/packages/shell/src/game-host/use-game-lifecycle.ts1.2 KB
- 资产文件tests/fixtures/bad-frame-callback/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.5.png70 B
- 资产文件tests/fixtures/bad-frame-callback/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.png70 B
- 资产文件tests/fixtures/bad-frame-callback/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-1.png70 B
- 资产文件tests/fixtures/bad-frame-callback/test/goldens/boards/__image_snapshots__/demo-arena-small-0.5.png70 B
- 资产文件tests/fixtures/bad-frame-callback/test/goldens/boards/__image_snapshots__/demo-arena-small-0.png70 B
- 资产文件tests/fixtures/bad-frame-callback/test/goldens/boards/__image_snapshots__/demo-arena-small-1.png70 B
- 资产文件tests/fixtures/bad-frame-callback/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.5.png70 B
- 资产文件tests/fixtures/bad-frame-callback/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.png70 B
- 资产文件tests/fixtures/bad-frame-callback/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-1.png70 B
- 脚本tests/fixtures/bad-frame-callback/test/goldens/boards/demo-arena-board.golden.test.ts2.5 KB
- 脚本tests/fixtures/bad-missing-runner/apps/bank-shot/src/rules/simulate-volley.ts3.7 KB
- 脚本tests/fixtures/bad-missing-runner/apps/demo-arena/src/board/draw-arena.test.ts3.1 KB
- 脚本tests/fixtures/bad-missing-runner/apps/demo-arena/src/board/draw-arena.ts1.5 KB
- 脚本tests/fixtures/bad-missing-runner/apps/demo-arena/src/sim/demo-arena-sim.test.ts2.3 KB
- 脚本tests/fixtures/bad-missing-runner/apps/demo-arena/src/sim/demo-arena-sim.ts5.1 KB
- 参考文档tests/fixtures/bad-missing-runner/EXPECT.txt65 B
- 脚本tests/fixtures/bad-missing-runner/packages/game-kit/src/geom/spatial-hash.ts2.2 KB
- 脚本tests/fixtures/bad-missing-runner/packages/game-kit/src/geom/sweep.ts2.8 KB
- 脚本tests/fixtures/bad-missing-runner/packages/game-kit/src/geom/vec2.ts1.3 KB
- 脚本tests/fixtures/bad-missing-runner/packages/game-kit/src/rng/sfc32.ts2.7 KB
- 脚本tests/fixtures/bad-missing-runner/packages/game-kit/src/testing/replay-commands.ts1.5 KB
- 脚本tests/fixtures/bad-missing-runner/packages/game-kit/src/timeline/fixed-step.test.ts1.5 KB
- 脚本tests/fixtures/bad-missing-runner/packages/game-kit/src/timeline/fixed-step.ts942 B
- 脚本tests/fixtures/bad-missing-runner/packages/shell/src/game-host/describe-error.ts286 B
- 脚本tests/fixtures/bad-missing-runner/packages/shell/src/game-host/paint-sim-png.ts1.1 KB
- 其他tests/fixtures/bad-missing-runner/packages/shell/src/game-host/realtime-board-host.test.tsx4.3 KB
- 其他tests/fixtures/bad-missing-runner/packages/shell/src/game-host/realtime-board-host.tsx4.8 KB
- 脚本tests/fixtures/bad-missing-runner/packages/shell/src/game-host/record-sim.ts1.4 KB
- 脚本tests/fixtures/bad-missing-runner/packages/shell/src/game-host/run-loop-frame.test.ts2.4 KB
- 脚本tests/fixtures/bad-missing-runner/packages/shell/src/game-host/use-fixed-step-loop.ts2.0 KB
- 脚本tests/fixtures/bad-missing-runner/packages/shell/src/game-host/use-game-lifecycle.ts1.2 KB
- 资产文件tests/fixtures/bad-missing-runner/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.5.png70 B
- 资产文件tests/fixtures/bad-missing-runner/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.png70 B
- 资产文件tests/fixtures/bad-missing-runner/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-1.png70 B
- 资产文件tests/fixtures/bad-missing-runner/test/goldens/boards/__image_snapshots__/demo-arena-small-0.5.png70 B
- 资产文件tests/fixtures/bad-missing-runner/test/goldens/boards/__image_snapshots__/demo-arena-small-0.png70 B
- 资产文件tests/fixtures/bad-missing-runner/test/goldens/boards/__image_snapshots__/demo-arena-small-1.png70 B
- 资产文件tests/fixtures/bad-missing-runner/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.5.png70 B
- 资产文件tests/fixtures/bad-missing-runner/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.png70 B
- 资产文件tests/fixtures/bad-missing-runner/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-1.png70 B
- 脚本tests/fixtures/bad-missing-runner/test/goldens/boards/demo-arena-board.golden.test.ts2.5 KB
- 脚本tests/fixtures/bad-no-lifecycle/apps/bank-shot/src/rules/simulate-volley.ts3.7 KB
- 脚本tests/fixtures/bad-no-lifecycle/apps/demo-arena/src/board/draw-arena.test.ts3.1 KB
- 脚本tests/fixtures/bad-no-lifecycle/apps/demo-arena/src/board/draw-arena.ts1.5 KB
- 脚本tests/fixtures/bad-no-lifecycle/apps/demo-arena/src/sim/demo-arena-sim.test.ts2.3 KB
- 脚本tests/fixtures/bad-no-lifecycle/apps/demo-arena/src/sim/demo-arena-sim.ts5.1 KB
- 参考文档tests/fixtures/bad-no-lifecycle/EXPECT.txt40 B
- 脚本tests/fixtures/bad-no-lifecycle/packages/game-kit/src/geom/spatial-hash.ts2.2 KB
- 脚本tests/fixtures/bad-no-lifecycle/packages/game-kit/src/geom/sweep.ts2.8 KB
- 脚本tests/fixtures/bad-no-lifecycle/packages/game-kit/src/geom/vec2.ts1.3 KB
- 脚本tests/fixtures/bad-no-lifecycle/packages/game-kit/src/rng/sfc32.ts2.7 KB
- 脚本tests/fixtures/bad-no-lifecycle/packages/game-kit/src/testing/replay-commands.ts1.5 KB
- 脚本tests/fixtures/bad-no-lifecycle/packages/game-kit/src/timeline/fixed-step.test.ts1.5 KB
- 脚本tests/fixtures/bad-no-lifecycle/packages/game-kit/src/timeline/fixed-step.ts942 B
- 脚本tests/fixtures/bad-no-lifecycle/packages/shell/src/game-host/describe-error.ts286 B
- 脚本tests/fixtures/bad-no-lifecycle/packages/shell/src/game-host/paint-sim-png.ts1.1 KB
- 其他tests/fixtures/bad-no-lifecycle/packages/shell/src/game-host/realtime-board-host.test.tsx4.3 KB
- 其他tests/fixtures/bad-no-lifecycle/packages/shell/src/game-host/realtime-board-host.tsx4.1 KB
- 脚本tests/fixtures/bad-no-lifecycle/packages/shell/src/game-host/record-sim.ts1.4 KB
- 脚本tests/fixtures/bad-no-lifecycle/packages/shell/src/game-host/run-loop-frame.test.ts2.4 KB
- 脚本tests/fixtures/bad-no-lifecycle/packages/shell/src/game-host/run-loop-frame.ts1.5 KB
- 脚本tests/fixtures/bad-no-lifecycle/packages/shell/src/game-host/use-fixed-step-loop.ts2.0 KB
- 脚本tests/fixtures/bad-no-lifecycle/packages/shell/src/game-host/use-game-lifecycle.ts1.2 KB
- 资产文件tests/fixtures/bad-no-lifecycle/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.5.png70 B
- 资产文件tests/fixtures/bad-no-lifecycle/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.png70 B
- 资产文件tests/fixtures/bad-no-lifecycle/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-1.png70 B
- 资产文件tests/fixtures/bad-no-lifecycle/test/goldens/boards/__image_snapshots__/demo-arena-small-0.5.png70 B
- 资产文件tests/fixtures/bad-no-lifecycle/test/goldens/boards/__image_snapshots__/demo-arena-small-0.png70 B
- 资产文件tests/fixtures/bad-no-lifecycle/test/goldens/boards/__image_snapshots__/demo-arena-small-1.png70 B
- 资产文件tests/fixtures/bad-no-lifecycle/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.5.png70 B
- 资产文件tests/fixtures/bad-no-lifecycle/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.png70 B
- 资产文件tests/fixtures/bad-no-lifecycle/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-1.png70 B
- 脚本tests/fixtures/bad-no-lifecycle/test/goldens/boards/demo-arena-board.golden.test.ts2.5 KB
- 脚本tests/fixtures/bad-no-replay-test/apps/bank-shot/src/rules/simulate-volley.ts3.7 KB
- 脚本tests/fixtures/bad-no-replay-test/apps/demo-arena/src/board/draw-arena.test.ts3.1 KB
- 脚本tests/fixtures/bad-no-replay-test/apps/demo-arena/src/board/draw-arena.ts1.5 KB
- 脚本tests/fixtures/bad-no-replay-test/apps/demo-arena/src/sim/demo-arena-sim.ts5.1 KB
- 参考文档tests/fixtures/bad-no-replay-test/EXPECT.txt69 B
- 脚本tests/fixtures/bad-no-replay-test/packages/game-kit/src/geom/spatial-hash.ts2.2 KB
- 脚本tests/fixtures/bad-no-replay-test/packages/game-kit/src/geom/sweep.ts2.8 KB
- 脚本tests/fixtures/bad-no-replay-test/packages/game-kit/src/geom/vec2.ts1.3 KB
- 脚本tests/fixtures/bad-no-replay-test/packages/game-kit/src/rng/sfc32.ts2.7 KB
- 脚本tests/fixtures/bad-no-replay-test/packages/game-kit/src/testing/replay-commands.ts1.5 KB
- 脚本tests/fixtures/bad-no-replay-test/packages/game-kit/src/timeline/fixed-step.test.ts1.5 KB
- 脚本tests/fixtures/bad-no-replay-test/packages/game-kit/src/timeline/fixed-step.ts942 B
- 脚本tests/fixtures/bad-no-replay-test/packages/shell/src/game-host/describe-error.ts286 B
- 脚本tests/fixtures/bad-no-replay-test/packages/shell/src/game-host/paint-sim-png.ts1.1 KB
- 其他tests/fixtures/bad-no-replay-test/packages/shell/src/game-host/realtime-board-host.test.tsx4.3 KB
- 其他tests/fixtures/bad-no-replay-test/packages/shell/src/game-host/realtime-board-host.tsx4.8 KB
- 脚本tests/fixtures/bad-no-replay-test/packages/shell/src/game-host/record-sim.ts1.4 KB
- 脚本tests/fixtures/bad-no-replay-test/packages/shell/src/game-host/run-loop-frame.test.ts2.4 KB
- 脚本tests/fixtures/bad-no-replay-test/packages/shell/src/game-host/run-loop-frame.ts1.5 KB
- 脚本tests/fixtures/bad-no-replay-test/packages/shell/src/game-host/use-fixed-step-loop.ts2.0 KB
- 脚本tests/fixtures/bad-no-replay-test/packages/shell/src/game-host/use-game-lifecycle.ts1.2 KB
- 资产文件tests/fixtures/bad-no-replay-test/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.5.png70 B
- 资产文件tests/fixtures/bad-no-replay-test/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.png70 B
- 资产文件tests/fixtures/bad-no-replay-test/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-1.png70 B
- 资产文件tests/fixtures/bad-no-replay-test/test/goldens/boards/__image_snapshots__/demo-arena-small-0.5.png70 B
- 资产文件tests/fixtures/bad-no-replay-test/test/goldens/boards/__image_snapshots__/demo-arena-small-0.png70 B
- 资产文件tests/fixtures/bad-no-replay-test/test/goldens/boards/__image_snapshots__/demo-arena-small-1.png70 B
- 资产文件tests/fixtures/bad-no-replay-test/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.5.png70 B
- 资产文件tests/fixtures/bad-no-replay-test/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.png70 B
- 资产文件tests/fixtures/bad-no-replay-test/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-1.png70 B
- 脚本tests/fixtures/bad-no-replay-test/test/goldens/boards/demo-arena-board.golden.test.ts2.5 KB
- 脚本tests/fixtures/bad-replay-uncapped/apps/bank-shot/src/rules/simulate-volley.ts3.7 KB
- 脚本tests/fixtures/bad-replay-uncapped/apps/demo-arena/src/board/draw-arena.test.ts3.1 KB
- 脚本tests/fixtures/bad-replay-uncapped/apps/demo-arena/src/board/draw-arena.ts1.5 KB
- 脚本tests/fixtures/bad-replay-uncapped/apps/demo-arena/src/sim/demo-arena-sim.test.ts2.3 KB
- 脚本tests/fixtures/bad-replay-uncapped/apps/demo-arena/src/sim/demo-arena-sim.ts5.1 KB
- 参考文档tests/fixtures/bad-replay-uncapped/EXPECT.txt58 B
- 脚本tests/fixtures/bad-replay-uncapped/packages/game-kit/src/geom/spatial-hash.ts2.2 KB
- 脚本tests/fixtures/bad-replay-uncapped/packages/game-kit/src/geom/sweep.ts2.8 KB
- 脚本tests/fixtures/bad-replay-uncapped/packages/game-kit/src/geom/vec2.ts1.3 KB
- 脚本tests/fixtures/bad-replay-uncapped/packages/game-kit/src/rng/sfc32.ts2.7 KB
- 脚本tests/fixtures/bad-replay-uncapped/packages/game-kit/src/testing/replay-commands.ts1.5 KB
- 脚本tests/fixtures/bad-replay-uncapped/packages/game-kit/src/timeline/fixed-step.test.ts1.5 KB
- 脚本tests/fixtures/bad-replay-uncapped/packages/game-kit/src/timeline/fixed-step.ts942 B
- 脚本tests/fixtures/bad-replay-uncapped/packages/shell/src/game-host/describe-error.ts286 B
- 脚本tests/fixtures/bad-replay-uncapped/packages/shell/src/game-host/paint-sim-png.ts1.1 KB
- 其他tests/fixtures/bad-replay-uncapped/packages/shell/src/game-host/realtime-board-host.test.tsx4.3 KB
- 其他tests/fixtures/bad-replay-uncapped/packages/shell/src/game-host/realtime-board-host.tsx4.8 KB
- 脚本tests/fixtures/bad-replay-uncapped/packages/shell/src/game-host/record-sim.ts1.4 KB
- 脚本tests/fixtures/bad-replay-uncapped/packages/shell/src/game-host/run-loop-frame.test.ts2.4 KB
- 脚本tests/fixtures/bad-replay-uncapped/packages/shell/src/game-host/run-loop-frame.ts1.5 KB
- 脚本tests/fixtures/bad-replay-uncapped/packages/shell/src/game-host/use-fixed-step-loop.ts2.0 KB
- 脚本tests/fixtures/bad-replay-uncapped/packages/shell/src/game-host/use-game-lifecycle.ts1.2 KB
- 资产文件tests/fixtures/bad-replay-uncapped/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.5.png70 B
- 资产文件tests/fixtures/bad-replay-uncapped/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.png70 B
- 资产文件tests/fixtures/bad-replay-uncapped/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-1.png70 B
- 资产文件tests/fixtures/bad-replay-uncapped/test/goldens/boards/__image_snapshots__/demo-arena-small-0.5.png70 B
- 资产文件tests/fixtures/bad-replay-uncapped/test/goldens/boards/__image_snapshots__/demo-arena-small-0.png70 B
- 资产文件tests/fixtures/bad-replay-uncapped/test/goldens/boards/__image_snapshots__/demo-arena-small-1.png70 B
- 资产文件tests/fixtures/bad-replay-uncapped/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.5.png70 B
- 资产文件tests/fixtures/bad-replay-uncapped/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.png70 B
- 资产文件tests/fixtures/bad-replay-uncapped/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-1.png70 B
- 脚本tests/fixtures/bad-replay-uncapped/test/goldens/boards/demo-arena-board.golden.test.ts2.5 KB
- 脚本tests/fixtures/bad-replay-untimed/apps/bank-shot/src/rules/simulate-volley.ts3.7 KB
- 脚本tests/fixtures/bad-replay-untimed/apps/demo-arena/src/board/draw-arena.test.ts3.1 KB
- 脚本tests/fixtures/bad-replay-untimed/apps/demo-arena/src/board/draw-arena.ts1.5 KB
- 脚本tests/fixtures/bad-replay-untimed/apps/demo-arena/src/sim/demo-arena-sim.test.ts2.3 KB
- 脚本tests/fixtures/bad-replay-untimed/apps/demo-arena/src/sim/demo-arena-sim.ts5.1 KB
- 参考文档tests/fixtures/bad-replay-untimed/EXPECT.txt64 B
- 脚本tests/fixtures/bad-replay-untimed/packages/game-kit/src/geom/spatial-hash.ts2.2 KB
- 脚本tests/fixtures/bad-replay-untimed/packages/game-kit/src/geom/sweep.ts2.8 KB
- 脚本tests/fixtures/bad-replay-untimed/packages/game-kit/src/geom/vec2.ts1.3 KB
- 脚本tests/fixtures/bad-replay-untimed/packages/game-kit/src/rng/sfc32.ts2.7 KB
- 脚本tests/fixtures/bad-replay-untimed/packages/game-kit/src/testing/replay-commands.ts1.5 KB
- 脚本tests/fixtures/bad-replay-untimed/packages/game-kit/src/timeline/fixed-step.test.ts1.5 KB
- 脚本tests/fixtures/bad-replay-untimed/packages/game-kit/src/timeline/fixed-step.ts942 B
- 脚本tests/fixtures/bad-replay-untimed/packages/shell/src/game-host/describe-error.ts286 B
- 脚本tests/fixtures/bad-replay-untimed/packages/shell/src/game-host/paint-sim-png.ts1.1 KB
- 其他tests/fixtures/bad-replay-untimed/packages/shell/src/game-host/realtime-board-host.test.tsx4.3 KB
- 其他tests/fixtures/bad-replay-untimed/packages/shell/src/game-host/realtime-board-host.tsx4.8 KB
- 脚本tests/fixtures/bad-replay-untimed/packages/shell/src/game-host/record-sim.ts1.4 KB
- 脚本tests/fixtures/bad-replay-untimed/packages/shell/src/game-host/run-loop-frame.test.ts2.4 KB
- 脚本tests/fixtures/bad-replay-untimed/packages/shell/src/game-host/run-loop-frame.ts1.5 KB
- 脚本tests/fixtures/bad-replay-untimed/packages/shell/src/game-host/use-fixed-step-loop.ts2.0 KB
- 脚本tests/fixtures/bad-replay-untimed/packages/shell/src/game-host/use-game-lifecycle.ts1.2 KB
- 资产文件tests/fixtures/bad-replay-untimed/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.5.png70 B
- 资产文件tests/fixtures/bad-replay-untimed/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.png70 B
- 资产文件tests/fixtures/bad-replay-untimed/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-1.png70 B
- 资产文件tests/fixtures/bad-replay-untimed/test/goldens/boards/__image_snapshots__/demo-arena-small-0.5.png70 B
- 资产文件tests/fixtures/bad-replay-untimed/test/goldens/boards/__image_snapshots__/demo-arena-small-0.png70 B
- 资产文件tests/fixtures/bad-replay-untimed/test/goldens/boards/__image_snapshots__/demo-arena-small-1.png70 B
- 资产文件tests/fixtures/bad-replay-untimed/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.5.png70 B
- 资产文件tests/fixtures/bad-replay-untimed/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.png70 B
- 资产文件tests/fixtures/bad-replay-untimed/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-1.png70 B
- 脚本tests/fixtures/bad-replay-untimed/test/goldens/boards/demo-arena-board.golden.test.ts2.5 KB
- 脚本tests/fixtures/bad-runner-no-modify/apps/bank-shot/src/rules/simulate-volley.ts3.7 KB
- 脚本tests/fixtures/bad-runner-no-modify/apps/demo-arena/src/board/draw-arena.test.ts3.1 KB
- 脚本tests/fixtures/bad-runner-no-modify/apps/demo-arena/src/board/draw-arena.ts1.5 KB
- 脚本tests/fixtures/bad-runner-no-modify/apps/demo-arena/src/sim/demo-arena-sim.test.ts2.3 KB
- 脚本tests/fixtures/bad-runner-no-modify/apps/demo-arena/src/sim/demo-arena-sim.ts5.1 KB
- 参考文档tests/fixtures/bad-runner-no-modify/EXPECT.txt30 B
- 脚本tests/fixtures/bad-runner-no-modify/packages/game-kit/src/geom/spatial-hash.ts2.2 KB
- 脚本tests/fixtures/bad-runner-no-modify/packages/game-kit/src/geom/sweep.ts2.8 KB
- 脚本tests/fixtures/bad-runner-no-modify/packages/game-kit/src/geom/vec2.ts1.3 KB
- 脚本tests/fixtures/bad-runner-no-modify/packages/game-kit/src/rng/sfc32.ts2.7 KB
- 脚本tests/fixtures/bad-runner-no-modify/packages/game-kit/src/testing/replay-commands.ts1.5 KB
- 脚本tests/fixtures/bad-runner-no-modify/packages/game-kit/src/timeline/fixed-step.test.ts1.5 KB
- 脚本tests/fixtures/bad-runner-no-modify/packages/game-kit/src/timeline/fixed-step.ts942 B
- 脚本tests/fixtures/bad-runner-no-modify/packages/shell/src/game-host/describe-error.ts286 B
- 脚本tests/fixtures/bad-runner-no-modify/packages/shell/src/game-host/paint-sim-png.ts1.1 KB
- 其他tests/fixtures/bad-runner-no-modify/packages/shell/src/game-host/realtime-board-host.test.tsx4.3 KB
- 其他tests/fixtures/bad-runner-no-modify/packages/shell/src/game-host/realtime-board-host.tsx4.8 KB
- 脚本tests/fixtures/bad-runner-no-modify/packages/shell/src/game-host/record-sim.ts1.4 KB
- 脚本tests/fixtures/bad-runner-no-modify/packages/shell/src/game-host/run-loop-frame.test.ts2.4 KB
- 脚本tests/fixtures/bad-runner-no-modify/packages/shell/src/game-host/run-loop-frame.ts1.4 KB
- 脚本tests/fixtures/bad-runner-no-modify/packages/shell/src/game-host/use-fixed-step-loop.ts2.0 KB
- 脚本tests/fixtures/bad-runner-no-modify/packages/shell/src/game-host/use-game-lifecycle.ts1.2 KB
- 资产文件tests/fixtures/bad-runner-no-modify/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.5.png70 B
- 资产文件tests/fixtures/bad-runner-no-modify/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.png70 B
- 资产文件tests/fixtures/bad-runner-no-modify/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-1.png70 B
- 资产文件tests/fixtures/bad-runner-no-modify/test/goldens/boards/__image_snapshots__/demo-arena-small-0.5.png70 B
- 资产文件tests/fixtures/bad-runner-no-modify/test/goldens/boards/__image_snapshots__/demo-arena-small-0.png70 B
- 资产文件tests/fixtures/bad-runner-no-modify/test/goldens/boards/__image_snapshots__/demo-arena-small-1.png70 B
- 资产文件tests/fixtures/bad-runner-no-modify/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.5.png70 B
- 资产文件tests/fixtures/bad-runner-no-modify/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.png70 B
- 资产文件tests/fixtures/bad-runner-no-modify/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-1.png70 B
- 脚本tests/fixtures/bad-runner-no-modify/test/goldens/boards/demo-arena-board.golden.test.ts2.5 KB
- 脚本tests/fixtures/bad-sim-alloc/apps/bank-shot/src/rules/simulate-volley.ts3.7 KB
- 脚本tests/fixtures/bad-sim-alloc/apps/demo-arena/src/board/draw-arena.test.ts3.1 KB
- 脚本tests/fixtures/bad-sim-alloc/apps/demo-arena/src/board/draw-arena.ts1.5 KB
- 脚本tests/fixtures/bad-sim-alloc/apps/demo-arena/src/sim/demo-arena-sim.test.ts2.3 KB
- 脚本tests/fixtures/bad-sim-alloc/apps/demo-arena/src/sim/demo-arena-sim.ts5.2 KB
- 参考文档tests/fixtures/bad-sim-alloc/EXPECT.txt119 B
- 脚本tests/fixtures/bad-sim-alloc/packages/game-kit/src/geom/spatial-hash.ts2.2 KB
- 脚本tests/fixtures/bad-sim-alloc/packages/game-kit/src/geom/sweep.ts2.8 KB
- 脚本tests/fixtures/bad-sim-alloc/packages/game-kit/src/geom/vec2.ts1.3 KB
- 脚本tests/fixtures/bad-sim-alloc/packages/game-kit/src/rng/sfc32.ts2.7 KB
- 脚本tests/fixtures/bad-sim-alloc/packages/game-kit/src/testing/replay-commands.ts1.5 KB
- 脚本tests/fixtures/bad-sim-alloc/packages/game-kit/src/timeline/fixed-step.test.ts1.5 KB
- 脚本tests/fixtures/bad-sim-alloc/packages/game-kit/src/timeline/fixed-step.ts942 B
- 脚本tests/fixtures/bad-sim-alloc/packages/shell/src/game-host/describe-error.ts286 B
- 脚本tests/fixtures/bad-sim-alloc/packages/shell/src/game-host/paint-sim-png.ts1.1 KB
- 其他tests/fixtures/bad-sim-alloc/packages/shell/src/game-host/realtime-board-host.test.tsx4.3 KB
- 其他tests/fixtures/bad-sim-alloc/packages/shell/src/game-host/realtime-board-host.tsx4.8 KB
- 脚本tests/fixtures/bad-sim-alloc/packages/shell/src/game-host/record-sim.ts1.4 KB
- 脚本tests/fixtures/bad-sim-alloc/packages/shell/src/game-host/run-loop-frame.test.ts2.4 KB
- 脚本tests/fixtures/bad-sim-alloc/packages/shell/src/game-host/run-loop-frame.ts1.5 KB
- 脚本tests/fixtures/bad-sim-alloc/packages/shell/src/game-host/use-fixed-step-loop.ts2.0 KB
- 脚本tests/fixtures/bad-sim-alloc/packages/shell/src/game-host/use-game-lifecycle.ts1.2 KB
- 资产文件tests/fixtures/bad-sim-alloc/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.5.png70 B
- 资产文件tests/fixtures/bad-sim-alloc/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.png70 B
- 资产文件tests/fixtures/bad-sim-alloc/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-1.png70 B
- 资产文件tests/fixtures/bad-sim-alloc/test/goldens/boards/__image_snapshots__/demo-arena-small-0.5.png70 B
- 资产文件tests/fixtures/bad-sim-alloc/test/goldens/boards/__image_snapshots__/demo-arena-small-0.png70 B
- 资产文件tests/fixtures/bad-sim-alloc/test/goldens/boards/__image_snapshots__/demo-arena-small-1.png70 B
- 资产文件tests/fixtures/bad-sim-alloc/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.5.png70 B
- 资产文件tests/fixtures/bad-sim-alloc/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.png70 B
- 资产文件tests/fixtures/bad-sim-alloc/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-1.png70 B
- 脚本tests/fixtures/bad-sim-alloc/test/goldens/boards/demo-arena-board.golden.test.ts2.5 KB
- 脚本tests/fixtures/bad-sim-bridge/apps/bank-shot/src/rules/simulate-volley.ts3.7 KB
- 脚本tests/fixtures/bad-sim-bridge/apps/demo-arena/src/board/draw-arena.test.ts3.1 KB
- 脚本tests/fixtures/bad-sim-bridge/apps/demo-arena/src/board/draw-arena.ts1.5 KB
- 脚本tests/fixtures/bad-sim-bridge/apps/demo-arena/src/sim/demo-arena-sim.test.ts2.3 KB
- 脚本tests/fixtures/bad-sim-bridge/apps/demo-arena/src/sim/demo-arena-sim.ts5.2 KB
- 参考文档tests/fixtures/bad-sim-bridge/EXPECT.txt43 B
- 脚本tests/fixtures/bad-sim-bridge/packages/game-kit/src/geom/spatial-hash.ts2.2 KB
- 脚本tests/fixtures/bad-sim-bridge/packages/game-kit/src/geom/sweep.ts2.8 KB
- 脚本tests/fixtures/bad-sim-bridge/packages/game-kit/src/geom/vec2.ts1.3 KB
- 脚本tests/fixtures/bad-sim-bridge/packages/game-kit/src/rng/sfc32.ts2.7 KB
- 脚本tests/fixtures/bad-sim-bridge/packages/game-kit/src/testing/replay-commands.ts1.5 KB
- 脚本tests/fixtures/bad-sim-bridge/packages/game-kit/src/timeline/fixed-step.test.ts1.5 KB
- 脚本tests/fixtures/bad-sim-bridge/packages/game-kit/src/timeline/fixed-step.ts942 B
- 脚本tests/fixtures/bad-sim-bridge/packages/shell/src/game-host/describe-error.ts286 B
- 脚本tests/fixtures/bad-sim-bridge/packages/shell/src/game-host/paint-sim-png.ts1.1 KB
- 其他tests/fixtures/bad-sim-bridge/packages/shell/src/game-host/realtime-board-host.test.tsx4.3 KB
- 其他tests/fixtures/bad-sim-bridge/packages/shell/src/game-host/realtime-board-host.tsx4.8 KB
- 脚本tests/fixtures/bad-sim-bridge/packages/shell/src/game-host/record-sim.ts1.4 KB
- 脚本tests/fixtures/bad-sim-bridge/packages/shell/src/game-host/run-loop-frame.test.ts2.4 KB
- 脚本tests/fixtures/bad-sim-bridge/packages/shell/src/game-host/run-loop-frame.ts1.5 KB
- 脚本tests/fixtures/bad-sim-bridge/packages/shell/src/game-host/use-fixed-step-loop.ts2.0 KB
- 脚本tests/fixtures/bad-sim-bridge/packages/shell/src/game-host/use-game-lifecycle.ts1.2 KB
- 资产文件tests/fixtures/bad-sim-bridge/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.5.png70 B
- 资产文件tests/fixtures/bad-sim-bridge/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-0.png70 B
- 资产文件tests/fixtures/bad-sim-bridge/test/goldens/boards/__image_snapshots__/demo-arena-phone-portrait-1.png70 B
- 资产文件tests/fixtures/bad-sim-bridge/test/goldens/boards/__image_snapshots__/demo-arena-small-0.5.png70 B
- 资产文件tests/fixtures/bad-sim-bridge/test/goldens/boards/__image_snapshots__/demo-arena-small-0.png70 B
- 资产文件tests/fixtures/bad-sim-bridge/test/goldens/boards/__image_snapshots__/demo-arena-small-1.png70 B
- 资产文件tests/fixtures/bad-sim-bridge/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.5.png70 B
- 资产文件tests/fixtures/bad-sim-bridge/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-0.png70 B
- 资产文件tests/fixtures/bad-sim-bridge/test/goldens/boards/__image_snapshots__/demo-arena-tablet-landscape-1.png70 B
- 脚本tests/fixtures/bad-sim-bridge/test/goldens/boards/demo-arena-board.golden.test.ts2.5 KB
- 脚本tests/fixtures/bad-sim-helper-alloc/apps/bank-shot/src/rules/simulate-volley.ts3.7 KB
- 脚本tests/fixtures/bad-sim-helper-alloc/apps/demo-arena/src/board/draw-arena.test.ts3.1 KB
- 脚本tests/fixtures/bad-sim-helper-alloc/apps/demo-arena/src/board/draw-arena.ts1.5 KB
- 脚本tests/fixtures/bad-sim-helper-alloc/apps/demo-arena/src/sim/demo-arena-sim.test.ts2.3 KB
- 脚本tests/fixtures/bad-sim-helper-alloc/apps/demo-arena/src/sim/demo-arena-sim.ts5.2 KB
- 参考文档tests/fixtures/bad-sim-helper-alloc/EXPECT.txt54 B
- 脚本tests/fixtures/bad-sim-helper-alloc/packages/game-kit/src/geom/spatial-hash.ts2.2 KB
- 脚本tests/fixtures/bad-sim-helper-alloc/packages/game-kit/src/geom/sweep.ts2.8 KB
- 脚本tests/fixtures/bad-sim-helper-alloc/packages/game-kit/src/geom/vec2.ts1.3 KB
- 脚本tests/fixtures/bad-sim-helper-alloc/packages/game-kit/src/rng/sfc32.ts2.7 KB
- 脚本tests/fixtures/bad-sim-helper-alloc/packages/game-kit/src/testing/replay-commands.ts1.5 KB
- 脚本tests/fixtures/bad-sim-helper-alloc/packages/game-kit/src/timeline/fixed-step.test.ts1.5 KB
- 脚本tests/fixtures/bad-sim-helper-alloc/packages/game-kit/src/timeline/fixed-step.ts942 B
- 脚本tests/fixtures/bad-sim-helper-alloc/packages/shell/src/game-host/describe-error.ts286 B
- 脚本tests/fixtures/bad-sim-helper-alloc/packages/shell/src/game-host/paint-sim-png.ts1.1 KB
03 SKILL.md 正文
Real-time game loop
Real-time play in Pocket Arcade advances in fixed ticks of 1/120 s, never in frame time: Halo Drift runs a typed-array sim on the UI thread inside a Reanimated frame callback, and Bank Shot-style games run their continuous phase inside applyMove and replay it as a timeline. Either way a recorded run replays bit-exactly in Jest. This skill builds the loop kit, each sim, the simulate-then-replay phase and the checks that prove them.
Rules that must hold
- Simulate in fixed steps of
STEP_MS = 1000 / 120with a 250 ms catch-up clamp; the first frame after (re)activation simulates nothing. Why: results depend on ticks, never on 60 vs 120 Hz or frame timing, and a resumed sim never jumps. - Gameplay counts ticks, never milliseconds: speeds are per tick, timers are tick counts, the sim never sees a timestamp. Why: tick counts are exact integers on every device.
- Sim state is one plain object of typed arrays in ONE shared value, mutated in place on the UI thread, then
sim.modify(). Why: no per-frame copies or allocations, and in-place mutation does not notify the picture by itself. - A tick allocates nothing: buffers (entities, events, RNG words, spatial-hash scratch) are created once in
create…Sim; a full event queue drops events; tick code does scalar maths on the typed arrays (thevec2/sweephelpers return new objects and belong toapplyMove). Why: the loop may run 30 ticks in one frame on the UI thread. - Sims, the loop kit and the geometry kit are
'worklet'modules that import values only from other'worklet'modules. Why: a plain JS function called on the UI thread throws at runtime, not at build time. - Obey the determinism policy: only
+ - * / %, bitwise,Math.sqrt/imul/floor/round/abs/min/max/PI; no**, no otherMath.*, noMath.random,Date,performance.now,Intl; randomness from the sim's own sfc32 words. Why: Hermes and V8 compute transcendental functions differently, so replays and daily seeds would diverge. - Input is an integer command recorded as
(tick, command), from the committed 16-direction table (1 right, 5 down, 9 left, 13 up; 0 idle). Why: only integer logs replay bit-exactly; the same table sits in the stick gesture. - The sim never talks to JS itself: it appends
[kind, value, tick]events;runLoopFramedrains them once per frame and sends one batch withscheduleOnRN. Why: one bridge crossing per frame, and the sim stays testable in plain Jest. - The frame-callback body is one call to
runLoopFrame, which holds thetry/catch; errors stop the loop and pause the game. Why: an uncaught UI-thread exception kills the app, and React Compiler bails out of hooks with value blocks insidetry/catch. - The loop runs only while the board may run (app active, screen focused, no full-screen ad, not paused); stopping takes a save point (a JS copy of the sim plus the input log) and shows Pause; real-time games never auto-resume. Why: no simulation in the background, and killing the app loses at most the current wave.
- Every sim has a replay test and a frame-grouping test. Why: they are the proof of determinism; everything else (saves, bots, bug reports) depends on it.
- Simulate-then-replay games run the continuous phase inside
applyMovewith the same fixed step and return timed events (atMs), capped bymaxTicks. Why: the game stays turn-based for saves, undo, bots and goldens; only the picture moves in real time. - A real-time board is proven like every board: a draw-call budget test with every entity slot in play (≤ 1,000) and pixel goldens through
paintSimPngat 3 sizes × moments 0, 0.5, 1 of a scripted run. Why: the loop's tests prove the numbers, not the picture; the golden catches a draw that scales, colours or clips wrongly. - No physics engine: swept circles,
reflectand the spatial hash cover the catalogue. Why: engines bring non-deterministic floats and a second runtime;planck1.5.0 on JS is the documented fallback only for stacking, joints or friction.
Workflow
- Classify the game. Real-time (Halo Drift): read references/fixed-step-loop.md and references/sim-design.md. A continuous phase inside a turn (Bank Shot, Toggle Drop, cascades): read references/simulate-then-replay.md. Geometry needs: references/geom-kit.md. The drawing rules, palettes and turn-based goldens come from
board-rendering-skia(a real-time board's draw test and goldens are here); the stick gesture fromboard-gestures-and-input. These modules must already exist, because the templates import them:packages/game-kit/src/rng/sfc32.ts(game-rules-engine), andpackages/shell/src/game-host/board-types.ts,board-kit.ts,describe-error.ts,use-game-lifecycle.ts,packages/shell/src/app/use-is-app-active.tsandtest/goldens/boards/skia-golden.ts(board-rendering-skia). - Check the kit. Run
node ${CLAUDE_SKILL_DIR}/scripts/check-realtime-loop.mjs .from the repo root. For everyloop-file-missingcopy the file verbatim:templates/game-kit/X→packages/game-kit/src/X,templates/shell/game-host/X→packages/shell/src/game-host/X(tests included). - Real-time game, test-first: copy
templates/game/sim/__GAME_ID__-sim.test.tsand__GAME_ID__-sim.tstoapps/<game-id>/src/sim/, replace__GAME_ID__(kebab) and__GAME_PASCAL__(PascalCase) in names and contents, run the replay and frame-grouping tests, then replace the gameplay slot (moveEntity) with the game's rules, keeping both tests green after every change. Add event kinds as exported integer constants. - Real-time board and its proof: copy
templates/game/board/(palettes with theirboard-contrast.json,draw-arena.tsand its draw-call budget test) toapps/<game-id>/src/board/andtemplates/test/goldens/boards/__GAME_ID__-board.golden.test.tstotest/goldens/boards/<game-id>-board.golden.test.ts, filling__GAME_ID__/__GAME_PASCAL__. Adapt the draw to the game (Atlas for hundreds of sprites) and set its ownDRAW_CALL_BUDGET. Create the goldens deliberately:npx jest test/goldens/boards/<game-id>-board.golden.test.ts --selectProjects golden -u, open all 9 PNGs with the Read tool (bodies inside the canvas, nothing clipped atsmall), thenCI=1 npx jest --ci --selectProjects golden; commit baselines with aGate-Change:trailer. - Wire the host: render the board with
RealtimeBoardHostfrom the Game screen:initialSim={realtime.createSim(state)},game={realtime}(itsstepanddrainEvents),draw,makeGesture={makeStickGesture},onEvents(sound, HUD, stats, input log),isSavePoint={realtime.isSavePoint},onSavePoint(saverealtime.snapshot(copy)with the input log),onAutoPause,isPaused,isEnded(set when a batch reports the run's end, so the loop stops without a Pause),onFailure.realtimeis the game module'sRealtimeSpec(references/sim-design.md, last section). - Simulate-then-replay game: imitate examples/bank-shot/: a pure
simulate…function inapps/<game-id>/src/rules/called byapplyMove, events withatMs, a…Tracks(events)builder used bybuildTimeline, and the property tests (inside the arena, never faster, same shot same volley, tracks replay the path). - Lint, format and type-check:
npx eslint --fixandnpx prettier --writeon the new files, thennpx tsc -p apps/<game-id> --noEmit; runnpx jest apps/<game-id> packages/game-kit/src packages/shell/src/game-host --ci --selectProjects unit --coverage --collectCoverageFrom='apps/<game-id>/src/**/*.ts' --coverageThreshold='{}'(paths first:--selectProjectstakes several values and would swallow them; onlynpm run test:coveragejudges the thresholds). - Run the check
node ${CLAUDE_SKILL_DIR}/scripts/check-realtime-loop.mjs ., fix everyFAILline (each names the file, the rule and the fix) and rerun until it printsRESULT: PASS. In a repo whose every game module (apps/<id>/src/index.ts) saysrealtime: nulland that has no sim, replay rules or loop kit, it printsNOT APPLICABLE: ...andRESULT: PASS(exit 0), which counts as a pass; with no game module at all it stops with exit 2. - Play it for real. The real-time host is compiled and its lifecycle unit-tested with Skia and the loop mocked, but it has not run on a device yet: on the first real-time game, run a Release simulator build and confirm the picture updates every frame, Pause and background stop the loop, and resume starts clean. The owner then plays at least 60 s on a ProMotion phone with the frame-time recorder on (hitch rate ≤ 10 ms/s) and judges the feel.
Definition of done
- [ ] The loop kit exists (
fixed-step.ts,vec2.ts,sweep.ts,spatial-hash.ts,replay-commands.ts; for real-time games alsorun-loop-frame.ts,use-fixed-step-loop.ts,record-sim.ts,realtime-board-host.tsxwith its lifecycle test,paint-sim-png.ts) and its tests pass. - [ ] Each sim is a
'worklet'module of typed arrays that allocates nothing per tick, counts ticks, records(tick, command), drains[kind, value, tick]events, and its replay and frame-grouping tests pass. - [ ] Each real-time board has palettes (4 sets), a
'worklet'draw, a draw-call budget test (≤ 1,000) and 9 reviewed golden PNGs that pass underCI=1 npx jest --ci --selectProjects golden. - [ ] Each simulate-then-replay phase is pure, capped by
maxTicks, emitsatMsevents, and its properties (inside the arena, never faster, deterministic, tracks replay the path) pass. - [ ] The host stops the loop, saves and shows Pause on pause, background, blur and ads, and never auto-resumes.
- [ ]
npx tsc --noEmit,npx eslint --max-warnings 0andnpx prettier --checkpass on the new files; no__GAME_…__placeholder is left. - [ ]
node ${CLAUDE_SKILL_DIR}/scripts/check-realtime-loop.mjs .printsRESULT: PASS
Anti-patterns
- Moving entities by
dtin milliseconds (x += speed * dt). Frame timing leaks into gameplay and replays diverge; move per tick insidestep. - Keeping the world in React state or copying it to JS every frame. Keep it in the shared value; JS gets batched events and a copy only at save points.
- Angles and
Math.atan2/Math.cosin the sim. Use committed unit-vector tables, dot products andreflect. - Calling
scheduleOnRNfrom inside the sim, or once per event. Queue events in the sim; the runner sends one batch per frame. - Growing arrays per tick (
events.pushon a JS array,new Float32Array,.map). Pre-allocate increate…Simand write in place. - A module-level
letor array in a sim file (a counter, a hit log). The UI thread works on its own captured copy, and saves and replays never see it; keep every changing value in the sim's typed arrays. - Auto-resuming a real-time game when the app returns to the foreground. The player expects Pause; resume only on their tap.
- Running a volley live in the frame loop instead of inside
applyMove. It breaks saves, undo, bots and goldens; simulate first, then replay the events. - A second frame callback for measurements. The frame-time recorder hooks into
runLoopFrame'stry; an extra callback keeps idle screens rendering.
Files in this skill
| File | What it is | Read/run when |
|---|---|---|
| references/fixed-step-loop.md | The accumulator, loop runner and hook, the real-time host, lifecycle and save points, sprites, 120 Hz, what is verified | Workflow step 1 for real-time games, and before touching the loop |
| references/sim-design.md | Typed-array state, one tick, events, sfc32 words, the determinism policy, integer commands, replay tests, save points | Step 1 and step 3 |
| references/simulate-then-replay.md | Continuous phases inside applyMove: fixed step, timed events, tracks, the collision recipe, discrete runs, tests |
Step 1 and step 6 |
| references/geom-kit.md | vec2, sweep, spatial-hash APIs and rules for new geometry |
Whenever a game needs vectors or collisions |
templates/game-kit/ |
timeline/fixed-step.ts (+ test), geom/vec2.ts (+ test), geom/sweep.ts (+ test), geom/spatial-hash.ts (+ test), testing/replay-commands.ts (+ test) |
Step 2 (copy verbatim to packages/game-kit/src/) |
templates/shell/game-host/ |
run-loop-frame.ts (+ test), use-fixed-step-loop.ts, record-sim.ts (+ test), realtime-board-host.tsx (+ lifecycle test), paint-sim-png.ts (offscreen render for goldens and art) |
Step 2 (copy verbatim to packages/shell/src/game-host/) |
templates/game/sim/ |
__GAME_ID__-sim.ts skeleton and its replay and frame-grouping tests |
Step 3 |
templates/game/board/ |
Arena palettes (4 sets) and board-contrast.json (the pairs and piece colours the accessibility contrast check measures; list every colour draw() paints), draw-arena.ts for a free-form world and draw-arena.test.ts (draw-call budget, bodies inside the canvas) |
Step 4 |
templates/test/goldens/boards/ |
__GAME_ID__-board.golden.test.ts: the real-time board's pixel golden (3 sizes × moments of a scripted run) |
Step 4 |
| examples/halo-drift/ | The verified Halo Drift sim (player, chasers, hits) with its replay tests | Step 3, as the model to imitate |
| examples/bank-shot/ | Simulate-then-replay volley with sweep and reflect, its tracks builder and property tests | Step 6 |
scripts/check-realtime-loop.mjs |
Checks the kit, step constants, runner, frame callback, worklets, determinism, tick time, isolation, per-tick allocation (helpers included), module-level state, replay tests, stick table, lifecycle, timed and capped replays, the real-time board's budget test and goldens; NOT APPLICABLE (a pass) when every game module says realtime: null |
Steps 2 and 8 and at the end |
scripts/selftest.mjs |
Proves the checker passes the good fixture and catches each planted bug | After changing the checker |
scripts/lib/ |
source-scan.mjs, TypeScript source helpers for the checker |
When changing the checker |
scripts/check-lib.mjs |
Shared script helper, synced from the library (do not edit here) | Never by hand |
assets/shared.json |
Declares the shared files this skill copies in | When adding a shared file |
tests/fixtures/ |
Good and planted-bad inputs for the checker, plus a turn-based/ suite (every game module realtime: null: NOT APPLICABLE) |
When adding a rule to the checker |
Related skills
board-rendering-skia- drawing, palettes, the lifecycle hook, turn timelines and pixel goldens.board-gestures-and-input- the stick gesture that writes integer commands, and aim intents.game-rules-engine-applyMove, events, the determinism policy and the sfc32 PRNG.game-balance-and-bots- thousands of seeded headless runs of the samestepfor difficulty curves.game-host-integration- the Game screen: Pause (S6), save points, HUD from events.performance-budgets- the frame-time recorder and the on-device hitch-rate budget.
04 同仓库更多 Skills
unit-and-component-tests
Sets up Jest and writes Pocket Arcade test code - three projects, RNTL 14 async via renderWithShell, root SDK mocks, fakes, fast-check, coverage, Stryker. Use when a test needs the Shell wrapper, a mock or a fake, or Jest fails. Not for the red-green loop (tdd-workflow) or goldens (golden-tests).
typescript-and-lint-rules
Enforces Pocket Arcade's strict TypeScript 6 tsconfigs, ESLint 9 flat config, Prettier and size limits. Use when writing or splitting .ts/.tsx or fixing a tsc or lint error. Not for gate wiring (quality-gates), names (naming-conventions) or import zones (architecture-and-boundaries).
demo-skill
Builds a demo. Use when testing the pitfall checker.
demo-skill
Builds a demo. Use when testing the pitfall checker.
troubleshooting-playbook
Diagnoses and fixes Pocket Arcade failures with a catalogue of 300+ known ones (symptom, cause, fix). Use when something errors, crashes, hangs or renders wrong, or an error or log needs explaining. Not for gate setup (quality-gates) or running builds (ios-simulator-build, ios-release-testflight).
toybox-visual-parity
Proves a built Pocket Arcade screen matches its Toybox design screenshot (light/dark, en/fa) and drives the fixes: capture, element gates, sheets, sign-off. Use when any screen is built or changed, or for visual parity, design match, screenshot compare. Not for building screens (toybox-screens).