One wet weekend morning, my 4 year old daughter and I were playing our nth round of Uno. There's no limit to how much Uno she can play but I wanted to do something different. So I suggested "wouldn't it be fun to make our own game?
We jumped on to the computer and started brainstorming. I asked her what
kind of game she wanted to make. She said "a chicken game" (Probably
brainwashed inspired by
Peppa Pig's Happy Chicken). I asked her what the chicken should do, and she said "it should walk
around a maze".
Using Claude Sonnet 3.7 as our "developer" and me as the "translator" the following is a summary of our journey. I tried to verbatim capture what my 4 year old said, adding context where I thought it necessary to get the game to a playable state.
This was a fun experiment, however my daughter quickly lost interest. My wife and I were blown away by how quickly we could get a working game - my daughter not so much - alas I fear this generation will just think this is how "development" is done...
Oops! Didn't work first go.
Ok the game kind of works, my daughter says:
I didn't think instructions were necessary, especially since she can barely read
My daughter moved the chicken around the maze and said:
After a few more play-throughs, my daughter noticed:
It was a little annoying to have to refresh the page each time
The "Happy Chicken" inspiration has two chickens walking around. I asked her what colour the other chicken should be .
Oops! The context window is getting a bit long. I manually split the game into seperate JS and CSS files. This may not have been necessary but I find LLMs are generally better with smaller files
Ok we're back to playing. The "AI" isn't very good though, as my daughter remarked:
I might need to be a bit more explicit:
I don't know where this inspiration came from but I like it:
The pathfinding was a little too good, so I added an option to turn off the red chicken
If Claude had feelings, they would have been crushed. Claude responded with a few suggestions, including adding a "fog of war"
And then my daughter's suggestion
Although the game was playable it wasn't sharable, so I hosted it to cloudflare and manually wrote this page to go with it. I then prompted claude one last time:
Which actually worked, it even added touch controls to simulate the keys.
After some feedback on HN I added touch controls so the game is playable on mobile. To preserve the integrity of the exercise above, I added these as seperate files to the original project (touch.css and touch.js)