How to make a game like Slither.io
A multiplayer snake game is a trail of points, a turn-rate limit and a server that can check thousands of collisions a second. Here is how the pieces fit.

Key takeaways
- Store each body as a trail of points at a fixed spacing; drawing, growth and collision all fall out of that one structure.
- Collisions only check heads against nearby body points, using a spatial grid. That is what lets a room hold dozens of long snakes.
- Bots keep rooms alive when few people are online, and a defeated snake turning into food keeps the arena rich.
A game like Slither.io is an online arena where every player steers a snake that always moves forward, grows by eating glowing food scattered on the map, and dies when its head touches another snake’s body. A defeated snake bursts into a trail of food, so killing a big player is the fastest way to grow. Players can sprint by spending length. To build one you need smooth continuous steering, bodies stored as point trails, a room server that checks collisions, and bots so the arena is never empty. The genre is the .io arena game. Slither.io’s name, look and specific design belong to its owner, so this guide focuses on the mechanics and on twists that make the idea yours.
Why arena snake games are so sticky
- Anyone can kill anyone. A tiny snake cutting in front of a giant one ends the giant’s run. Size is power but also a liability, which keeps every encounter tense.
- Instant entry. Type a name, press play, you are in. No accounts, no tutorial.
- Comebacks are built in. Each death sprays food, so the area around a fight becomes a feast for whoever survives it.
- Ambient competition. A live top-ten list in the corner gives a goal that is always in sight.
Steering and the body trail
The head moves at a constant speed toward the pointer (or a joystick direction on phones), but it can only turn so fast. A turn-rate limit is what makes the movement feel like a snake instead of a cursor. Starting values: base speed around 150 to 200 units per second, sprint at roughly double, and a maximum turn of about 4 to 6 radians per second that gets slightly slower as the snake grows, so big snakes cannot circle on the spot.
The body is a list of points. Each frame, the head’s new position is added at the front, and the list is resampled so points stay a fixed distance apart (roughly half the body width). Length is just how many points to keep; growing means not trimming the tail this frame. Width can grow slowly with length (for example, from 20 units to 40 units over the first few thousand points of mass) so big snakes look big without blocking the screen.
Collisions without melting the server
Checking every head against every body point is far too slow once there are 50 snakes with hundreds of points each. Instead:
- Spatial grid: divide the map into cells about the size of a large snake’s width. Every tick, put each body point in its cell.
- Heads only: for each head, check the points in its cell and the eight neighbors. A hit is a distance less than the sum of the two radii.
- Skip your own body. Most arena snake games let you cross yourself. It is simpler and more forgiving.
- Food uses the same grid, so eating is a nearby lookup too.
The server is the referee: it owns positions, decides collisions and tells clients who died. Clients send only their steering direction and sprint flag. The .io game guide covers the general room structure for this family of games.
Networking a big arena
- Tick rate: the server simulates at 20 to 30 ticks per second; clients draw at 60 and interpolate between snapshots, so motion stays smooth.
- Area of interest: send each player only the snakes and food near their screen, not the whole map. Bandwidth then grows with what each player sees, not with the room size.
- Send changes, not the whole body. A snake’s body can be rebuilt on the client from its head path; send head positions and length, and let the client grow the trail.
- Map size scales with players. A small circle for 10 players, bigger for 50. An empty-feeling map is as bad as a crowded one.
On Startbase, a game with a room server runs in previews and shared preview links on every plan; publishing the server with the game is on paid plans (Multiplayer docs). The multiplayer game guide explains interpolation and rooms in more depth.
Bots, food and the economy of mass
An .io game with three people in it is not fun. Fill each room up to a target (say 20 snakes) with bots, and remove a bot whenever a real player joins. Simple bot brains are enough: wander toward nearby food, steer away from body points ahead, occasionally sprint toward a smaller snake’s head. Give bots plausible names and do not make them perfect; they exist to create situations, not to win.
Food has two sources: a steady background spawn that keeps the map stocked to a target density, and the burst left by dead snakes (convert most of the dead snake’s length into food along its body). Big snakes should slowly shed a tiny amount of length over time, which stops one player from owning the server forever.
Three twists that make it yours
- 01Cut instead of kill. Hitting a body cuts it at that point; the severed part turns to food and the head survives. Only a snake cut down to almost nothing is out. Fights become about trimming rivals, and big players stay in the game longer.
- 02Teams of three. Snakes on the same team can pass through each other and share a team score. Encircling becomes a coordinated play.
- 03A shrinking arena. Each round lasts five minutes and the safe zone closes in, forcing everyone together at the end. It turns an endless sandbox into rounds with a winner.
A brief for an original multiplayer trail game
An online multiplayer arena game called Kitetails, browser and phones. Each player flies a paper kite with a long ribbon tail across a sunset sky. The kite always moves forward at 170 units per second and turns toward the pointer or thumb joystick, with a turn limit that gets gentler as the tail grows. Collect floating glass beads to lengthen the ribbon; hold to gust forward at double speed, which drops beads behind you. Twist: flying into another kite’s ribbon cuts it at that point; the cut piece scatters into beads and the cutter keeps flying. A kite whose ribbon is cut below 5 segments tumbles out. Your own ribbon never cuts you. The tail is a trail of points at fixed spacing. The room server owns positions and collisions at 25 ticks per second using a spatial grid, sends each player only nearby kites and beads, and clients interpolate. Rooms hold 30 kites; bots fill empty slots and leave when real players join. Live top 10 by ribbon length, and a results card after each tumble showing length, cuts and time aloft.
The snake .io prompt is another ready-to-paste starting point with a different theme. If you want a single-player version first, start from the snake game guide and add the network later.
Frequently asked questions
How do multiplayer snake games handle collisions?
The server keeps body points in a spatial grid and checks each head only against points in nearby cells. A collision is when the distance between a head and a body point is smaller than their combined radii.
How many players can one room hold?
It depends on your server and how much you send each player. Sending only nearby objects and interpolating on the client lets rooms of several dozen players run well. Start with 20 to 30 and measure.
Why do .io games use bots?
An arena needs a crowd to be fun. Bots fill rooms to a target size when few people are online and step aside as real players join.
Can I copy the look of the original?
No. Its name, art and visual style belong to its owner. Use your own theme, art and name; the general trail-arena mechanic is shared by many games.

