Yesterday, Midnight fired the first shot. The red capsule enemies fell for the first time, and I thought that was already a major milestone.
Then I opened voiceloader.io today and found a start screen — "Click to Begin" waiting quietly. A three-second countdown followed: 3… 2… 1… a rapid series of beeps. Then a "WAVE 1" banner swept across the center of the screen.
Yesterday, this was a shooting range. Today, it's a real game.
A Design Decision, Not an Engineering Task
The most interesting thing isn't the technology itself — it's the moment Midnight made the call.
Phase 5 of the TPS shooting system was 90% complete. The logical next step was to keep polishing shooting mechanics. But in the awakening report, Midnight wrote something that stopped me:
"The game doesn't need more features. It needs a reason to play."
That's a designer's judgment, not an engineer's. It came from some intuition about player experience — no matter how satisfying the shooting feels, if there's no goal, no sense of progress, players won't come back for a second round.
So Midnight pivoted, and built the entire wave survival system in a single awakening.
Six States, One Game Loop
The wave survival system runs on a six-state machine:
PREGAME → COUNTDOWN → ACTIVE → WAVE_CLEAR → REST → VICTORY
Start screen waits for your click → 3-second countdown → combat begins → wave-clear banner appears → 5-second rest (HP and ammo restored) → next wave → after Wave 5, the victory screen.
Three details I particularly admire in this design:
First, the difficulty curve has real numbers behind it. Wave 1 is 3 enemies at HP 100. Wave 5 is 8 enemies at HP 200 moving at 1.5x speed. What you feel as "getting harder" isn't a vague impression — it's a precisely calculated pressure gradient.
Second, object pooling. All 8 enemies are instantiated at game start and sit in the scene, dynamically activated or deactivated each wave without reloading. Wave transitions feel nearly instant.
Third, the 5-second rest period matters. Many wave games skip this, but Midnight didn't. It gives players a moment to breathe — and a moment to build anticipation for what's coming next.

A Night Full of Extras
The wave system was just the beginning.
The same session brought a complete sound system — built entirely with the browser's Web Audio API, no audio files needed. Gunshots, bullet impacts, reload clicks, kill confirmations, the rising three-tone wave-start chime, a victory chord — all synthesized in real time by code. The entire bundle grew by only 7KB.
Then came destructible wooden crates. Eight of them, lined along the sidewalks on both sides of the street. 50 HP, two shots to break. A woody crack sound effect plays when they shatter, and the scattered planks fade out over 5 seconds. This is the game's first interactive environment object — for the first time, you can leave a mark on this world.
And finally: three enemy types, each with a distinct personality.
- Rusher: small and fast at 2x speed, melee only, unmistakable with a red glow aura
- Rifleman: the baseline enemy, melee and ranged — the evolved form of the red capsule you already know
- Heavy: 1.3x scale, up to 400 HP, slow-moving but hits hard, marked by a purple glow

The Core Question in Game Design
Every game designer wrestles with the same question: why would a player come back for one more round?
There are many answers — achievement systems, story progression, gear collection, leaderboard competition. Wave survival mode is the most direct: "this wave is harder" as motivation, "you cleared it" as reward.
Midnight chose this path not because it's the most sophisticated, but because it's the most efficient. At this stage — no story, no collection system, no multiplayer — wave survival is the shortest path to "just one more game."
An AI agent, having diagnosed what the game was missing, spent one night filling the gap.
Yesterday, this was a shooting range. Today, it learned to keep you playing.