I've edited this post, but AI helped. These are meant to be quick posts related to the Advent of AI. I don't have time if I'm doing one of these each day to spend a couple hours on a post. ๐
For Day 2 of the Advent of AI challenge, I built an entire winter-themed choose-your-own-adventure game as per the guidelines of Day 2 of Advent of AI.
What I Built
A browser game featuring:
- Christmas elf character you can move around with arrow keys
- Three magical portals leading to different story paths
- Six unique endings based on your choices
- Falling snow effects
- Background music MIDI style that plays "Jingle Bells"
- All in a single HTML file with esm imports using script tags with type attribute module
Check out the repo to see the game and full PRD.
nickytonline
/
advent-of-ai-2025
Advent of AI 2025 for nickytonline
Daily Fortune ๐ฎ
Generated with love (and a bit of sass) by the Fortune Generator!
+โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ+
โ ๐ฎ FORTUNE COOKIE WISDOM ๐ฎ โ
โ โ
โ Mood: SARCASTIC โ
โ โ
โ The stars say you're destined for greatness. The stars are probably lying. โ
+โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ+
+โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ+
+โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ+
โ ๐ฆ SASSY GOOSE SAYS ๐ฆ โ
โ ใใใใใใใใใใ ๏ผฟ๏ผฟ โ
โ ใใใใใใใใใ๏ผใใ๏ผผ โ
โ ใใใใใใใใ๏ฝใโใโ๏ฝ โ
โ ใใใใใใใใ๏ฝใใใ๏ผ ๏ฝ *honk* โ
โ ใใใใใใใใ๏ฝใใ๏ผฟ๏ผฟ ๏ฝ โ
โ ใใใใใใใใ๏ผผใใใใ๏ผ โ
โ ใใใใใใ ๏ผฟ๏ผ๏ฝใใใ๏ฝ โ
โ ใใใใใ๏ผใใ๏ฝใใใ๏ฝ โ
โ ใใใ ๏ผใใใใ๏ผผใใใ๏ฝ โ
โ ใใ๏ฝใใใใใใ๏ฝใใ๏ฝ โ
โ ใใ๏ฝใใใใใใ๏ฝใใ๏ฝ โ
โ ใใ๏ผผ๏ผฟ๏ผฟใใใ๏ฝใใ๏ฝ โ
โ ใใใใใ๏ผผ๏ผฟ๏ผฟใใใ๏ฝ โ
โ ใใใใใใใใใใใ๏ฝ๏ฝ โ
โ ใใใใใใใใใใใ๏ฝ๏ฝ โ
โ ใใใใใใใใใใใ๏ผต๏ผต โ
+โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ+
Generated on: today (probably)
The Build Process
I started by asking Goose to create a PRD from my rough ideas. I wanted an 8-bit Zelda-style game where you walk around and interact with portals to make story choices. It tooks some trial and error. I initially started with kaboom.js which the model suggested, and then we finally landed on phaser.js
Phaser.js Import Drama
The first version tried using Phaser's ESM imports. Didn't work. We switched to the standard CDN version with the global Phaser object, which turned out to be way more stable for a single HTML file approach.
The Frozen Game Bug
At one point, pressing SPACE near a portal would freeze the entire game. Turns out it was a context issue with this.scene in the update loop. The fix was simple but not obvious:
// Added explicit scene reference
const scene = this;
Now portal navigation works perfectly.
Sprite Layering Issues
The elf character kept appearing behind the portals, which looked terrible. Fixed it by setting the depth explicitly:
player.setDepth(1000);
All these issues were solved just chatting with the models.
Final Current Product
Programmatic Sprites: No external assets needed. The elf, portals, and all visual elements are drawn with code. The elf has a red Santa hat, green tunic, and even rosy cheeks, all procedurally generated.
Web Audio API Music: Instead of loading audio files, the game synthesizes "Jingle Bells" using the Web Audio API. It has proper ADSR envelopes and everything. You can toggle it with the M key or adjust volume in settings.
Settings Menu: I added a collapsible settings panel with a gear icon. It slides down smoothly, shows your save info, and lets you control music. The glassmorphism effect looks pretty slick.
Save System: The game auto-saves your progress on every scene transition. When you come back later, you get a dialog asking if you want to continue or start fresh. It even shows how long ago you saved.
Key Learnings
This is the first time I really leverage Goose's developer extension. I didn't realize it could read the screen! I'm guessing Playwright in action but I didn't really dig into it.
What's Next
Not sure how deep I'll get into Advent of AI, but Day 2 was fun so I'll try to keep at it. Building an entire game in a an hour with AI assistance would have taken way longer without Goose.
Even if you missed the first two days, jump in now! Head over to AdventOfAI.dev and see what you can build.
You can follow along with my Advent of AI 2025 repo or catch me on any of my socials at nickyt.online.
Until the next one!

Top comments (0)