The Playable Demo Assembly
Last reviewed
IntermediateWhat you'll learn
~60 min- Use the AI CLI to stitch together combat, movement, VFX, HUD, and dialogue into one cohesive demo
- Build a complete 2-minute playable level with briefing, traversal, combat, boss, and victory
- Create a title screen with the game's working name and a polished scene flow
- Produce a shippable artifact that demonstrates the full prototype concept
What you’re building
This is the lesson where everything comes together.
You have spent the prototyping lessons building individual systems. A combat loop with melee timing and dodge windows. A movement and camera system with jump curves and acceleration. Enemy behaviors with state machines and telegraphs. Visual effects with particles, screen shake, and hit flash. A HUD with blood health, rage, and inventory. A dialogue system with branching choices and objectives. A level editor. A test harness. Each one works. None of them talk to each other.
That changes now. The AI CLI is going to take the best parts of each prototype and stitch them into a single, cohesive, playable 2-minute demo. One project. One game. Title screen, mission briefing, traversal, combat encounters, a boss fight, and a victory screen.
This is THE artifact. The thing you show an investor, a publisher, a Kickstarter audience, or yourself in the mirror when you wonder if you can actually do this. It is not a finished game. It is proof that the game can exist — and that you built it.
Multiple independent modules wired into a unified application with a linear flow (title, briefing, gameplay, victory). This is the same pattern as assembling microservices into a product, combining UI components into a full page, or stitching API endpoints into a working application. Integration is where prototypes become products.
The showcase
Here is the complete demo experience, from launch to credits:
- Title screen: Dark background, game title “CRIMSON LEGACY” (or your chosen working name) in large stylized text, “A BloodRayne-Inspired Prototype” subtitle, “PRESS ENTER TO START” prompt. Lora Studios credit at the bottom.
- Mission briefing: Dialogue scene. Commander Wulf briefs Rayne on the mission. One branching choice (stealth vs. assault approach) that sets the first objective.
- Level traversal: The player navigates a horizontally scrolling level designed in the editor format — ground platforms, walls, gaps to jump, one hazard pit. Enemies patrol the path. The HUD is live: blood health, rage meter, weapon indicator.
- Combat encounters: 3-4 groups of enemies placed along the level. Basic enemies in the first group, a mix of basic and fast in the second, a heavy enemy guarding a door in the third. Combat uses the player controls from the HUD and Inventory Builder (WASD, melee, dodge, feed, rage mode, weapon swap) and the enemy roster from the Enemy Behavior Sandbox. Effects from the Sound and VFX Lab trigger on hits.
- Pickup items: Health potions and ammo boxes scattered through the level. Collecting them updates the inventory. The player can open inventory (I key) and use items.
- Boss encounter: End of the level. A larger, harder enemy with more health, a unique attack pattern (charge + slam), and a visible health bar above their head. Defeating the boss triggers the objective “Eliminate the target.”
- Victory screen: Dark background, “MISSION COMPLETE” in large text, stats summary (time, enemies defeated, health remaining, items used), and “Thank you for playing the prototype” message. “PRESS ENTER TO RETURN TO TITLE” prompt.
Total play time: approximately 2 minutes for an experienced player, 3-4 minutes for a first-timer. That is the sweet spot for a prototype demo.
Plan this build in plan mode, as every build in this module runs. The plan will be long, so before you approve it, send:
Split this plan into chunks I can check one at a time. Build the first chunk,run it, and stop so I can look before you start the next one.That is the rule of one from Breaking Down Tasks (one feature per step, the next only after the last one works), applied to a multi-scene build. When the build works, keep the facts later messages repeat in a one-screen brief the tool reads at the start of every session:
Write AGENTS.md, one screen long, recording how to start the dev server, the#09090b dark background, the five scenes in play order, which data files holdthe level, dialogue, and objectives, and how browser saves work.Codex, Antigravity and Copilot read AGENTS.md on their own. Claude Code reads it directly when the project has no CLAUDE.md (v2.1.277 and later); if it has one, add the line @AGENTS.md to it so it loads too. Before each commit, run the tool’s built-in review on what changed: /code-review in Claude Code, /review in Codex and Copilot, or /diff in Antigravity followed by a request to review that diff.
Before you start
If your AI tool is open from the previous lesson, leave it (/exit, or Ctrl+D in Antigravity) so you are back at your terminal prompt. Create a folder for the playable demo and step into it:
mkdir -p ~/retro-remake/19-playable-demo-assembly && cd ~/retro-remake/19-playable-demo-assemblyIn Windows PowerShell, run mkdir ~/retro-remake/19-playable-demo-assembly; cd ~/retro-remake/19-playable-demo-assembly. In a desktop agent app, open ~/retro-remake/19-playable-demo-assembly as your workspace folder. Then start your AI tool the way Workbench Setup showed.
Switch to plan mode
Switch into Plan mode (Shift+Tab, /plan, or the mode picker) so your agent lays out the five scenes, shared state, level JSON loader, and boss arena before writing files.
The conversation
Each message below is an example. Say it in your own words.
Say what you want
Ask for a complete 2-minute playable browser demo combining briefing dialogue, scrolling level traversal, combat, HUD, inventory, a boss fight, and a victory screen:
Build a 2-minute playable browser demo called CRIMSON LEGACY that combines a title screen, mission briefing, a scrolling level, HUD, inventory, boss fight, and victory screen. Ask me what you need first.Answer its questions
Your agent will ask about the scene sequence, player moveset, level layout and enemy encounters, boss fight, and HUD/VFX integration:
| If it asks | You might say |
|---|---|
| What is the scene flow from launch to finish? | Five stages in order: Title screen, Commander briefing (stealth vs assault choice), main scrolling level, Boss arena, and Victory summary. |
| What controls and abilities should the player have? | WASD + jump with coyote time, Shift dodge, melee and ranged attacks, F feed, R rage, Q swap, I inventory. |
| How should the main scrolling level be structured? | An 80x19 tile scrolling level with platforms, a hazard pit, basic/fast/heavy enemy groups, pickups, and 2 checkpoints. |
| How should the boss encounter at the end work? | Reaching the end of the level locks into a 300 HP Facility Commander boss alternating telegraphed charges and shockwave slams. |
| Which HUD, VFX, and save features should carry over? | Fixed HUD (blood health, rage, ammo, progress bar), 4x4 inventory, hit flash/shake/particles, and auto-saved checkpoints. |
Read the plan
Before approving the build, check the agent’s plan for these three core integration points:
- Five-scene linear flow (
src/scenes/*.js, Phaser 3 with Vite):TitleScene:"CRIMSON LEGACY"with red glow, falling blood-mote particles, and"PRESS ENTER TO START".BriefingScene: loads/data/briefing.jsonfrompublic/data/, plays Commander Wulf’s typewriter briefing with a stealth-vs-assault choice, sets the initial objective insrc/state.js, and auto-saves.GameScene: loads/data/level1.json(80x19 tiles = 2560x608px, Level Editor Lite format), spawns 4 basic grunts in the first third, 2 basic + 2 fast in the middle, and 1 heavy enemy near the end, plus 4 pickups and checkpoints at tiles 25 and 55.BossScene: triggered at tile 75 (x = 2400), locks the camera to a 400x608 arena against a 300 HP boss cycling telegraphed charge (25 dmg) and jump slam (100px shockwave, 30 dmg), restarting at the boss if the player dies.VictoryScene: displays"MISSION COMPLETE", play time, enemies defeated, health remaining, items used, and chosen approach (StealthorAssault).
- Parallel HUD and 4x4 Inventory (
src/systems/HUD.js,Inventory.js):HUDruns as a parallel scene readingsrc/state.js(pulsing blood bar below 30%, rage meter, blade/gun ammo, horizontal level-progress minimap, notifications), andItoggles the 4x4 inventory outside briefing/boss scenes. - Full player combat and VFX (
src/systems/Player.js,VFX.js): melee (Jor left click), ranged (Kor right click),Shiftdodge with 0.3s i-frames and purple afterimage,Ffeed (+20 HP, +10 rage),Rrage mode (2x damage for 5s), white hit flash, camera shake, and particle bursts.
If the plan builds the level as a tiny single-screen room instead of a scrolling 80x19 JSON level with checkpoints and a boss trigger, steer it before approving:
Make the main level an 80x19 scrolling stage with checkpoints at tiles 25 and 55 and a trigger near the right edge that launches the boss arena.Once the plan looks solid, ask the agent to split it into chunks (as shown in the callout above) or approve it to build. After playing from the title screen through the boss to the victory screen, ask your agent to save a Git checkpoint.
You do not need to copy files from earlier lesson folders. Describing how the five scenes, shared state, and JSON files wire together gives your agent a clean integration blueprint in one project.
What you get
After generation, the project folder structure looks like this:
REFERENCE PROJECT LAYOUT 19-playable-demo-assembly/ generated Phaser demo folder tree open reference hide reference Reference example of the folder layout your agent creates for the 5-scene playable demo. Open to inspect how scenes, systems, and data files are organized.
19-playable-demo-assembly/ package.json index.html src/ main.js scenes/ TitleScene.js BriefingScene.js GameScene.js BossScene.js VictoryScene.js systems/ Player.js Enemy.js Boss.js Combat.js HUD.js Inventory.js Dialogue.js VFX.js SaveManager.js state.js public/ data/ briefing.json level1.json objectives.jsonFire it up
Ask your agent to install what is needed, start the local server, and open the demo:
Install the packages, start the local server, and open the playable demo in my browser.Or run it from a terminal:
cd ~/retro-remake/19-playable-demo-assemblynpm installnpm run devOpen the URL. You should see the title screen: “CRIMSON LEGACY” with red glow, floating blood-mote particles, and the pulsing “PRESS ENTER TO START” prompt.
Press Enter. Commander Wulf’s briefing plays with typewriter text. Make your choice. The game starts. You are on the left side of a scrolling level with a full HUD. Walk right. Fight enemies. Dodge attacks. Feed for health. Collect items. Reach the boss. Defeat the boss. Watch the victory screen with your stats.
That is a playable game prototype. Built from prompts.
If something is off
| Problem | Follow-up prompt |
|---|---|
| Scene transitions crash | Finishing the briefing crashes instead of launching the main level. Make sure all five scenes are registered in the game setup with matching scene names so transitions from title to briefing, level, boss, and victory work smoothly. |
| Level does not scroll | The main level is 80 tiles wide, but the camera stays stuck on the first screen when I walk right. Set the world and camera bounds to the full 2560x608 level and make the camera follow the player. |
| HUD scene does not appear over gameplay | The health bar, rage meter, and progress bar do not show up during the main level or boss fight. Launch the HUD overlay alongside gameplay and keep it pinned to the screen corners as the camera scrolls. |
| Boss fight has no transition | Walking to the far right end of the scrolling level does nothing. Place an exit trigger near tile 75 that detects when the player reaches the end of the corridor and transitions into the boss arena. |
| VFX are missing | Combat works, but attacks and kills have no blood particles, white hit flashes, or screen shake. Connect the visual effects system to every player and enemy hit, dodge, and death in both the level and boss fight. |
Deep dive
The integration work is the real lesson here. Individual systems are straightforward. Wiring them together is where complexity lives.
Scene flow as a state machine. The demo has five scenes in a linear flow: Title, Briefing, Game, Boss, Victory. Each scene knows its exit condition and which scene comes next. This is a finite state machine — the simplest and most reliable way to manage application flow. Games, wizards, checkout flows, and onboarding sequences all use this pattern.
Shared state bridges scenes. The state.js object persists across scene transitions. When the briefing sets an objective, the HUD scene reads it. When the player collects an item in GameScene, the inventory in the HUD reflects it. When the boss fight ends, VictoryScene reads the final stats. One object, read by many consumers, written by the active scene.
The level JSON drives gameplay. The level layout comes from a JSON file in the exact format your Level Editor Lite exports. GameScene reads it, creates physics bodies for each tile type, and spawns enemies at marked positions. If you redesign the level in the editor, export new JSON, and drop it in public/data/, the demo plays the new level with zero code changes.
The boss fight is a separate scene. This is a deliberate design choice. The boss arena has a locked camera, unique mechanics, and its own difficulty tuning. Making it a separate scene means you can restart it independently (player dies in boss fight, restart boss fight, not the whole level) and test it in isolation.
🔍Why 2 minutes is the right demo lengthclick to expand
Two minutes is a deliberate choice. It is long enough to:
- Show the complete gameplay loop (move, fight, heal, use items, face a boss)
- Fit inside a pitch meeting or a trailer
- Cut into a Kickstarter demo video
- Playtest in under 5 minutes including restarts
Longer demos dilute the experience. Shorter demos cannot show enough variety. The goal is not “show everything you built.” The goal is “prove the game works and is fun in the minimum viable time.” Two minutes does that.
Customize it
Add a second level
Add a second level as a 19x40 vertical climbing tower with zigzag platforms, side hazards, enemies, and a top exit, and transition from level 1's exit into level 2 with vertical camera follow.Add a death screen with retry
When the player dies, show a 1.5-second YOU DIED overlay with buttons to Retry from Checkpoint or Restart Level, and track the total death count for the victory summary screen.Add background music cues
Add synthesized background audio loops that play an ambient synth bed during level traversal, switch to an intense pulse in the boss arena, play a victory arpeggio on win, and duck to 30% during dialogue.Try it yourself
- Walk through the plan-mode conversation above and let your agent build the project.
- Ask your agent to start the demo (or run
npm install && npm run dev) and play through the entire experience from title to victory. - Pay attention to the transitions between scenes. Are they smooth? Does the dialogue flow into gameplay naturally?
- Die on purpose at the boss fight. Does the retry work? Is the experience fair?
- Play through a second time and make the other briefing choice. Does the objective tracker reflect the different path?
- Screenshot or screen-record a full playthrough. This is your prototype demo reel. It is the artifact you show people.
- If you built levels in Level Editor Lite, swap out
level1.jsonwith one of your exported levels. The game should play the new layout without any code changes.
Key takeaways
- Integration is the hardest step. Individual systems are easy. Wiring five systems into one cohesive experience is where complexity and bugs live. The AI CLI handles the wiring; you handle the vision.
- Scene flow creates narrative structure. Title, briefing, gameplay, boss, victory. That arc turns a collection of mechanics into an experience with a beginning, middle, and end.
- Shared state is the glue. One state object connects scenes that never directly reference each other. The briefing sets objectives, the HUD reads them, the victory screen summarizes them.
- JSON-driven levels mean the content is separate from the code. Redesign the level, export new JSON, drop it in. Zero code changes. That separation is what makes iteration fast.
- This is a shippable artifact. Not a finished game — a proof of concept that demonstrates the full loop. It is what you show an investor, a publisher, a crowdfunding audience, or yourself.
Stop and appreciate what just happened. You described systems in plain English. An AI built them. You described how they connect. The AI wired them together. The result is a playable game prototype that demonstrates combat, movement, a HUD, dialogue, inventory, a boss fight, and a victory screen. In the workbench you had a little program that sized an old game’s screen. Now you have a demo. That trajectory is the entire argument for AI CLI tools.
What’s next
You have the prototype. Now you need to decide what to do with it. In the final lesson you will build Lora’s Command Center — a unified dashboard that brings together everything from this entire module: your IP research, market analysis, financial runway, prototype status, and a crowdfunding kit. It includes a go/no-go decision tool that integrates all the data into a recommendation. The Command Center is where the research, the money, and the game converge into a single actionable view.