Pac-Man rebuild deck
HARD
All four ghost target functions are published in full, so the work is everywhere else — cornering tolerance, junction input buffering, per-level speed tables — and that is weeks of moving constants until the chase reads.
You will get the loop working. Then the real work starts.
The maze and the pellets are an hour. The reason this is only a KINDA is that everything good about Pac-Man is the four ghost algorithms and the scatter timer, and an agent will happily give you four identical chasers unless you specify each one. Paste the Dossier rules into the prompt and it gets very close.
- Difficulty
- HARD · 3 of 5
- First playable
- A weekend
- The original
- 2 team-years
- Released
- 1980 · Arcade
- Genre
- Arcade
Build an arcade maze-chase game in the Pac-Man mould. Canvas 2D, single HTML file, 60fps, tile-based. Requirements: - 28x31 tile maze, pellets and four power pellets. Player moves on a tile grid with input buffering: pressing a direction before reaching a junction queues the turn, and cornering is forgiving. This buffering is the whole feel of the game. - Four ghosts with genuinely different personalities, per the original design: - Blinky targets the player's tile directly, and speeds up as pellets are eaten. - Pinky targets four tiles ahead of the player's facing. - Inky targets a vector doubled from Blinky through two tiles ahead of the player. - Clyde targets the player when far away and his home corner when within eight tiles. - Global scatter/chase phase timer that flips all ghosts between their corner and their target, with the classic 7/20/7/20/5/20/5 second schedule. Ghosts reverse direction on every phase change. - Power pellet: ghosts turn blue and flee by targeting the tile furthest from the player, flashing white before it expires. Eating them scores 200/400/800/1600 in a chain. - Ghosts cannot turn back on themselves except on a phase flip, and cannot turn upward in the two documented dead-zone areas. - Sprite work drawn with Canvas paths, no assets. Chomping mouth animation, ghost wobble, eyes that look in the direction of travel. Definition of done: Blinky pressures me from behind while Pinky cuts me off in front. If both ghosts just chase, you have not built this game.
- The exact ghost AI, which is a documented but fiddly set of four different targeting rules
- Namco trademarks — the character, the name, the maze layout as trade dress
- The cabinet, which was always half the game
- The kill screen at level 256, unless you lovingly reimplement the integer overflow
One chase routine, four target functions
Four enemies, one movement routine, four one-line target functions — that is personality without a second AI to maintain or debug. It is the cheapest variety you will ever buy, and it stays legible, because the player can work out what each pursuer is aiming at.
ScopeA weekend— build just this, not the game
Build a chase-behaviour sandbox. Single self-contained HTML file, Canvas 2D, tile grid, no build step. - A 20x20 maze of walls and corridors, one player dot moving on the grid with the arrow keys, and four pursuer dots. - All four pursuers share exactly ONE movement routine, written once: at each junction, take the exit that minimises straight-line distance to a target tile, never reversing into the tile just left. The only difference between pursuers is a target function — a pure function of (player tile, player facing, all pursuer tiles) returning a tile. - Ship four of them: the player's own tile; four tiles ahead of the player's facing; a tile found by doubling the vector from a second pursuer through two tiles ahead of the player; and one that targets the player beyond a distance threshold and a fixed corner within it. - Draw each pursuer's current target tile as a coloured cross, and let me reassign any pursuer's target function from a dropdown while it runs. Definition of done: setting all four to the same function makes them clump into a single queue, and the four different ones pinch me at a junction I did not see coming.
Not a clone — Pac-Man re-themed and cut down to something you can finish. The angle is the important reel: it is what turns a project into a weekend. 24,360 ways to land.
Service Endless
Pac-Man, but an endless survival mode instead of levels, set in a small restaurant service. Rendered in neon synthwave.
Build a browser game called "Service Endless". The pitch in one line: a arcade in the spirit of Pac-Man, but an endless survival mode instead of levels, set in a small restaurant service. WHAT THIS IS Take the SHAPE of Pac-Man — its core loop, and whatever makes that loop good — and rebuild it as your own game in a different world at a smaller scope. Use your own names, art and audio, which you want anyway: a reskin of somebody else's game is less interesting than a new one that works the same way. THE ANGLE — this is the important constraint, honour it above everything else An endless survival mode instead of levels. One arena, escalating waves on a data-driven timeline, a run timer and a score. Replaces level design with a difficulty curve. This is what makes the project finishable. If a decision would push the scope back towards the original's, take the smaller option every time. THE THEME A small restaurant service. Tickets, tickets, tickets — kitchen timing, table turns and a Friday night that can break you. The theme is not a coat of paint. Let it change what the mechanics mean — a reload, a health pack and a locked door should all be things that make sense in this world and nowhere else. LOOK Neon synthwave. Magenta-cyan split lighting, grid horizons, sun stripes, and chrome reflections on every hard surface. REQUIREMENTS - Runs in a browser with no build step. Canvas 2D unless the angle genuinely requires 3D, in which case three.js. - Fixed-timestep update loop with interpolated rendering, so it behaves the same at 60Hz and 144Hz. - Every tuning constant in one CONFIG object at the top, exposed as live sliders in a debug panel. You will find the feel by dragging those, not by prompting. - All content — levels, entities, balance numbers — in JSON or plain data files, never inline in the logic. - Audio generated with the Web Audio API rather than asset files. - Respect prefers-reduced-motion: keep the fades, drop the shake and the parallax. BUILD ORDER 1. The core loop with placeholder rectangles, at the reduced scope the angle demands. No theme, no art, no audio. Make it fun as rectangles first. 2. The angle's consequences. Cutting to bots, or to turn-based, or to one level changes the design rather than just shrinking it — find out how and rewrite step 1. 3. The theme, as content and data. 4. The look, applied last as a rendering layer over a game that already works. Start by writing a one-page plan: the core loop, what the angle removes and what that frees you to do properly, and what you are deliberately leaving out. Wait for me to approve it before writing code.
- The Pac-Man Dossier — the definitive AI and timing breakdown
- leereilly/games — open-source HTML5 game index
Half the time one of these already does what you wanted, and the other half it saves you a week of solving a problem someone documented in 1997.
One count per game. No account — it is tied to a salted hash of your IP, which is not stored in a form anyone can reverse. Every build adds 2 team-years to the counter on the homepage.
Then try these
Questions
How hard is Pac-Man to rebuild with an AI agent?
Yes — every game is buildable at some scope. The question is how hard, and Pac-Man is HARD (3 of 5). You will get the loop working. Then the real work starts. All four ghost target functions are published in full, so the work is everywhere else — cornering tolerance, junction input buffering, per-level speed tables — and that is weeks of moving constants until the chase reads. Reckon on a weekend to something you can actually play — not to something that matches the 2 team-years Namco spent.
What makes Pac-Man hard to rebuild?
All four ghost target functions are published in full, so the work is everywhere else — cornering tolerance, junction input buffering, per-level speed tables — and that is weeks of moving constants until the chase reads. That is why it sits at HARD rather than a tier either side of it. If you want the idea without the project, the transferable part is one chase routine, four target functions — a weekend of work.
How long does it take to build a Pac-Man clone?
Wrong question, and it is worth saying why. Nobody rebuilds Pac-Man — the original took Namco on the order of 2 team-years, released in 1980 on Arcade. What you can do is reach something playable and genuinely yours in about a weekend, and then keep going for as long as it stays interesting. Any figure that claims otherwise is measuring a prototype and calling it a game.
What do I lose by building my own Pac-Man?
The exact ghost AI, which is a documented but fiddly set of four different targeting rules. Namco trademarks — the character, the name, the maze layout as trade dress. The cabinet, which was always half the game. Those are the parts a prompt will not hand you.
Which AI coding agent should I use to build it?
Any of Claude Code, Codex or Cursor will handle this prompt. Paste it as your first message, let the agent scaffold the project, then iterate on feel — the second, third and tenth prompts are where a game actually gets good. Work in an empty folder or a fresh git branch so you can throw it away cheaply.
One email when new games go on the list. No other reason to email you, ever.