DEV Community

Cover image for Advent of AI 2025 - Day 2: Building a Winter Festival Game
Nick Taylor
Nick Taylor Subscriber

Posted on

Advent of AI 2025 - Day 2: Building a Winter Festival Game

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

Winter Festival Game

Check out the repo to see the game and full PRD.

GitHub logo 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;
Enter fullscreen mode Exit fullscreen mode

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);
Enter fullscreen mode Exit fullscreen mode

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!

Photo by ๐Ÿชท ๐Ÿ„ on Unsplash

Top comments (0)