Snake

Rooms and setup

Any number of registered players may join while a room is waiting. Every joined player must be ready before the host can start, and nobody can join after that. Guests can create public solo rooms that cannot be joined remotely, but they cannot join multiplayer rooms. Every lobby room card offers View, including waiting rooms shown to guests. A registered player who can join a waiting room sees Join beside View. The host chooses a positive integer reward-pellet count, a non-negative integer penalty-pellet count, and a positive integer game-area radius, while human speed and bot speed are positive values that may include decimals. The defaults are 4 reward pellets, 0 penalty pellets, human speed 7, bot speed 7, radius 10, and an included bot. A two-column Penalty settings group follows Human speed and Game-area radius. It contains the penalty count, renewal interval, effect, and exactly one effect-specific selector. When the penalty count is 0, the latter three dropdowns are blank and disabled, and their labels are dimmed. Otherwise, renewal offers 1s, 2s, or 5s and defaults to 2s. Penalty effect defaults to Lose points. Points lost offers 1, 2, or 3 and defaults to 1. Freeze movement instead shows Freeze duration, which offers 1s, 2s, or 3s and defaults to 1s. Switching through 0 penalty pellets retains the selected effect and both effect-specific choices. No-pellet timeout offers 10, 30, or 60 seconds and defaults to 30 seconds. Pellet density is (reward pellets + penalty pellets) × (1/2)² / gameAreaRadius² and may not exceed 10%. For denser settings, the warning includes the current density and disables Create Room. Bot speed is disabled while the bot is not included.

Every room is public to view. A registered room's Joining setting is Open by default. Host approval lets the host Accept or Decline each pending request, while 4-digit passcode requires the exact code chosen at creation. A player may cancel a pending request and stays in any existing waiting room unless accepted. Only the host can see the passcode. Guest solo rooms use Open.

Game ends after has three choices. Select a combined total of 50, 100, or 200 pellets, a time limit of 1, 2, or 3 minutes, or a point target of 20, 30, or 50 points. The highlighted dropdown is active, the point target defaults to 30 points when selected, and the 1-minute time limit is active initially. A room that starts with exactly one human runs its game processor on that player's device for immediate controls while the server verifies its updates for public spectators; it is unrated. Registered rooms that start with two or more humans are server-processed and rated. Guest-created solo rooms remain unrated. Only the selected value is visible; inactive dropdowns are blank, while all labels remain visible. Selecting a dropdown reveals its saved value.

Starting countdown

Each human snake and the optional bot begins at a random valid position. A ten-second countdown appears where elapsed time will later be shown. Players can move and change direction freely during the countdown, but no pellets exist and nothing can be eaten. The bot moves toward the center. Pellets appear and elapsed time begins when the countdown reaches 00:00. The no-pellet timeout and any configured penalty-renewal schedule also start then, so the countdown itself never uses any of either duration. During gameplay, a warning appears below the game-state progress box at five seconds remaining and counts down once per second through 1s. Eating either pellet type resets the deadline and hides the warning.

The arena and pellets

The arena is a circle of radius R. Every snake is a circle of radius 1, so its center stays within radius R−1. Snakes may touch, overlap, and pass through one another. Every human snake displays that player's avatar inside its circle, while the optional bot shows a robot icon. When circles overlap, your own active snake appears in front. All other circles keep room order, with the optional bot after the human players. Every pellet is a circle of radius 0.5. Decorative outlines stay inside those radii, so visible edge contact matches collision contact. Reward pellets are green and add 1 point. Penalty pellets are red. Lose points subtracts the selected number without taking a score below 0. Freeze movement leaves the eater's score unchanged and prevents only that snake from moving for the selected duration. A new pellet may not touch another pellet or any active snake. The server tries at most 1,000 random candidates for each pellet. If setup cannot place them all, Start asks the host to use fewer pellets or a larger radius. If a replacement cannot be placed during play, the game reports that no new pellet can be placed and tries again at the next pellet replacement.

A snake eats a pellet when its swept movement path comes within 1.5 units of the pellet's center. The pellet disappears, its configured reward or penalty effect is applied, and the no-pellet timeout resets from that exact collision, even when a points penalty cannot lower an already-zero score. A movement freeze still accepts new destinations and resumes toward the latest one when its non-stacking deadline expires; timers, renewal, and pellet replacement continue while that snake is frozen. New pellets grow from a point to their full size. An eaten pellet shrinks while moving into the eater's circle center; reduced-motion preferences show the resulting state immediately. The server then tries to restore the configured number of that pellet type. If multiple snakes reach the same pellet in one update, the earliest contact wins. An exact tie uses room order, with human players before the bot. Total pellets eaten counts both types and is tracked separately from the scores.

On every selected penalty-renewal interval, the game chooses one current red penalty pellet at random, removes it, and uses the same replacement flow to create a fresh penalty pellet at a random valid location. If a real snake collision occurs at that exact deadline, the collision resolves first. A timed renewal does not change any score, Total pellets eaten, end-condition progress, pellet-consumption history, or the no-pellet timeout, and it has no eater-collapse animation.

Player control

Move a mouse pointer or tap once with touch or pen inside the arena to select an exact destination, shown as an ×. You can instead move a mouse pointer or tap once within the direction movement circle in the bottom-right corner. The direction from its center to the pointer guides your snake toward a movement destination on its legal boundary. Touch and pen movement after the initial press does not send another command. The arrow marker points that way but stays no farther than 33% of the gameplay radius from your snake, while the movement destination remains at the boundary. The latest update from either region continuously replaces the previous destination. The first destination starts immediately; while your snake is moving, later updates automatically steer toward the newest destination over a short three-tick curve so delayed input does not create sharp zigzags. The snake stops if it reaches that destination before the pointer moves again, and every destination remains inside the legal center circle. For arena movement, the direction-circle arrow points from the snake toward the exact destination and disappears when it is within 0.1 game unit of the snake center.

Bot, scoring, and results

Every human snake moves at the configured human speed, while the optional radius-1 bot moves at the separately configured bot speed. After the countdown, the bot continually chooses the nearest reward pellet for which a safe route exists. It moves straight toward that reward when the route is clear; otherwise, it takes the shortest available left-or-right route around the penalty pellets while staying inside the game area. A blocked nearer reward is skipped in favor of the next nearest reachable reward. If no reward has a safe route, the bot moves straight toward the nearest reward and may eat penalty pellets along the way. After those collisions change the board, it returns to the nearest safe route as soon as one is available; it waits only when no reward pellet exists. The semantic Player/Score scoreboard table uses shared center-start and center-end column alignment and tracks every human and the bot, while Total pellets eaten counts every reward and penalty pellet consumed. Player cards are shown only while the room is waiting; during gameplay and after the game ends, the scoreboard is the participant list. A separate information box directly below the Scores box contains Elapsed time, Total pellets eaten, and Progress so the circular game area can use the space above. Progress shows the rounded percentage of elapsed time, combined pellets eaten, or the leading score toward the selected end condition. A game stops when the selected pellet total is reached, its server wall-clock time deadline expires, any human or bot reaches the selected point target, no reward or penalty pellet has been eaten for the selected inactivity duration, or every player has resigned. Results rank higher scores first, and equal scores share a placement.

When a rated registered multiplayer room reaches its time, pellet, point-target, or no-pellet inactivity limit naturally, every human in the final roster receives an ELO result, including anyone who resigned earlier. A participant's player score is their final score divided by the sum of all final scores. If every score is zero, everyone instead receives 1 / participant count. The optional bot is included in that count and in the normal expected-score calculation at ELO 1500.

The bot's hypothetical ELO change is shared equally among the humans, while the bot remains at 1500 with a change of 0. Human ELO changes always total 0, and no rating may fall below 1. A glowing podium appears immediately beside Scores while Info counts down three seconds. Selecting the enabled podium opens the table early and clears Info; otherwise it opens automatically at the deadline when the final calculation is ready. The table shows ranking, status, score, ELO change, and new ELO. Close keeps the completed room open, and Exit returns to the lobby. Rated registered-human ELO changes and new ratings use exactly one decimal place. Increases are green, decreases are red, and unchanged changes are white. Guest and bot rows show dashes in both ELO columns.

Leaving and reconnecting

A disconnected snake continues to its last destination and then stops, so its player may reconnect. During active play, the departure control shows Resign. Its confirmation offers Resign to remain and watch or Resign & Exit to return to the lobby after the same resignation succeeds. Both remove that snake from active play while preserving its score and roster entry; when the player remains, the same navbar control changes to Exit and the remaining players continue. A direct active Exit request has the same resignation result; top-left navigation and closing the page only change presence. Without a bot, the room is abandoned when every human has resigned. The bot never resigns, so a bot-enabled room continues after every human resigns until its selected time, pellet, point-target, or no-pellet inactivity limit is reached. Current and recently ended rooms are retained only in the server's temporary room archive. An abandoned room does not update ELO. Naturally completed registered rooms update current ELO and its timestamped history, but Snake does not store a permanent full-game result record.