From 6933f99ddb2d7103515d26838496309a807bba26 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 16 Nov 2026 21:28:20 -0300 Subject: Move standalone sketches into sketchbook examples --- examples/noc/test/flappy_bird.reload.script | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 examples/noc/test/flappy_bird.reload.script (limited to 'examples/noc/test/flappy_bird.reload.script') diff --git a/examples/noc/test/flappy_bird.reload.script b/examples/noc/test/flappy_bird.reload.script new file mode 100644 index 0000000..7fa8d33 --- /dev/null +++ b/examples/noc/test/flappy_bird.reload.script @@ -0,0 +1,33 @@ +# Live reload keeps State: a round being played back, paused, the edited +# build ({v2}: green pipes), the same bird and pipes after it, then play on. +frames 10 +console record 0 +frames 15 +key space +frames 15 +key space +frames 15 +key space +frames 15 +key space +frames 15 +console stop +console play 0 +frames 50 +console pause +frames 2 +expect bird.y 218.916 ~0.001 +expect pipes.buffer[0].x 520 ~0.001 +screenshot .zig-cache/e2e/flappy_bird-before.png +frames 1 +load {v2} +expect bird.y 218.916 ~0.001 +expect pipes.buffer[0].x 520 ~0.001 +frames 2 +screenshot .zig-cache/e2e/flappy_bird-after.png +frames 1 +expect-different-screenshot .zig-cache/e2e/flappy_bird-before.png .zig-cache/e2e/flappy_bird-after.png +# Unpaused: the replay goes on from where it was. +console pause +frames 20 +expect clock.count 80 -- cgit v1.3