Snake:
Fill the Board

Classic Snake with a twist. Every piece of food you eat fills its cell for good, and the goal is to fill the whole board. Play solo for a high score, or race a friend for the food.

Two-player game in progress: a green snake and an orange snake crossing a dark grid with filled cells and red, green and blue food
Two-player mode, 3% of the board filled.

What is this?

A small Snake game written in Python with pygame. It also runs in the browser through pygbag, which is why you can play it on itch.io.

The rules are what set it apart from the usual version:

No dyingEdges wrap around, and snakes pass through themselves and each other.
Food fills the boardEach cell you eat from is filled permanently.
Win by filling itThe game ends when every cell is filled.

The food

Red circle · 1 point

Always on the board. Fills two cells when eaten (its own plus one random extra), so it is the fastest way to finish.

Green square · 5 points

Jumps to a new spot every 5 seconds and shrinks as its timer runs out. Fills one cell.

Blue triangle · 5 points

Appears each time the total score passes another 10 points. Gives a speed boost that stacks and wears off after 10 seconds.

The game speeds up as you score, so late-game fills get tense.

Modes and controls

ModeControlsHow it ends
1 PlayerP1 WASDFill the board and beat your best score.
2 PlayersP1 WASD   P2 arrow keysHighest score when the board fills wins.

Space pauses (1 player only). Q or Esc returns to the menu at any time. R restarts from the end screen.

Board sizes

Pick Small (15×12), Medium (30×25) or Large (45×35) on the start screen. Your best score is saved separately for each size in snake_highscore.json, next to the script.

Run it locally

You need Python 3 and pygame.

pip install pygame
python snake.py

Replace snake.py with the name of the script in this repo.

Make it yours

The tunable values sit at the top of the script with comments. You can change:

  • Board sizes, by adding a row to PRESETS
  • Starting speed and speed cap (FPS_START, FPS_MAX)
  • Blue boost strength and decay time (BLUE_BOOST, BLUE_DECAY)
  • How often green food moves (GREEN_CYCLE)
  • Every color in the game, in the colors block