Skip to content

Desktop simulator

The web Playground lets you try picogame in a browser. The desktop simulator runs the same game-facing API on your PC and is better suited to local files, converted PNG assets, headless screenshots, and scripted command-line runs.

It ships inside the repo (sim/). Clone picogame and you have everything: the simulator, the games, and the picogame_* helpers.

Terminal window
git clone https://github.com/MakerClassCZ/picogame
cd picogame

Headless mode (render frames, save a screenshot, no window) works out of the box. For a live, interactive window, install pygame:

Terminal window
pip install pygame

Play it in a window (the default when pygame is installed; it prints the controls on start):

Terminal window
python3 sim/run.py demos/picogame_flappy.py

Render a few frames headlessly and save a screenshot (handy for docs, tests, and CI):

Terminal window
python3 sim/run.py demos/picogame_flappy.py --frames 80 --shot shot.png
FlagWhat it does
--backend pygame / pilforce a live window / headless. Default: a window if pygame is installed, else headless (a --shot or --profile run stays headless).
--frames Nrun N frames, then stop (default 150)
--shot FILEsave a PNG of the final frame
--shot-at Nsave that PNG at frame N instead of at the end
--hold RIGHT,Ahold these buttons for the whole run, so you can drive it with no keyboard
--profileprint per-phase timing

In the live window: arrows or WASD move; F (or Ctrl) = A, G (or Space) = B, R/Q = X, T/E = Y.

Both expose the same game-facing API, so the same game code runs in either. Under the hood they differ (the browser runs the native C engine compiled to WASM; the desktop simulator is a Python reference implementation), so timing, RAM behaviour, audio and panel effects are approximations - verify those on the device.

Web PlaygroundDesktop simulator
Setupnone, runs in the browserclone the repo (plus pygame for a window)
Best fortrying an idea, sharing a link, first stepsasset files, headless screenshots, CLI automation, local iteration
Assetscode-generated shapesyour own PNGs and converted art

Once a game runs well, copy it to the board and test its timing, controls, audio, and memory use. See Run on hardware.