Add or remove a game
Each game is a GameDefinition module in src/games/. The built-in games show the pattern.
- Create a module that exports a
GameDefinitionwith a uniqueid, at least one lesson, and an engine withcreateInitialState,update, andrender. - Add the module to
builtInGamesinsrc/games/index.ts. The first entry is the default. - 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.
- Run
bun run test:games,bun run lint, andbun 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