Skip to content

Make a Snake Game With AI: Prompt, Feel and Cost

Make a Snake Game With AI: Prompt, Feel and Cost

Snake is the most predictable game to build from a description. Name the grid, the controls, the food and what happens when you hit a wall, and Zugo writes a playable browser version in about a minute. A build costs 6 credits, and each edit after that costs 3.

Nobody needs the rules explained, which is exactly why the genre is a good first build. The rules are settled, so the whole job is feel: how fast the snake steps, whether a mistimed key press is your fault or the game's, and what happens in the two seconds after you lose.

What exactly comes back from one prompt?

The classic: a grid, a snake made of segments, food in a random cell, a tail that grows with every bite, and a game over when the head meets a wall or its own body. Score is either length or food eaten.

The detail that shapes everything else is that snake moves in steps, not in smooth pixels. Speed is the interval between steps, so useful edits sound like "step slightly less often" rather than "make it slower". Ask for smoothness and you get an animation between two grid cells, which looks better and changes nothing about the timing.

All of that arrives in the first build. Zugo boots the result in a sandbox before handing it over, so a version that fails to load is reported as a failed build instead of arriving as a blank canvas. What the sandbox cannot tell you is whether the game is any good, and with snake that is the only interesting question.

What should the prompt actually say?

Six lines cover the whole game. The table below is the difference between a build you tune and a build you rewrite.

Element Weak wording Wording that works
Board "snake game" "20 by 20 grid, snake starts in the centre facing right"
Controls "arrow keys" "arrow keys set direction, reversing into yourself is blocked"
Food "food appears" "one food item in a random empty cell, respawns when eaten"
Growth left unsaid "each item adds one segment to the tail"
Walls left unsaid "hitting a wall ends the run" or "edges wrap to the far side"
Pace left unsaid "a few steps per second, speeding up as the snake grows"

Two of those rows do the heavy lifting. Without the reversal block, a player taps the opposite arrow, folds into their own neck instantly and blames the game. And the wall rule needs deciding up front, because wrapping edges and lethal walls are genuinely two different games with different difficulty curves.

It also helps to say what you do not want. "No menus, no difficulty picker, the run starts immediately" saves an edit, because a generator left to its own devices tends to add a title screen with options nobody asked for. General prompt structure is covered in how to write a good prompt.

How does the build actually go, step by step?

  1. Describe the game in two sentences. For example: "Snake on a 20 by 20 grid. Arrow keys steer, reversing is blocked, food spawns in a random empty cell, the tail grows by one per bite, hitting a wall or yourself ends the run, score sits at the top."
  2. Wait for the sandbox-checked build. A simple game takes about a minute. If a build fails, the cause is usually something ordinary in the description rather than anything exotic, so reread your own wording first.
  3. Play past the point of losing. The game over screen and the restart button are the parts that get forgotten, and without them the game is a single-use toy.
  4. Edit one thing per message. "Start one step slower", "speed up every five items", "show the best score next to the current one".
  5. Publish in one click to an address like your-snake.zugo.run and send the link to somebody who will actually play it.

Editing is cheaper than guessing, so the first build should be deliberately plain. You cannot judge pace by reading a description of pace.

Why does a working snake still feel unfair?

Almost always one of three faults, and all three are fixed with a sentence.

Dropped inputs. A player taps up then right to round a corner, the second tap lands between steps and vanishes. Ask for the last key press to be buffered and applied on the next step, and the game stops feeling deaf.

Instant reversal. If a 180 degree turn is legal, the game punishes a slip of the thumb rather than a bad plan. Blocking the reverse direction is not a nicety, it is the rule that makes snake fair.

Pace. Too slow is boring, too fast is unplayable, and the sweet spot is narrower than it looks. Ask for a calm opening speed with a gradual ramp, so the run builds its own tension instead of arriving at full difficulty.

There is a fourth, rarer one: food spawning under the tail where it cannot be reached. Say food only appears in an empty cell and it stops happening.

How do you make it playable on a phone?

Phones have no arrow keys, so touch control has to be named in the prompt or added in an edit. Swipes in four directions work well, and four large buttons under the board are the reliable fallback for players who dislike gestures.

Swipes have one catch. A short, sloppy diagonal can register as the wrong direction, which reads as the snake ignoring you. Ask for the dominant axis of the swipe to win, and for very short movements to be discarded.

Ask for the board to be square and fitted to the screen width, then test on a real handset at the published address rather than in a narrow desktop window. The sandbox check answers "did it load", not "can a thumb play it", and those are very different questions once the board is smaller than a palm.

How do you make yours different from every other snake?

The mechanic is famous, so difference comes from the rules around it rather than from the artwork. Three additions carry their weight, and each is one edit.

Special food is the easiest. A rare golden cell worth extra points, a poison cell that shortens the tail, a slow cell that drops the pace for a few seconds. Suddenly the player is choosing rather than driving to the nearest dot.

Obstacles are the biggest change for the smallest wording. A handful of fixed blocks turns an open field into a maze and alters every run.

Then there are board rules: wrapping edges, a field that shrinks over time, a forbidden zone that moves. How to phrase changes like these in short messages is covered in how to edit after generation.

What does a finished snake cost?

Less than most genres, because the mechanic rarely needs rebuilding.

Action Credits
Build the game 6
One edit 3
Hi-Fi build 12
Hi-Fi edit 6

A normal run is a build, then edits for pace, touch controls and a high score. Pro is $25 a month for 200 credits, which is around 33 builds or 66 edits, and Business is $99 a month for 800 credits.

Being straight about Free: it grants 5 credits, which is less than one build costs, so a snake from scratch does not fit inside the free tier. Cloning a game template from the gallery does not spend credits, so there is a way to look around first.

Where are the limits worth knowing?

Games here are 2D and run in the browser. For snake that is the natural habitat, so the ceiling is not one you will bump into.

The high score lives in the player's browser by default and does not follow them to another device. A shared leaderboard means a database, which means connecting Supabase and treating it as a layer on top of the game rather than a line in the chat.

Two-player over a network is a separate project too. The general rule holds: unusual mechanics arrive through a series of edits, not through one clever paragraph. The code is yours and exports to GitHub if you want to carry on by hand, and Zugo does not pretend to replace a development team on something larger.

There is no snake in the template gallery. The five game templates cover other genres, and the closest in spirit is Blockfall with its grid and arcade pace, which is picked apart in the Blockfall template.

Where should you start?

Write down three things: board size, control scheme, and what a wall does. That is enough for a first run, and everything else is easier to judge once a snake is moving on screen.

Build the plain version, play two full runs, then add one rule that nobody else has. That single rule is what separates your game from the hundred other snakes on the internet. Check that the score persists and the restart button works, then publish. Start at zugo.dev.

← All posts