Online Snake Game
{{ feedbackText }}
{{ playTextState }}
A little room to grow
Snake
Eat the fruit. Keep an open route.
{{ setupIssue }}
More options
Keep a seed to practise the same food route.
Take a breather
Route held
Your trail and clock are frozen.
The final trail
{{ playOutcome.summary.headline }}
{{ playOutcome.summary.detail }}
- {{ metric.label }}
- {{ metric.value }}
New best this visit: {{ playSnapshot.hud.score }} points.
Run details
- Seed
{{ playRunIdentity.seed }}- Setup
- {{ playSnapshot.hud.pace }} · {{ playSnapshot.playfield.walls }}
- Level / moves / active time
- {{ playSnapshot.hud.level }} / {{ playSnapshot.playfield.moves }} / {{ playSnapshot.activeMs / 1000 }}s
- Rules
{{ playRunIdentity.rulesVersion }}- Trace
{{ playRunIdentity.trace.checksum }}- Snapshot
{{ playRunIdentity.snapshotChecksum }}
Snake is unavailable
{{ unavailableReason }}
Similar tools
- Online Pacman Game Play a seeded Pac-Man-style maze with three modes and difficulty levels, then measure pellet progress through power chains and active time.
- Online Breakout Game Play a seeded Breakout-style run with adjustable speed and paddle settings, then compare brick progress with streak scoring and browser bests.
- Online Digger Game Play a seeded Digger-style tunnel chase, collect 16 emeralds, and compare routes across difficulty and scoring modes with exact replay.
- Online Bomberman Game Play a seeded Bomberman-style maze, clear enemies with timed blast lanes, and replay the same arena across three difficulty and scoring modes.
Snake turns open space into a shrinking route-planning problem. Each food pickup makes the body one cell longer, so a turn that looks harmless early in a run can close the only exit later.
The head moves on a rectangular grid and the body follows its exact path. A direct reverse turn is ignored because it would send the head into the next body segment. Useful steering therefore comes from planning two or three turns ahead, especially near a wall or a loop in the tail.
| Choice | What changes | Main risk |
|---|---|---|
| Open route | Leaves several turns available | A longer trip to the next food |
| Tight loop | Shortens the path | The head can meet the body before the tail clears |
| Wrap edge | Continues from the opposite side | The re-entry cell may already be occupied |
| Solid edge | Stops movement at the border | Touching the border ends the run |
Speed changes how much thinking time fits between moves, not the scoring rule. Wall behavior changes the legal route itself. Scores from different pace and wall settings therefore describe different challenges even when the food count matches.
A seed fixes food placement, which makes the same route available for another attempt. The replay remains exact only when the pace, wall rule, and ordered turns also stay the same. Random-looking food positions are repeatable practice conditions, not evidence that one seed is easier in every possible run.
How to Use This Tool:
Set the board rule first, then steer for open space rather than only chasing the nearest food.
- Choose Pace and decide whether Walls wrap to the opposite edge or end the run on contact.
- Open More options to change the Run seed when you want to practise the same food placements, then select Play. The default seed works as is, and a blank seed keeps Play disabled.
- Turn with the arrow keys or WASD, swipe across the board, or use the touch pad. Press P or Space to pause when keyboard input belongs to the game.
- Review Score, Food, and Length after a wall collision, self-collision, or cleared board, and open Run details for Level and the seed. Select Retry same to repeat the same route for a fair comparison; Play again keeps the pace and walls but changes the seed.
Interpreting Results:
Score, food, and growth are different views of the same progress because each pickup adds 10 points and one body cell. Level changes every five pickups, so it is a compact progress marker rather than a separate performance score.
The ending reason carries the useful diagnosis. A wall collision applies only to solid edges; a self-collision means the planned route closed before the tail moved away. Compare two runs only when pace, wall rule, and seed match, then use the higher food count or later collision as evidence of a better turn sequence.
Technical Details:
The board contains 24 columns and 16 rows. A run begins with four occupied cells, moving right. Food is placed on an unoccupied cell from a seeded sequence; filling every cell leaves no legal food position and clears the board.
Formula Core
One pickup changes score, length, and level together. These equations make the displayed totals auditable.
F is food collected, S is score, L is snake length, and V is level. Five pickups therefore produce 50 points, length 9, and level 2.
The simulation advances in 100 millisecond fixed ticks. Slow moves every 3 ticks, Medium every 2, and Fast every tick, giving nominal move intervals of 300 ms, 200 ms, and 100 ms respectively.
Rule Core
| Rule | Exact behavior |
|---|---|
| Turn queue | The most recent legal turn is applied at the next grid move; an immediate reverse is ignored. |
| Normal movement | A new head cell is added and the tail cell is removed. |
| Food movement | The new head remains while the tail stays in place, increasing length by one. |
| Self-collision | The run ends when the new head overlaps the body, excluding a tail cell that moves away on the same non-growth step. |
| Wrap edge | Coordinates continue from the opposite edge before body collision is checked. |
| Solid edge | A head coordinate outside the 24 by 16 grid ends the run immediately. |
Pausing stops fixed ticks and clears any queued turn. A same-seed replay reproduces food placement only when the same settings and action order are used; changing pace changes when queued turns reach the movement step.