Skip to content

Commit ee972c8

Browse files
committed
Add make register command to generate showcase GIFs from games
Adds a `make register GAME=path/to/game` target that automates recording a 256x256 GIF for the documentation showcase. It temporarily adjusts the game's resolution to match existing screenshots, runs `tiny-cli record --headless`, then restores the original _tiny.json. https://claude.ai/code/session_015KRfWYhCjrJRhvWimcN7mT
1 parent 5888220 commit ee972c8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ sfx:
3232
sample:
3333
./gradlew :tiny-cli:run --args="run ." -Ptiny.workDir=tiny-sample
3434

35+
register:
36+
@if [ -z "$(GAME)" ]; then echo "Usage: make register GAME=path/to/game"; exit 1; fi
37+
@echo "Registering game from $(GAME)..."
38+
cp $(GAME)/_tiny.json $(GAME)/_tiny.json.bak
39+
jq '.resolution = {"width": 256, "height": 256} | .zoom = 1' $(GAME)/_tiny.json.bak > $(GAME)/_tiny.json
40+
tiny-cli record --headless --output tiny-doc/src/docs/asciidoc/sample/$$(basename $(GAME)).gif $(GAME)
41+
mv $(GAME)/_tiny.json.bak $(GAME)/_tiny.json
42+
@echo "Screenshot saved to tiny-doc/src/docs/asciidoc/sample/$$(basename $(GAME)).gif"
43+
3544
test-linux-export:
3645
./gradlew assembleDist -Pversion=DEV-SNAPSHOT
3746
docker run --rm \

0 commit comments

Comments
 (0)