Web level editor
A zero-install editor for picogame scenes/levels, right here in the page: import real
sprite/tileset PNGs, paint a tilemap (with per-tile solid/coin/goal/hazard flags), place sprites,
HUD labels, zones and spawn points, and export the scene.json that tools/scene_build.py bakes for
the device/simulator. Its whole point: stop shipping coloured rectangles — apply real sprites.
Export ▾
Click Sample (top bar) to load a complete one-screen level so you can see how every feature is
meant to be used. The editor is narrow here — hit ⛶ Fullscreen for the full three-pane layout
(Esc exits). It also lives standalone at /editor/.
The UI is contextual
Section titled “The UI is contextual”The right-hand panel changes with the active tool, so you only see the controls that tool needs:
- Select — click an object to edit it (drag to move). With nothing selected the panel shows Level settings (name, background, camera follow) and a clickable Objects list.
- Paint — choose a tileset, manage tilemap layers (bg / fg), pick a tile (tile 0 = erase), edit colours (for a colour tileset), and toggle per-tile flags. Drag on the map to paint.
- Place — pick a sprite and click the map to drop instances; manage that sprite’s
animations. Name one
player, or tag severalfoes, with the Select tool. - HUD / Zone / Point — drop a camera-fixed label / a trigger rectangle / a named point.
The status line under the canvas always shows the current tool + selection.
Tile flags
Section titled “Tile flags”A flag gives a tile a meaning the game reads — it does not change how the tile looks. The loader builds fast lookup tables so the game asks the meaning instead of hardcoding tile numbers:
| flag | the game reads it as | typical use |
|---|---|---|
| solid | view.is_solid(tx, ty) | walls / floor that block movement |
| coin | view.tile_has(tx, ty, "coin") | collectible the game removes on pickup |
| goal | view.tile_has(tx, ty, "goal") | level exit / win tile |
| hazard | view.tile_has(tx, ty, "hazard") | lava / spikes that hurt the player |
The game decides what each does; the editor only marks tiles. Toggle “Show flag badges on map” (Paint panel) to see coloured corner badges on flagged tiles.
Colour tilesets (Paint → + Colour tileset) make a 3-colour set for quick placeholders without art — edit each colour with a picker, + add colour for more, × to remove one.
Bake & run on device / simulator
Section titled “Bake & run on device / simulator”Keep the imported/exported PNGs next to the downloaded scene.json, then:
python3 tools/scene_build.py my.scene.json # -> my_scene.py (SCENE = {...})PGSCENE=my_scene python3 sim/run.py examples/scene_play.py # preview in the simulatortools/build_mpy.sh # optional: my_scene.mpy for the deviceLoad it in a game with picogame_scene.load(pg, my_scene.SCENE, font=...). See
examples/picogame_platformer_scene.py for a real data-driven game built on a baked scene.