NULLPOINT: Christmas Edition — Festive Synth Music, Smarter Enemy Spawning, and a Replay System

When I shipped the original NULLPOINT, it was a 360-level browser FPS crammed into a single HTML file. It worked. It ran at 60 FPS on mobile. But it had rough edges.

This month I shipped a Christmas Edition update — and it's not just a coat of paint. It's a full festive makeover, a major bug fix, and a new replay system. Here's what changed and why.

The Soundtrack: Jingle Bells, Procedurally Generated

The original game had a procedural action track — a 150 BPM loop in A minor with a driving bassline, kick drum, hi-hats, and a square-wave arpeggio. It was fine, but it was generic.

For the Christmas update, I rewrote the music engine to layer a full 8-bar arrangement of "Jingle Bells" over the existing chord progression. The melody uses E5, F5, G5, C5, and D5, and it's scheduled the same way as everything else in the game — no external audio files, no loading time.

I layered a triangle-wave melody, a sawtooth bassline, and a high-pass noise burst for sleigh bells on the off-beats. The result is a festive, driving track that plays across all the menus, the shop, and the tournament screen. It's the kind of thing that sounds simple until you realize it's running entirely inside a single HTML file with zero external assets.

Fixing the "Through the Wall" Bug

The original game had a subtle problem that only showed up when playing at higher difficulty.

Enemies were spawned using a simple helper that checked if a random point was inside an empty cell. This worked for the basic enemy type — its hitbox was small enough that it would always fit in a corridor. But as the game progressed, larger enemies appeared: Tanks, Heavies, and the massive Bosses.

A Boss has a collision radius of roughly one cell. A random "free" cell in a one-tile-wide corridor is not actually free for a Boss. The result: Bosses could clip through walls, get stuck in corners, or spawn in a section of the map the player couldn't reach.

The fix was a new size-aware reachability flood fill. Instead of checking a single point, the game now runs a flood fill from the player spawn at 0.2-cell resolution, using the enemy's actual collision size as the probe radius. If an enemy's body can't physically walk from the player spawn to a given cell, that cell is marked unreachable.

Then, when spawning a wave, the game filters through this reachability data. The result: every enemy that spawns is guaranteed to be able to reach the player, no matter its size. The bug is gone.

There's a performance cost — the first time a size class is used on a map, the flood fill runs. On a 28×28 map, that's about 19,600 cells to visit. It runs in a few milliseconds, and the result is cached per map and size class so subsequent waves reuse it.

A New Replay System

The Christmas update adds two new scenes to the state machine: a replay list and a replay viewer.

The replay system records player position, angle, and key events at a fixed tick rate during a level. After the level ends, the player can watch a "ghost" of their run in real time — or, more usefully, watch a highlight reel that skips ahead to the biggest moments.

The core idea is a lightweight event log rather than full frame-by-frame recording. Because the map is deterministic (seeded by level index), the replay only needs to store the player's path and the RNG seed — not the full world state. A 60-second level replays in about 30 KB of data.

The replay view scene reconstructs the world from the seed, then drives the player position from the log. It runs through the same renderer as the game itself, so the replay looks identical to live gameplay.

The Other Festive Touches

Smaller additions rounded out the update:

  • Christmas-themed menu accents. The main menu now shows a subtle snow particle effect using the Limn particle system.
  • Holiday music on menu scenes. The action track only plays during gameplay. Menus, the shop, the replays screen, and the tournament all use the new Christmas-themed track — which includes the Jingle Bells melody.
  • Sleigh-bell SFX on UI clicks, layered under the existing click tone. It's subtle, but it sets the mood.

What's Next

The Christmas Edition is live now. Here's what I'm working on next:

  1. Pre-computing reachable cells during map generation so that no enemy size class has a first-spawn stutter on mobile.
  2. A proper audio crossfade so the menu-to-game transition doesn't abruptly cut the music.
  3. More daily modifiers for the challenge mode — currently there are three (Glass Cannon, Iron Skin, Pistol Only), and I want to add at least two more.

Play NULLPOINT Christmas Edition here: https://playgama.ai/play/wzjgoajobs42lh

Everything is in a single index.html and a single epic.js — zero external dependencies.

Happy holidays, and enjoy the Jingle Bells.