โ† Back

Snake

Steer with arrow keys, WASD, or a swipe. Eat food to grow โ€” don't hit a wall or yourself.

How to Play

Snake is played on a 20x20 board โ€” 400 cells in total. The snake starts three cells long in the middle of the board, already moving to the right, and it never stops. Your only input is a change of heading: arrow keys, WASD, or a swipe on touch devices. Steer the snake onto the pulsing food and it grows by one cell, your score goes up by 10, and a new piece of food appears in a randomly chosen empty cell. There is no wrap-around: the four walls are solid, and touching any of them ends the run instantly. So does running into your own body.

Two details of the movement rules matter more than they look. First, a direct reversal is ignored rather than fatal โ€” if you are heading right and press left, the input is discarded and the snake keeps going right. Second, your inputs are buffered, but only two deep, and exactly one is consumed per step. That means a fast two-key sequence like "up, then left" while travelling right does execute correctly: the snake moves up for one step, and only then turns left. It also means a third key pressed in the same instant is thrown away. Mashing does not queue a rescue; it queues nothing.

The speed ramp is deliberately back-loaded. The snake begins at 5.5 cells per second and accelerates toward a ceiling of 13 cells per second, but the curve is quadratic rather than linear, so the first ten pieces of food barely change the pace at all. By around 20 food eaten you are at roughly seven and a half cells per second, and the top speed only arrives at about 40 food โ€” a snake 43 cells long, worth 400 points. The practical consequence is that the opening is a warm-up and the real game starts once you already have something substantial to steer around.

Why Snake Gets Harder (It Is Not the Speed)

Almost everyone blames the acceleration. The acceleration is real, but it is not what kills most runs. What kills runs is that your own body is the obstacle course, and you are the one building it.

At length 5, the board has 395 free cells and essentially every route is available. At length 60, you have drawn sixty cells of wall across a board that only has 400 cells to begin with, and every one of those walls was placed by a decision you made twenty seconds ago. The board you are now driving on is a maze of your own authorship. Speed makes mistakes harder to correct, but the mistakes themselves are almost always geometric: you sealed off a region, or you left yourself a corridor with no exit, and the collision that follows is just the delayed bill arriving.

This is why strong players think in terms of free space rather than in terms of the next turn. The useful question at any moment is not "can I reach the food?" but "after I reach it, is the remaining open area still one connected region that my head can travel through?" A snake that keeps its free space connected can always, in principle, keep going. A snake that cuts the free space into two pieces has just guaranteed that everything in the piece it is not standing in is now unreachable, and it will run out of room in proportion to how much it cut off.

There is one more mechanical wrinkle that beginners misjudge. Because the tail moves forward on the same step your head does, the cell your tail is currently occupying is already vacant by the time your head arrives โ€” so moving directly onto your own tail tip is legal and safe. The exception is the step on which you eat: on that step the snake grows, the tail does not advance, and the tail cell is genuinely solid. Following your own tail around at a distance of zero is therefore a viable survival maneuver right up until the moment food sits at the end of it.

Two Ways to Drive: The Wall Lap and the Zigzag

Snake players converge on two broad movement styles, and they fail in completely different ways.

The wall lap means running the perimeter and spiralling inward, keeping the body pressed against the boundary and the interior open. Its great virtue is that the body forms a smooth, predictable shape with no pockets in it โ€” a curled snake around the edge leaves one large, obviously connected middle. Its weakness is that a spiral eventually closes on itself, and the moment you have wound too many turns inward, the exit is your own body. Wall lapping is excellent for the first half of a run and progressively more dangerous after that unless you deliberately unwind.

The zigzag, sometimes called boustrophedon after the way an ox ploughs a field, means sweeping the board in parallel lanes: go up a column, step across, come back down the next, step across again. Its virtue is that it visits every cell in a fixed, repeatable pattern and never crosses itself, so it can in principle grow indefinitely. Its cost is that it is slow in terms of food per second โ€” you often walk the long way around because the pattern says so, ignoring food that is two cells away. Its other cost is that the pattern only stays safe if you commit to it. A zigzag abandoned halfway leaves alternating fingers of body with narrow one-cell gaps between them, which is one of the worst shapes on the board.

The practical answer is a hybrid, and the switch point is roughly where the acceleration starts to bite. Play loose and opportunistic while you are short and slow, since the board is nearly empty and chasing food directly costs you nothing. As the body gets long, shift toward a disciplined lane pattern that keeps the body in long straight runs pushed against one another or against a wall. Long straight segments are cheap to think about; scribbles are not.

Always Leave Yourself a Way Back

If you take one habit from this page, take this one: before you commit to a route, know how you will get out of it.

A huge share of deaths happen in a region the player entered with no exit plan. You dive into a gap between your body and the wall to grab a piece of food, you get it, and then you discover that the gap was three cells wide going in and is now two cells wide because you just grew โ€” and there is no room to turn around. Nothing dramatic happened. You simply entered a dead end and paid for it four steps later.

The test is easy to apply in real time. When you are about to enter a narrow area, ask whether the opening you came through is still going to be open when you want to leave, or whether your own body will be lying across it. If the answer is that your body will be there, you need another exit before you go in, not after.

The same logic explains why experienced players so often refuse food. Food is worth 10 points; a run is worth all the points you have not scored yet. Skipping a piece that sits in an awkward pocket and taking a lap while the board reshapes itself is almost always the higher-expected-value play, and the food does not expire or move โ€” it will still be there when your body has slid past and the geometry is friendlier.

When the Food Spawns Somewhere Awful

Food is placed uniformly at random among all cells the snake is not occupying, with no bias toward open areas. That means it will eventually appear inside a pocket your body has half-enclosed, or hard against a wall with your body running parallel to it two cells away. These situations are the real skill test of the late game.

When food lands in a pocket, resist the instinct to go straight at it. Work out where your tail will be by the time you arrive, because the pocket is usually opening up behind you as the tail clears out โ€” the entrance that looks blocked now may be open in six steps. Timing your approach so you arrive after the tail has vacated the mouth of the pocket turns an impossible grab into a routine one. Snake is a game of waiting for your own tail far more often than beginners realize.

When food lands tight against a wall or in a corner, approach along the wall rather than perpendicular to it. Coming in perpendicular means you arrive with a wall directly in front of you and exactly two legal turns, both of which may be into your own body. Coming in parallel means you eat it in passing and continue in the same direction, which requires no decision at all.

And when the pocket genuinely has no solution โ€” the food is sealed inside a region your head cannot reach โ€” just keep the rest of the board healthy. Nothing forces you to eat. Drive a clean pattern, let your tail unwind the region, and take it later.

How Runs Actually End

Tips

About Snake

Snake is one of the oldest and most recognizable video games, and this version keeps the rules exactly as classic as they sound: solid walls with no wrap-around, real self-collision, and speed that ramps up the longer you survive. What is new is the feel. The board is rendered on canvas with the snake's body smoothly interpolated between grid cells instead of snapping, a subtle traveling wave animation ripples down the body as it moves, and eating food triggers a particle burst with a rising musical pitch that climbs with every bite. Crashing shatters the snake into scattering pieces with a screen shake and a red flash.

It runs free in the browser with no download and no account, on desktop with the keyboard and on phones with swipe controls. Your score and best score are tracked live, with the best score saved locally in your browser so it persists between visits. Every run starts fresh with the New Game button, and the Help button brings back the on-board tutorial any time you need a refresher on the controls or the rules.

More Games

View all games โ†’