Snake Duel

Two snakes on one grid, same screen. Grow by eating food and cut off your rival — the last snake alive wins.

How to play Snake Duel

Snake Duel is a two-snake twist on the classic arcade game. Instead of one snake alone, two snakes share a single grid at the same time — each hunting the same food, each growing longer with every bite, and each looking for the moment to cut the other one off. You can play a friend on the same screen, with one player on the W-A-S-D keys and the other on the arrow keys, or take on a computer snake at three difficulty levels and earn ranking points for every win. The rules are the same as ever — keep moving, eat food, do not crash — but sharing the board turns a solo survival game into a fast, tactical duel where boxing in your opponent matters as much as feeding yourself.

The goal

Be the last snake alive. Both snakes move at the same time, one cell per tick, and never stop. Eat food to grow longer, avoid crashing, and force your opponent into a wall, into your body, or into their own tail. A round also ends instantly if a snake reaches the food target shown between the two scores — so you can win by outliving your rival or by out-eating them.

Setup

The board is a square grid shared by both snakes. Player 1 (green) starts on the left facing right; Player 2 (amber) starts on the right facing left. A single red pellet of food sits somewhere on the board. As soon as either player presses a direction, both snakes start crawling. Whenever a pellet is eaten, a new one appears on a random empty cell, so there is always exactly one pellet to race for.

Controls

  • Two players, one keyboard: Player 1 steers the green snake with W (up), A (left), S (down) and D (right); Player 2 steers the amber snake with the Arrow keys. Both players press at the same time — there are no turns.
  • On a phone or tablet, use the two on-screen direction pads below the board: the green pad drives Player 1 and the amber pad drives Player 2. Because same-screen two-player on a small touch phone is cramped, we recommend a tablet or a keyboard for the best two-player experience; the vs-Computer mode plays perfectly with a single pad on any phone.
  • You cannot reverse directly back on yourself. If you are heading right, pressing left is ignored, because turning 180° would drive your head straight into your own neck.
  • Only your most recent direction press before each tick counts, so you can line up a turn a fraction early without fear of double-turning into yourself.

Rules of play

  • Both snakes advance one cell every tick, simultaneously, in whatever direction each is currently heading. There are no turns — the whole board updates at once.
  • Eating the red pellet makes a snake grow by one segment and spawns a new pellet on a random empty cell. A longer snake is more dangerous to your opponent, but also a bigger obstacle to yourself.
  • A snake dies the instant its head leaves the grid (walls are solid — there is no wrap-around), rams any part of its own body, or rams any part of the other snake. Crashing into the opponent is the heart of the game: steer so that they run into you.
  • Head-on collisions are mutual. If both heads move into the same cell on the same tick — or the two heads swap places by charging straight through each other — both snakes die. We use this symmetric "both die" rule instead of "the shorter snake loses" so the outcome never depends on a length count you cannot see at speed; if both snakes die on the same tick the round is a draw.
  • Following a tail is legal. A head may safely enter the cell an opponent's (or its own) tail is vacating on that same tick — as long as that snake is not growing that tick. This lets you chase closely without an automatic crash.

Winning a round

A round ends the moment one snake is left alive: that snake wins as the last one slithering. It also ends the instant a snake reaches the food target displayed between the two scores, which gives fast eaters a second route to victory. If both snakes crash on the very same tick — a head-on trade, or both hitting walls together — the round is a draw. Press New Game to play again; each round starts fresh with both snakes back at length three.

Playing the computer (ranked)

In Snake Duel vs Computer you drive the green snake and the amber snake is controlled by the game. Choose one of three levels. Easy heads greedily for food and only dodges moves that would kill it immediately, so a little planning beats it. Normal looks at the open space around each option and avoids trapping itself in a shrinking pocket. Expert looks further, keeps its escape routes open, and tries to avoid losing head-on trades — it will happily cut you off if you get careless. The computer thinks entirely on your device, so the game works offline. Beat it to earn ranking points: Easy +10, Normal +30, Expert +100, submitted once per win and saved to the leaderboard when you sign in.

Cut-off tactics and strategy

  • Cut, do not chase. The surest way to win is to steer across the front of the opponent so their head runs into the side of your body. Get one cell ahead and turn across their path — they must swerve or crash.
  • Use your length as a wall. Every pellet you eat makes your snake a longer barrier. Curl your body between the opponent and the open space to shrink the area they have to move in until they run out of room.
  • Mind the head-on. Driving straight at the enemy head is a coin-flip that kills you both, so only trade heads when a draw suits you. Otherwise approach from the side, where only they crash.
  • Do not trap yourself. Racing greedily after food can coil you into a dead end. Leave yourself an exit — the computer's harder levels win most of their games by luring you into a corner you built.
  • Control the centre. A snake in the middle can turn in every direction and reach new food quickly, while a snake pinned against the edge has far fewer safe moves. Grab central food first and keep your options open.

Frequently asked questions

What happens in a head-on collision?

Both snakes die. If the two heads move into the same cell on the same tick, or swap places by passing straight through each other, it counts as a mutual crash. If that leaves no snake alive, the round is a draw. Because of this, charging directly at the enemy head is risky — approaching from the side, so only they crash, is much safer.

Can I win without outliving my opponent?

Yes. Each round has a food target shown between the two scores. The first snake to eat that many pellets wins immediately, even if both snakes are still alive. So you can win by survival (be the last snake moving) or by eating (reach the target first).

Is same-screen two-player good on a phone?

It works, using the two touch pads below the board, but a small phone is cramped for two players at once — a tablet or a keyboard is much more comfortable. The vs-Computer mode is designed for a single player and plays perfectly on any phone with one touch pad.

How do I earn ranking points?

Win a game of Snake Duel vs Computer at any level. Easy is worth 10 points, Normal 30 and Expert 100. Points are recorded per difficulty; sign in and your best result appears on the leaderboard. Draws and losses score nothing, so pick the highest level you can reliably beat. The two-player mode is just for fun and is not ranked.

Does the game work offline?

Yes. Once the page has loaded, both the two-player duel and the computer opponent run entirely in your browser with no internet connection. Ranked wins earned offline are stored on your device and upload automatically the next time you are online and signed in.