# Ludrel > An AI-first framework for 2D browser games written in TypeScript. A game is a folder of JSON documents (manifest, > scenes, levels, prefabs, synth audio) validated by JSON Schemas, plus optional code "behaviors". AI tools (MCP server > `apps/mcp`) can create games from templates, edit data with validation, run games headless with assertions and > take screenshots. ## Guides - [AI guide](guides/ai-guide.md): Start here: how to make and change games with the tools. - [Top-down games](guides/top-down.md): Worlds of chunk levels, NPC brains (state machines, behaviour trees), dialogue, quests, items, languages. - [Arcade games and phones](guides/arcade-and-mobile.md): Waves, movers, shooters, score and best scores; touch controls as data; the expand scale mode. - [3D games](guides/3d.md): display.mode 3d, level3d documents (pieces, objects), 3D components, character controller, models. - [Leaderboards and achievements](guides/leaderboards.md): Declaring boards and achievements, submitScore/unlockAchievement, replay checks, profiles. - [Content packs](guides/content-packs.md): Packs for games that allow them: files, ids (:), review, forks and remixes. - [Getting started](getting-started.md): Install, commands, how a game is put together, rules, bindings. - [Platformer template](../templates/platformer/README.md): The starting point for new games. - [Sprout sample](../games/sprout/README.md): A complete two-level game made almost entirely of data. ## Reference - [Components](reference/components.md): every data component, fields and defaults. - [Documents and actions](reference/documents.md): document fields and every rule/menu action. - [JSON Schemas](../packages/schema/json/): machine-readable schemas for each document kind. - [API](api/): generated TypeScript API reference (`pnpm docs:api`). ## Recipes - [Write a code behavior](../recipes/behavior.md): When data is not enough, write a behavior: a system factory exported from `src/behaviors.ts`. Every exported - [Add a new collectible](../recipes/collectible.md): Gems worth counting separately from coins: a prefab with `Pickup`, a rule that counts it, and a HUD counter. - [Add enemies](../recipes/enemies.md): Enemies are prefabs with `ContactDamage` plus a movement component. - [Make a new level](../recipes/level.md): Levels are built from text rows with `build_level`; the characters come from `game/levels/legend.json`. In the - [A 3D level: ground, a ramp, a moving platform, gems and a goal](../recipes/level3d.md): Needs a game with `"display": { "mode": "3d" }`. The level goes in `game/levels3d/`, and a scene points at it with - [Menus and HUD](../recipes/menus-and-hud.md): A scene `menu` is a vertical list navigated with `uiUp`/`uiDown`/`uiConfirm` (keyboard, gamepad) or the mouse - [A talking NPC with a quest (top-down)](../recipes/npc-quest.md): Needs a game with an `interact` input action and the `topDownController` behavior (the top-down template has both). - [Add a power-up (double jump)](../recipes/power-up.md): A pickup whose rule changes the player's controller. No code needed. - [Add sounds and music](../recipes/sounds.md): Sounds and songs are synth data in `game/audio/` (asset type `synth`), rendered when the game loads. - [Waves of enemies (arcade)](../recipes/waves.md): Enemies that sway down the screen, worth points, removed when shot down or when they leave the view. They hurt the ## Optional - [Everything in one file](llms-full.txt): guides, recipes, references and an API summary.