Make a 256x256 pixel game with GameLib

Output one JavaScript file that defines const game = { init, step, draw }. The global GameLib is provided.

Rules

  • Use view: 'front' (top-down) or view: 'side' (side-scroller). iso and depth are in development; do not use them.

  • init returns JSON-compatible state. step(state, input, world, dt) returns the next state without mutating; it runs at 60Hz, dt = 1/60. draw(state, g, world) only renders.

  • Use world.time, world.tick and GameLib.random(seed, index). Never use wall-clock time or Math.random.

  • Write rules, levels, scoring, enemies and win/fail conditions yourself. GameLib has primitives only, no game templates.

  • Colors: ink / paper / mist / stone / shade only. Images: built-in assets only. Text: 8x8 font, Latin and kana; other glyphs render ?.

  • No persistence or network. world.caps.save/shared/room/ai are all false.

  • Do not call GameLib.run or include the engine. Max 3,000 bytes after gzip, 65,536 bytes of source.

Docs

Distribution