Snake
Every missing page on bprigent.com is this game. Here it is on purpose. Press an arrow key or swipe to play.
Score 0
How it plays
The snake lives around a 404 drawn in blocks. Steer it with the arrow keys, WASD or a swipe, and eat the orange dot. The black border and the 404 are walls, and so is your own tail.
Every 5 points the snake gets 5% faster, and the gains compound. Every 10 points it turns rainbow for 15 seconds. Until someone presses a key the page plays by itself, and those games never count.
The high score is one number shared by everyone, on every site: a game played on the www 404, on staging, here or on the client portal all beats the same score.
How it was built
It is a single React component drawing on a canvas, with no game library. The board is always 48 cells by 22: lying down on a screen wider than tall, standing up with the digits stacked on one taller than wide. The cells and the walls are the same either way, so the best possible score is 828 on every screen. Before the first move it works out which cells the snake can actually reach, so food never lands inside the 0.
The colours are read from the site's design tokens rather than written into the game, and the score uses an arcade font loaded only where the game is. The game pauses itself when the tab is hidden, and the rainbow holds still for anyone who has asked their system for reduced motion.
The high score is one row in Supabase. Anyone can read it, but the only way to change it is a database function that accepts a score only if it beats the current one and could fit on the board. The game talks to it with two plain requests, so the page does not carry a database client.
The same component is the 404 page on www, staging, this app and the client portal. It was written with Claude Code.