playproof
v0.3.2See and playtest browser games: frame-by-frame motion, crash hunting, phone layouts, frame pacing.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
frames Film an animation frame by frame
Runs the game on a virtual clock, optionally performs steps to trigger something, then films it frame by frame. Returns a contact sheet (tiles with frame number and time, dashed boxes around what moved, a bar per frame of how much changed) and an onion-skin image (the whole motion ghosted into one picture), plus flagged sudden jumps, one-frame flicker and stalls. Runs are deterministic: pass compare = the folder of an earlier run to see exactly what a code change did.
| Parameter | Type | Description |
|---|---|---|
area | string | CSS selector of the game area (default: the largest canvas) |
compare | string | Output folder of an earlier frames run to compare with |
device | string | Device to emulate: "iPhone 15", "Pixel 8", "desktop" (default) or "390x844@3 mobile" |
duration | string | How long to film, e.g. 800ms or 1.5s (default 1s) |
fps | number | Tiles per second on the sheet (default: fit about 24 tiles) |
ready | string | JavaScript expression that is true once the game has loaded |
scenario | string | Name of a scenario in playproof.config.json: supplies steps, duration, zoom and device |
steps | string | Steps separated by ";". Steps (separate with ";" or new lines, "#" starts a comment line): wait <time> let time pass (virtual time: instant and exact) tap <x,y>|@label tap/click inside the game area (… |
target | string | URL (e.g. http://localhost:5173), folder (./dist) or HTML file of the game. Optional when playproof.config.json sets it. |
waitFor | string | CSS selector to wait for before starting |
zoom | string | Crop to what moves ("auto") or to x,y,w,h in percent of the game area |
play Play a scripted sequence
Plays a script of taps, drags, keys and waits on the virtual clock and returns a storyboard of every "shot" and "film" step. Use "until <js> <time>" to wait for game states instead of guessing.
| Parameter | Type | Description |
|---|---|---|
area | string | CSS selector of the game area (default: the largest canvas) |
device | string | Device to emulate: "iPhone 15", "Pixel 8", "desktop" (default) or "390x844@3 mobile" |
ready | string | JavaScript expression that is true once the game has loaded |
scenario | string | Name of a scenario in playproof.config.json: supplies steps, duration, zoom and device |
steps | string | Required unless a scenario gives them. Steps separated by ";". Steps (separate with ";" or new lines, "#" starts a comment line): wait <time> let time pass (virtual time: instant and exact) tap <x,y>|… |
target | string | URL (e.g. http://localhost:5173), folder (./dist) or HTML file of the game. Optional when playproof.config.json sets it. |
waitFor | string | CSS selector to wait for before starting |
check Check every scenario against its baseline
Films every scenario in playproof.config.json and compares it with its committed baseline (a snapshot test for motion), then runs monkey and devices. Changed motion is an error with a compare image; update = true accepts the current motion as the new baseline (rewrites files: only when the change is intended).
| Parameter | Type | Description |
|---|---|---|
only | array | Scenario names and/or monkey, devices, perf |
update | boolean | Accept the current motion as the new baselines |
monkey Hunt for crashes with random play
Random taps, drags, keys and backgrounding, repeatable by seed. Reports uncaught errors, failed requests, hangs, soft-locks and a render loop that stops, each with a command that reproduces it.
| Parameter | Type | Description |
|---|---|---|
actions | number | Number of random actions (default 300) |
area | string | CSS selector of the game area (default: the largest canvas) |
device | string | Device to emulate: "iPhone 15", "Pixel 8", "desktop" (default) or "390x844@3 mobile" |
ready | string | JavaScript expression that is true once the game has loaded |
scenario | string | Name of a scenario in playproof.config.json: supplies steps, duration, zoom and device |
seed | number | Random seed (default 1); the same seed replays the same actions |
target | string | URL (e.g. http://localhost:5173), folder (./dist) or HTML file of the game. Optional when playproof.config.json sets it. |
waitFor | string | CSS selector to wait for before starting |
devices Check phones, tablet and desktop
Loads the game on nine screens and returns them side by side, with layout findings: blurry or stretched canvas, canvas cut off, page scrolling, missing viewport meta, missing touch-action, clipped text, small touch targets.
| Parameter | Type | Description |
|---|---|---|
area | string | CSS selector of the game area (default: the largest canvas) |
device | string | Device to emulate: "iPhone 15", "Pixel 8", "desktop" (default) or "390x844@3 mobile" |
devices | array | Device names (default: a matrix of nine) |
ready | string | JavaScript expression that is true once the game has loaded |
scenario | string | Name of a scenario in playproof.config.json: supplies steps, duration, zoom and device |
steps | string | Run on every device before the screenshot. Steps separated by ";". Steps (separate with ";" or new lines, "#" starts a comment line): wait <time> let time pass (virtual time: instant and exact) tap <x… |
target | string | URL (e.g. http://localhost:5173), folder (./dist) or HTML file of the game. Optional when playproof.config.json sets it. |
waitFor | string | CSS selector to wait for before starting |
perf Measure frame pacing
Measures real frame times (fps, p95/p99, dropped frames at the display's refresh rate, long tasks, heap growth) while the game idles, runs steps, or takes random taps. Locally the CPU is slowed 4x; android = true measures Chrome on a USB-connected Android phone.
| Parameter | Type | Description |
|---|---|---|
android | boolean | Measure on a USB-connected Android phone |
area | string | CSS selector of the game area (default: the largest canvas) |
cpu | number | CPU slowdown factor for local runs (default 4, 1 = off) |
device | string | Device to emulate: "iPhone 15", "Pixel 8", "desktop" (default) or "390x844@3 mobile" |
duration | string | How long to measure (default 10s) |
monkey | boolean | Tap randomly while measuring |
ready | string | JavaScript expression that is true once the game has loaded |
scenario | string | Name of a scenario in playproof.config.json: supplies steps, duration, zoom and device |
steps | string | Steps separated by ";". Steps (separate with ";" or new lines, "#" starts a comment line): wait <time> let time pass (virtual time: instant and exact) tap <x,y>|@label tap/click inside the game area (… |
target | string | URL (e.g. http://localhost:5173), folder (./dist) or HTML file of the game. Optional when playproof.config.json sets it. |
waitFor | string | CSS selector to wait for before starting |