Bug Snake

Original

Eat the bugs. Do not eat yourself.

Bug Snake

At a glance

Goal
Steer a snake round an 18 by 18 board, eat bugs and grow, without hitting a wall or your own body
Score
10 a bug
Speed
One step every 0.19 seconds at first, a little quicker after every 5 bugs, and fastest, 0.075 seconds, from 50 bugs
Controls
Arrow keys or WASD, or swipe with a finger or the mouse. Esc or the II button pauses. Enter or Space starts from the first screen
Saves
Your best score, in this browser only
Cost
Free, no account

How Bug Snake plays

  • The snake starts 3 cells long in the middle of the board, heading right, and moves one cell a step on its own.
  • A bug sits on a random free cell. Eat it and the snake grows by one cell, you score 10, and your best score is saved at once.
  • Turning straight back is ignored. Two turns can wait in line, so a quick up then left makes a U-turn over the next two steps. A third quick turn is dropped.
  • A swipe has to move at least 12 pixels, the longer direction wins, and the turn is taken when you lift your finger, not while it moves. A plain tap does not turn.
  • The walls are solid: running into one, or into the snake's own body, ends the run. Following your own tail is safe, since the tail moves out of the way on that same step.
  • Every fifth bug brings the note "Build faster! Speed increased." and takes 0.012 seconds off each step. From 50 bugs the step stays at 0.075 seconds, though the SPEED number under the board keeps rising.
  • Fill the whole board and the run ends with "Every bug fixed!". That takes 321 bugs, for 3,210 points.
  • The pause card offers RESUME and RESTART.

What the test players showed

  • The whole board can be cleared. A test player that followed one fixed path through all 324 cells, again and again, ate all 321 bugs and filled the board in 24,003 steps, 37.1 minutes of play.
  • Heading straight for each bug does less well. A test player that steered toward the bug, never into a wall or its own body, and avoided moves that left it too little room, ate 28 to 74 bugs in 10 games. Five of the ten ate 60 or more.

At the starting pace the snake covers about 5 cells a second, and from 50 bugs about 13.

Tips that follow from the rules

  • Plan turns a step early. Two turns can wait in line, so you can set up a U-turn before you reach a wall.
  • Your tail is not a wall. The cell it leaves is free on that same step, so a long snake can follow itself round.
  • On a phone, lift your finger. The swipe counts only when it ends, and it has to be at least 12 pixels long.

In the game frame at 1280 by 720 the board is 640 pixels square, with cells of about 36 pixels. On a 390 by 844 phone it is 324 pixels, with 18 pixel cells. The opening prompt for this game is below. For a catching game that also speeds up, try Token Catcher.

Known limits

  • No difficulty setting and no wrap-around: every run starts the same way and a wall always ends it.
  • After a run ends, Enter and Space do nothing: click or tap PLAY AGAIN.
  • Leaving the window does not pause the game. Switching tabs does.
  • From 50 bugs the SPEED number keeps going up but the snake does not get any faster.
  • No sound.
  • At 1280 by 720 the game frame is 848 pixels tall, so the bottom of the board sits below the window until you scroll.
  • On a 390 by 844 screen the cookie notice covered the PLAY button in our check until it was answered or the page was scrolled.
  • If storage is blocked, your best score is not kept.

How it was built and checked

AI tool
Codex
First committed
2026-10-14, in the site's first commit with nine other original games
Size
One HTML file of 150 lines (about 10 KB), no game libraries
Rounds of changes
1 at build, from the build record. One fix since, on 2026-11-11: on the play page a mouse click on PLAY left the keyboard outside the game, so the arrow keys and WASD did nothing. A press on the game now moves the keyboard focus to it
Checked at build
The build report: a syntax check, drawing checks at four screen sizes against a stand-in canvas, restart, pause, blocked storage, and rule checks for eating, turning back, the walls and the snake's own body. It lists real browser rendering, physical touch input and balance over long sessions as not verified
Checked since
2026-11-11: a new rule test (55 checks covering the start, steps and speed, arrow keys and WASD, waiting turns, swipes, eating, the walls and the body, a full board, 10 greedy test games, the end card and PLAY AGAIN, pause, RESUME and RESTART, and the keyboard focus fix), and an automated browser check of the local build. At 1280 by 720 it found that after clicking PLAY the arrow keys did nothing. After the fix it answered the cookie notice, clicked PLAY, steered with the arrow keys to eat 2 bugs, turned with D and W, paused with Esc and with the II button and resumed, steered into a wall, saw that Enter did nothing on the end card, and clicked PLAY AGAIN. At 390 by 844, with a touch screen, it answered the notice, swiped 13 times to eat 2 bugs, paused with II and resumed, swiped into a wall and tapped PLAY AGAIN
Played on a phone
2026-11-11, a full game on a real phone before this page went live

Embed Bug Snake on your site

Free to embed. Please keep the credit link.

<div style="position:relative;padding-top:75%;max-width:640px"><iframe src="https://aivibecodedgames.com/games/bug-snake/" title="Bug Snake (free browser game)" style="position:absolute;inset:0;width:100%;height:100%;border:0" loading="lazy" allow="fullscreen" allowfullscreen></iframe></div>
<p><a href="https://aivibecodedgames.com/play/bug-snake/">Play Bug Snake free</a> on AI Vibe Coded Games</p>

How it was vibe coded

ToolCodex
Rounds of changes: 1
First committed2026-10-14

The opening prompt

Make a classic snake game with an original look: a glowing code-line snake eats bugs on a grid, grows, speeds up slightly every 5 bugs. Wrap-around walls off; hitting wall or self ends the run. Swipe controls on mobile, best score saved.

Game controls

  • Arrow keys / WASD or swipe to steer

The game brief includes touch controls for phones.

Open the game on its own

More games