playproof

v0.3.2
io.github.EmirhanOzl/playproof Checked 2 days ago Published 1 month ago

See 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.

ParameterTypeDescription
areastringCSS selector of the game area (default: the largest canvas)
comparestringOutput folder of an earlier frames run to compare with
devicestringDevice to emulate: "iPhone 15", "Pixel 8", "desktop" (default) or "390x844@3 mobile"
durationstringHow long to film, e.g. 800ms or 1.5s (default 1s)
fpsnumberTiles per second on the sheet (default: fit about 24 tiles)
readystringJavaScript expression that is true once the game has loaded
scenariostringName of a scenario in playproof.config.json: supplies steps, duration, zoom and device
stepsstringSteps 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 (…
targetstringURL (e.g. http://localhost:5173), folder (./dist) or HTML file of the game. Optional when playproof.config.json sets it.
waitForstringCSS selector to wait for before starting
zoomstringCrop 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.

ParameterTypeDescription
areastringCSS selector of the game area (default: the largest canvas)
devicestringDevice to emulate: "iPhone 15", "Pixel 8", "desktop" (default) or "390x844@3 mobile"
readystringJavaScript expression that is true once the game has loaded
scenariostringName of a scenario in playproof.config.json: supplies steps, duration, zoom and device
stepsstringRequired 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>|…
targetstringURL (e.g. http://localhost:5173), folder (./dist) or HTML file of the game. Optional when playproof.config.json sets it.
waitForstringCSS 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).

ParameterTypeDescription
onlyarrayScenario names and/or monkey, devices, perf
updatebooleanAccept 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.

ParameterTypeDescription
actionsnumberNumber of random actions (default 300)
areastringCSS selector of the game area (default: the largest canvas)
devicestringDevice to emulate: "iPhone 15", "Pixel 8", "desktop" (default) or "390x844@3 mobile"
readystringJavaScript expression that is true once the game has loaded
scenariostringName of a scenario in playproof.config.json: supplies steps, duration, zoom and device
seednumberRandom seed (default 1); the same seed replays the same actions
targetstringURL (e.g. http://localhost:5173), folder (./dist) or HTML file of the game. Optional when playproof.config.json sets it.
waitForstringCSS 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.

ParameterTypeDescription
areastringCSS selector of the game area (default: the largest canvas)
devicestringDevice to emulate: "iPhone 15", "Pixel 8", "desktop" (default) or "390x844@3 mobile"
devicesarrayDevice names (default: a matrix of nine)
readystringJavaScript expression that is true once the game has loaded
scenariostringName of a scenario in playproof.config.json: supplies steps, duration, zoom and device
stepsstringRun 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…
targetstringURL (e.g. http://localhost:5173), folder (./dist) or HTML file of the game. Optional when playproof.config.json sets it.
waitForstringCSS 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.

ParameterTypeDescription
androidbooleanMeasure on a USB-connected Android phone
areastringCSS selector of the game area (default: the largest canvas)
cpunumberCPU slowdown factor for local runs (default 4, 1 = off)
devicestringDevice to emulate: "iPhone 15", "Pixel 8", "desktop" (default) or "390x844@3 mobile"
durationstringHow long to measure (default 10s)
monkeybooleanTap randomly while measuring
readystringJavaScript expression that is true once the game has loaded
scenariostringName of a scenario in playproof.config.json: supplies steps, duration, zoom and device
stepsstringSteps 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 (…
targetstringURL (e.g. http://localhost:5173), folder (./dist) or HTML file of the game. Optional when playproof.config.json sets it.
waitForstringCSS selector to wait for before starting