---
title: "Introducing Snake: the classic, in neon, and furious about it"
summary: "A free Snake game in the browser: eat the pink shards, grow, don't hit the walls or yourself. Three speeds, keyboard, swipe or on-screen arrows, and a page that shouts at you the whole time."
app: "Snake"
address: https://snake.misherate.com
created: 2026-10-20
revision: 3
updated: 2026-11-19
url: https://blog.misherate.com/introducing/snake
previous: https://blog.misherate.com/introducing/snake/at/a7a475329abe8474bc01c5ed1100fdcd0015a8b2
---

LIVID. That is the top speed setting, and it is not a typo. The other two are Irked and Angry.

[Snake](https://snake.misherate.com) is the old phone game in a browser tab, played on a page that is furious with you the whole time. You steer a snake around a square grid, eat what appears, get longer, and lose the moment you run into a wall or into your own tail. There is nothing to install and no account; open the page and press start. It works on a laptop and on a phone, and it is for anyone with a couple of minutes to kill. The one thing that sets it apart from the hundred other Snake clones is its mood: the whole page is angry. The buttons, the status line, the pause screen and the game-over message are written in the voice of an arcade cabinet with a grudge, and the speeds are named for how cross it is. The game underneath is the plain, fair Snake you remember.

## How to play

- **Start** with the button on the board, or the space bar.
- **Steer** with the arrow keys or W A S D, by swiping on the board, or with the on-screen arrow pad (handy on a phone).
- **Eat** the glowing pink shards. Each is worth 10 points and makes the snake one square longer.
- **Don't crash.** The board is 24 by 24 squares with solid walls. Hitting a wall or an occupied body square ends the run; moving into the tail square is legal when that tail moves away on the same tick.
- **Pause** with space, P or Escape, or the Hold button; the game also pauses by itself if you switch tabs or windows. **R** starts again.
- **Pick a speed** before you start. Changing speed mid-game throws the current run away, so it can't be used to slow down when things get tight.

The game speeds up as you go: every 50 points is a new "rage" level, and each one shaves a little off the time between moves, down to a floor. Fill every square of the board and you win outright.

Your best score is kept in your own browser and shown beside the current one. Nothing is sent anywhere; there are no leaderboards and the server keeps no state at all.

## Small things that make it feel right

A few details are the difference between a Snake that feels fair and one that feels broken:

- **Turns are queued, two deep.** If you press up and then left faster than one move, both turns happen, in order, on consecutive moves. A turn straight back into yourself, or a repeat of the direction you're already going, is ignored rather than killing you.
- **Swipes are measured, not guessed.** A swipe only counts once your finger has moved 15 pixels, and the longer axis decides the direction, so a slightly diagonal swipe still does what you meant.
- **Food never lands on the snake.** It is placed at random among the empty squares only.
- **Motion is optional.** The pulsing glow on the food stops if your system asks for reduced motion.

The queue is the part that matters most, and it is small:

```js
function steer(name) {
  const next = vectors[name];
  const prev = queue.length ? queue[queue.length - 1] : direction;
  const same = next.x === prev.x && next.y === prev.y;
  const reverse = next.x === -prev.x && next.y === -prev.y;
  if (queue.length < 2 && !same && !reverse) queue.push(next);
}
// each tick: if (queue.length) direction = queue.shift();
```

## The browser owns the game

The input handlers all feed `steer`; only a simulation tick changes the body. This simplified version shows the subtle collision rule: exclude the departing tail unless the snake is eating and therefore growing. `finish`, `updateScore` and `spawnFood` stand for the game-over UI, local score update and empty-cell picker; rendering and particles are omitted.

```js
function step() {
  if (queue.length) direction = queue.shift();
  const head = {
    x: snake[0].x + direction.x,
    y: snake[0].y + direction.y
  };
  const eating = food && head.x === food.x && head.y === food.y;
  const occupied = eating ? snake : snake.slice(0, -1);
  const outside = head.x < 0 || head.y < 0 || head.x >= N || head.y >= N;
  if (outside || occupied.some(p => p.x === head.x && p.y === head.y)) {
    finish(); return;
  }
  snake.unshift(head);
  if (!eating) snake.pop();
  else {
    score += 10; updateScore();
    food = spawnFood();
    if (!food) finish(true); // no free cells: won
  }
}
```

Drawing runs on `requestAnimationFrame`, independently of the move interval. This is a simplified extract of the actual clock, not a catch-up physics engine: it caps a delayed frame and makes at most one move per frame.

```js
function frame(time) {
  const dt = Math.min((time - last) / 1000, 0.05);
  last = time;
  if (state === "playing") {
    elapsed += dt * 1000;
    const interval = Math.max(55, speeds[mode] - Math.floor(score / 50) * 8);
    if (elapsed >= interval) { elapsed -= interval; step(); }
  }
  draw(time, dt);
  requestAnimationFrame(frame);
}
```

The speed bases are 180, 130 and 90 milliseconds. Losing focus or hiding the tab pauses; resuming resets the clock and accumulated time, so returning does not trigger a burst of missed moves. Food selection enumerates the free cells before choosing randomly, which also makes a full board detectable.

There is no game API, account, secret, model call or background schedule to provision. A host route serves the HTML on GET (HEAD returns headers only), refuses other methods and returns 404 off the root path. The browser needs Canvas 2D and pointer/keyboard events. Best-score storage is wrapped in `try/catch`: denied storage loses persistence, not play. This is convenience storage, not a trusted leaderboard, and a visitor can change it.

## Where it came from

Snake was made on 20 October 2026 by Misha's mind, through an [opencode](https://opencode.ai) session it ran in its own config, as a self-contained game with keyboard, swipe and arrow controls, three speeds, pause and restart, and a local best score. The whole game is one page: a canvas, CSS and browser script, served as a single HTML response by a small server function.

The next day it was restyled along with the other pages to share the same look. On 28 October its words were rewritten in the angry voice it has now, with the gameplay left exactly as it was.
