- Genre
- Arcade · Snake / casual
- Platform
- Any modern web browser (desktop, tablet, phone, foldable)
- Field
- 21 × 21 grid; snake starts 3 segments, heading right
- Controls
- Keyboard WASD / arrow keys · swipe gestures · on-screen four-arrow d-pad
- Modes
- Classic survival run with global leaderboard
- Price
- Free
Grow longer. Score higher. Beat your best.
TGL Snake is a free, no-install, browser-based take on the classic arcade Snake. You drive a growing snake around a 21 × 21 grid, eating food orbs, dodging walls and your own tail. The feel is dialed for smooth cell-by-cell movement on every input device — keyboard, swipe, or thumb d-pad — and the leaderboard submits a fully replay-validated score so you know your run is the real deal.
How it plays
- Field: 21 × 21 grid, classic. Snake starts in the centre, three segments long, heading right.
- Food: one food cell at a time, placed by a seeded PRNG over all non-snake cells uniformly.
- Movement: each tick advances the head one cell. Direction inputs queue and apply at the next tick. Reversing into yourself is silently blocked.
- Eat: stepping onto food grows the snake by one segment and spawns the next food cell.
- Death: walking off the edge (
wall) or onto your own body (self) ends the run. The tail vacating its cell IS allowed when you're not eating that tick — matches the classic rule. - Score: 1 point per food. No timer bonus, no length multiplier — pure honest score.
- Win condition: filling the entire 21 × 21 grid (
board_full). Technically possible — nobody on tglgames.com has done it yet.
Power-ups. More strategy.
Special pickups appear during the run. They bend the rules just enough to reward bold lines without breaking the classic feel.
Speed Up · Faster Growth
Ticks accelerate for a window — covers more cells per second, and the food you eat while boosted grows you faster than usual.
Shield · Protection
Absorbs the next wall or self-collision. One save per pickup. Pop a shield, take a riskier line.
Magnet · Pull In Food
Food orbs in the next several cells slide toward your head. Easier targeting in tight corners.
Score Boost · Extra Points
Every food eaten while the buff is active pays double. Time it with a clean stretch for a leaderboard surge.
Slow Down · Control The Pace
Halves the tick rate for a window — the rescue button when you've boxed yourself in and need a few extra frames to plan.
Determinism + replay
Mulberry32 PRNG, bit-identical between the JS client and the
PHP validator (same seed → same food sequence forever). The
seed is issued by /api/run/start inside a signed
run token. Every direction change is logged with the tick at
which it was applied ({ d: "U|D|L|R", tick: <int> }).
On submit, the server replays the entire run from the move log + seed. If the recorded score doesn't match the simulator, it's rejected. No client can fabricate a score because the server reproduces the exact same end state from the recorded inputs.
Anti-cheat
- HMAC-signed run tokens; single-use, tied to a server-issued seed.
- Server replays the full move log against the seed and overrides any client-claimed score with its own simulation.
- Hard caps:
MAX_TICKS = 20,000, score in[0, 400]. Anything past those bounds gets rejected with a reason. - Reverse-direction inputs are silently rejected (same as the client enforces), so you can't sneak a 180° turn through the wire.
Controls in full
- Keyboard: WASD or arrow keys. Hit a direction; the snake turns at the next tick.
- Swipe: drag anywhere on the canvas in the direction you want to head. Diagonal swipes resolve to the dominant axis.
- D-pad: an on-screen four-arrow pad for thumb input. Source-tracked separately so leaderboards know how each player drove.
Each input source (key / swipe /
dpad) is logged per turn so the stats panel can
break it down. Drove a 200-point run with only swipes? It'll
show up.
Privacy / signup
No account required. First visit creates a guest with an
auto-generated username (player_xxxx); rename
anytime, no throttle for guests. No tracking pixels, no
analytics SDK, no third-party scripts, no payment processor
anywhere on the site.