Spielerando

Phaser AI Game: Stop Your AI Using Old Phaser Code

To make a Phaser game with AI, create the project with Phaser's own starter, then point your AI at the skill files that come with Phaser. Those files matter because an AI often remembers an older Phaser, and old code can fail in the current version.

What is Phaser, and why does it suit AI?

Phaser's GitHub page, read on 2 November 2026, calls it "a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers". It has an MIT licence, and the version shown was 4.2.1. A framework is a set of ready-made parts for a job, in this case drawing, sound, input and scenes.

It suits AI work for three reasons. Games run in a browser, so a coding tool can start them easily. A Phaser project is plain files, with no large editor around them. And the project itself names Claude Code, Cursor, Codex, Antigravity and GitHub Copilot as tools that can build Phaser games from plain descriptions.

The problem you need to know about

Phaser 4 is a major step from Phaser 3, and much of what an AI has read over the years is Phaser 3. So you may get code written for the wrong version. You see a blank page or an error about a missing function, and the AI says everything is fine.

Phaser has an answer: its repository includes AI agent skills, files that describe its main parts, in a folder called skills/. One of them covers moving from version 3 to version 4. If your tool reads such files, it no longer has to rely on memory.

Getting started

  1. Create the project. Ask your AI to run the line below, or run it yourself. You need Node.js, and the starter offers a choice of official templates.
npm create @phaserjs/game@latest
  1. Bring in the skills. Ask your AI to copy the skills/ folder from Phaser's GitHub page into your project.
  2. Tell it to use them, with the text below.

Spielerando can sit alongside this. Where Phaser's skills explain the framework, its blueprints, ready-made code and wiki cover how a mechanic should behave, and they reach your AI through an MCP connection. Signing up is free with Google or e-mail, and the service does not look at your game or code (how to connect).

Worked example: Kite Festival

Kite Festival is an invented side-scroller: you fly a kite towards a far tower while gusts push it back. In Phaser, a game is split into scenes, and that makes a nice first plan: title, flight, score.

Scenes are also where AI code tends to break, and you will not see it the first time. You win, go back, press play, and now the wind blows twice as hard or the kite is stuck, because the first run left something behind. Phaser's scenes map neatly onto a diagram, so have your AI draw them first. It uses Mermaid, a text format you can view at mermaid.live. Pay attention to the arrow leading back to the start.

Want to make the kite feel good? Good floating has the same parts as variable jump height.

Paste this to your AI

This is a Phaser project. First read package.json and tell me the exact Phaser version it uses. Then read the skill files in the skills folder that fit this job and tell me which ones you read. If you cannot find them, say so and do not quietly fall back on memory.

Job: Kite Festival, a side-scrolling game with three scenes: title, flight and score. The kite rises while I hold the mouse button and sinks when I let go. Gusts push it back. Reaching the far tower wins the round.

Before any code, write a Mermaid diagram of the scenes and every way between them, including playing again from the score scene. Check that a second run starts as clean as the first, with nothing left over. Then build from the diagram.

For each Phaser feature you use, name the skill file that describes it. If none does, mark it "from memory".

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP

How to check it worked

  • Open package.json. The version should match what the AI told you.
  • Play twice in a row. Win, go back to the title and play again. The second run should feel exactly like the first.
  • Count the "from memory" marks. Each one is a place to look at if something breaks.
  • Hold the button, then let go, at both ends of the screen. The kite should stay in view or fail the way the diagram says.

Sources

Last updated: 2026-11-02