mirror of
https://github.com/imjasonh/nescript
synced 2026-07-08 17:06:04 +00:00
docs: add docs/pong.gif demo to README
Record a 6-second gif of examples/pong.nes running in jsnes and embed it alongside docs/platformer.gif and docs/war.gif as the third project demo. The gif opens on Pong's title menu (CPU VS CPU / 1 PLAYER / 2 PLAYERS) — warmup = 4 frames keeps the menu as the thumbnail the way war's recording does, and then the headless autopilot advances to gameplay partway through the clip. - docs/pong.gif committed (128 KB) - README.md links it under the war demo - scripts/pre-commit rebuilds it when examples/pong* or the recorder/harness change - .github/workflows/ci.yml fails if the committed copy is stale - CLAUDE.md and tests/emulator/record_gif.mjs reference the new gif in the "how to regenerate" sections https://claude.ai/code/session_0134F5uwDEVTes2Ee9S7JeXy
This commit is contained in:
parent
21b91f6398
commit
6d9ebc7d7b
6 changed files with 48 additions and 21 deletions
13
.github/workflows/ci.yml
vendored
13
.github/workflows/ci.yml
vendored
|
|
@ -176,6 +176,19 @@ jobs:
|
|||
echo "::error file=docs/war.gif::committed docs/war.gif is stale; rerun \`node tests/emulator/record_gif.mjs war 360 2 docs/war.gif 4\` and commit the new gif"
|
||||
exit 1
|
||||
fi
|
||||
- name: Verify docs/pong.gif is up to date
|
||||
# Same contract as the platformer and war gifs: the README
|
||||
# embeds docs/pong.gif as the third project demo. Pong's
|
||||
# title screen (CPU VS CPU / 1 PLAYER / 2 PLAYERS menu) is
|
||||
# the gif thumbnail, so warmup = 4 keeps it in frame before
|
||||
# the autopilot advances to gameplay.
|
||||
working-directory: tests/emulator
|
||||
run: |
|
||||
node record_gif.mjs pong 360 2 /tmp/pong.gif 4
|
||||
if ! cmp -s ../../docs/pong.gif /tmp/pong.gif; then
|
||||
echo "::error file=docs/pong.gif::committed docs/pong.gif is stale; rerun \`node tests/emulator/record_gif.mjs pong 360 2 docs/pong.gif 4\` and commit the new gif"
|
||||
exit 1
|
||||
fi
|
||||
- name: Upload actual + diff PNGs on failure
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue