Skip to the content.

Add or remove a game

Each game is a GameDefinition module in src/games/. The built-in games show the pattern.

  1. Create a module that exports a GameDefinition with a unique id, at least one lesson, and an engine with createInitialState, update, and render.
  2. Add the module to builtInGames in src/games/index.ts. The first entry is the default.
  3. Include lesson starter code, worked examples, hints, and checks for JavaScript, Python, and Java. Add optional snippets, manual cards, touch controls, and achievements as needed.
  4. Run bun run test:games, bun run lint, and bun run build.

The home screen, game switcher, lesson route, manual, snippets, and touch controls read from the registry. The live site’s discovery pages and sitemap are also generated from it.

To remove a game, remove its import and entry from builtInGames. Keep at least one game. Review saved user progress separately if you persist workspace data.

Python and Java remain simulated preview modes. Adding real execution for either language requires a new runner.

Source overview · Wiki contributor guide · Live tutor · Documentation home

By