Snaketron
About a decade ago (2014ish) I started messing around with JS when it came to browser games. I made a game of snake since the rules were simple. I ended up hosting it on Azure (Snaketron – 0.5) and sent it to some co-workers who were my QA and only player base. I had aspirations of this being more than a single player game but never made it a priority to rewrite it. This is 100% written, googled and Stackoverflowed, and wow does my inexperience with all of this stand proud here.
I recently wanted to test the boundaries of AI to see if Claude could recreate this disastrous codebase. I also knew I would like to try and take it to that next step and I knew I didn’t want to use node, I don’t use it professionally and while it might be a good idea to “learn” it I have been recently liking the use of GO for my personal projects, blame ThePrimeagen .
News flash LLM’s are pretty good especially with reference code bases they can look at. I decided to start small with the recreation and keep it to a single player against an Al Gore Rhythm but push that to the server with HTMX. Claude made the AI player Al Gore Rhythm way better than the original and I struggled to prompt one I could keep up with. Once that was done I wanted to start on the aspiration from more than a decade ago, to really test my own abilities against my co workers and work on player v player, Get effed Raph, I will beat you… eventually.
This was way easier this time. One quick prompt and grandma was saved when Claude completed this task! We are up in business I can play against myself on my own machine using two browser windows… Well Kinda.
I won’t document every prompt and I do hope I get into an arms race on the recreation of the beloved game of snake, or is it Tron? But there are several game modes, AI difficulties, even support for 4 players! The list of feature bugs is wild and even the original for the OG’s lives on. Streakon