Snake

Steer a growing snake around the board and into the food. Every bite makes it longer, and the only things that can end the run are the wall and your own tail.

How to play

You never make it move, only turn — it goes forward on its own and does not stop or slow while you think.

  1. Choose a speed Calm is a gentle pace and a good place to start. Fierce is properly quick. You can change it between games.
  2. Steer with the keys or a swipe Arrow keys or W A S D on a keyboard; swipe on the board or use the arrow buttons on a touch screen.
  3. Eat the red dot Each one is ten points and makes the snake two segments longer. A new dot appears somewhere free straight away.
Full instructions
In depth

Steering a growing snake without trapping yourself

How the grid, the food, and the four speed settings work, what actually kills a good run, and the wall-hugging habit that separates long games from short ones.

Screenshot: How to play Snake
How to play Snake as it appears when the page opens.

The rules in plain terms

A snake starts three segments long in the middle of a twenty-by-twenty grid. It moves forward on its own, one cell per tick, and never stops. You choose which way it turns. A red dot sits somewhere on the grid. Eating it adds ten points to your score and makes the snake two segments longer. A new dot appears on a random free cell straight away. Hit a wall or any part of your own body and the game ends.

There is no wrapping. The edges of the grid are solid walls. Running into any of the four sides is the same as running into your own body: the game is over. The board does not scroll or expand. Four hundred cells is all you get, and as the snake grows, the free space shrinks.

Controls on keyboard and touch

On a keyboard, the arrow keys steer the snake. W, A, S, and D work as well: W for up, A for left, S for down, D for right. On a phone or tablet, swipe across the board in the direction you want to turn, or tap the four arrow buttons underneath the grid.

One safety net is built in: a direction that would reverse the snake straight into its own neck is ignored. If you are heading right and press left, nothing happens. You will not die from a panicked wrong keypress. To reverse direction, turn twice: right, then up, then left, for example.

Direction changes are queued, not applied instantly. If you press up then left within a single tick, both are honoured in order rather than the second one being treated as a reversal. This matters at higher speeds where two quick presses happen inside one movement step.

Scoring and the win target

Each red dot is worth ten points. The game tracks your score, your snake's current length, and your best score on this device. The best score is saved in your browser and shown as Best in the stats row.

Reaching three hundred points counts as a win. That means eating thirty dots without a mistake, growing the snake from three segments to sixty-three. The game announces the milestone but lets you keep playing for a higher score. If you somehow fill the entire board, leaving no free cell for a new dot, the game declares a perfect win. On a twenty-by-twenty grid that means a snake four hundred cells long, which is extraordinarily difficult.

The four speed settings

The Speed dropdown offers Calm, Normal, Quick, and Fierce. Calm moves the snake once every 170 milliseconds, which is a gentle walking pace and a good place to start. Normal ticks every 120 milliseconds. Quick drops to 85, and Fierce runs at 60 milliseconds per step, which is properly fast.

The speed you choose stays constant through the whole game. The snake does not accelerate as it grows. The difficulty comes entirely from having less and less free space on the board, not from the clock speeding up. You can change the speed between games by selecting a new value and pressing New game.

Strategy: hug the walls early

The single most effective habit is to travel around the outside of the board for the first half of the game. The walls are on one side of you, which means you can only be boxed in from three directions instead of four. The open middle stays available as escape room for later, when the snake fills half the grid.

Cutting through the centre early is what traps most players. A snake stretched across the middle divides the board into two halves, and sooner or later you have food on one side and your head on the other with no path between them.

A good opening looks like this: head right from the start position toward the east wall, turn down along the wall, then sweep across the bottom. By the time you have eaten five or six dots the snake traces a U shape along the edges and the middle is still wide open.

Strategy: plan one dot ahead

Before you eat a dot, look at where your head will be after the snake grows. Grabbing food that leaves you boxed in against a wall or your own tail is the most common way a good run ends. The dot is not going anywhere. Circle around it and approach from a direction that leaves you an exit.

At longer lengths this becomes a route-planning problem. You need a path that visits the dot and then continues to a safe area without crossing yourself. Thinking about the next dot while you eat the current one is the difference between scores of one hundred and scores of three hundred.

Strategy: slower is usually higher scoring

Calm speed gives you time to think properly. A long, careful game at Calm will almost always outscore a short, frantic game at Fierce. The points come from eating dots, not from moving quickly, so there is no scoring benefit to playing fast.

Fierce is there for players who already have the planning instinct and want the added challenge of executing it under time pressure. If you are trying to beat a personal best, drop the speed down and focus on not dying.

Strategy: follow your own tail

Once the snake is long enough to fill a large part of the grid, the safest move is to follow your own tail. The tail moves forward every tick, clearing cells behind it, so the space directly behind the last segment is always free. Tracing the path your body just vacated gives you a guaranteed safe route.

This works because of a rule about how the tail behaves. The tip of the tail moves out of the way on the same tick the head moves forward, so the cell the tail just left is free by the time you arrive. The one exception is when the snake has just eaten food and is about to grow: in that case the tail does not move, so following it too closely can be fatal.

Common mistakes and how they kill a run

  • Chasing the dot by the shortest path. Going straight to the food ignores where you will end up after eating it. A two-cell detour can save your life.
  • Turning through the middle when the snake is long. Once you have forty or fifty segments, any path through the centre risks dividing the board.
  • Forgetting the tail exists. The snake's body is behind you, and at high speed it is easy to clip a segment three or four cells back without noticing.
  • Playing too fast for your skill level. There is no shame in Calm. Points are points.
  • Panicking into a corner. When boxed in on three sides, new players often press every direction at once. One deliberate turn is better than three wild ones.
  • Eating food near a wall without an exit planned. A dot one cell from the edge is tempting but the wall leaves you fewer escape routes after the snake grows.

How the game handles edge cases

Food is placed by building a list of every free cell and picking one at random. This means placement is always instant, even when the snake fills most of the board. An earlier approach of guessing random positions until one missed the snake would have frozen the game at long lengths.

The tail tip moves out of the way on the same tick the head moves forward, so running into the very last segment of your tail is not fatal unless the snake is about to grow. This subtle rule means you can follow your own tail in a tight spiral without dying, which is an important survival tactic when space is short.

No account, no upload, no tracking

The entire game runs on your own device. Your best score is stored in this browser only and is never sent to a server. There is no leaderboard, no sign-up, and no data leaving your machine. Once the page has loaded, you can disconnect from the internet and keep playing indefinitely.

Help

How to play Snake

You never make it move, only turn — it goes forward on its own and does not stop or slow while you think. Each red dot is ten points and one more segment behind you, which is why a board that felt roomy at the start is mostly your own tail by the time the score is worth having.

Choose a speed

Calm is a gentle pace and a good place to start. Fierce is properly quick. You can change it between games.

Steer with the keys or a swipe

Arrow keys or W A S D on a keyboard; swipe on the board or use the arrow buttons on a touch screen.

Eat the red dot

Each one is ten points and makes the snake two segments longer. A new dot appears somewhere free straight away.

Avoid the walls and yourself

There is no wrapping around the edges. Running into a wall or into your own body ends the game.

Beat your best

Your highest score is saved on this device and shown as Best.

Everything runs locally

No account, no server, no scores uploaded anywhere. Once the page has loaded you can play it with the internet switched off.

Good to know

Work the edges

Travelling around the outside of the board and leaving the middle open gives you far more room to escape into later. Cutting through the middle early is what traps most players.

You cannot turn back on yourself

A direction that would reverse straight into your own neck is ignored, so a panicked wrong press will not kill you. Turn twice instead.

Plan the next dot, not this one

Before you take the food, look at where you will be afterwards. Grabbing a dot that leaves you boxed in is the commonest way a good run ends.

Slower is often higher scoring

The Calm speed lets you plan properly, and a long careful game beats a short frantic one on points almost every time.

Common questions

How do I play on a phone?
Swipe across the board in the direction you want to turn, or use the four arrow buttons underneath.
Can I go through the walls?
No. Hitting an edge ends the game, which is how the original worked.
Why did I die when I did not hit anything?
Almost always the tail. As the snake grows it is easy to cross your own body a few segments back without noticing.
Does the game get faster as I grow?
No — the speed you choose stays constant. The difficulty comes from having less and less free space.
What is the highest possible score?
If you filled the entire board there would be nowhere left to place food, and the game treats that as a perfect win. It is extremely hard.
Is my best score shared with anyone?
No. It is kept in this browser on this device only.