Back to portfolio

Project

Snake

First project · 2018 (rebuilt 2025)

Canvas API
JavaScript
Next.js
TypeScript

Back in 2018, this was the very first game I ever built. I was sixteen, had just discovered JavaScript, and stumbled across Three.js while looking for ways to make something visual in the browser. I had no idea what I was doing - no framework, no tutorials beyond the docs, just a blank HTML file and a lot of trial and error.

The original version was rough: a flat grid, ugly colours, no score, and a game loop that ran way too fast. But it worked, and seeing something I had written actually move on the screen was the moment I knew I wanted to build software for a living.

This is a rebuilt version using the HTML5 Canvas API in a Next.js app. The visual style is intentionally minimal, a clean 2D grid that fits the rest of the site. The snake wraps around the edges instead of dying, which changes the strategy entirely.

Play

SCORE 0BEST 0

Arrow keys or WASD to start