← All embers

Snake Game

December 2020

My take on the classic — pink food, arrow keys, and a tail that ends you.

  • JavaScript
  • p5.js

A classic Snake game built with p5.js. Arrow keys steer the snake around the canvas; every bite of the pink food grows it by a segment, and colliding with your own tail resets you back to one.

One of my early creative-coding projects — a small, self-contained take on the timeless arcade game, rendered on an HTML canvas with the help of Coding Train.

The rules are the ones you know: the pink square is food, eating spawns the next one at a random cell, and the snake is constrained to the canvas edges. The only enemy is your own tail.

SPECTRE