Wave defense works when the attack, the objective at risk, and the pause between attacks share one readable rule set. Start with a small arena, one enemy, and one player weapon. Then add the wave schedule and a single preparation choice. Check each pass against visible state changes before you expand the game.
Relay Ridge is a fictional, hand-resolved teaching design. No prompt in this article was run, and no generated or playable build or playtest is claimed. The three prompts are templates for a reader to try; the tables below give expected behavior to check on that reader’s own result.
Define the defense loop before adding variety
A first wave-defense shooter needs a player who can act, an enemy with a clear target, an objective that can take damage, and an end condition. Relay Ridge keeps those pieces in one top-down arena. The player protects a relay by firing at small drones that enter from two gates. A drone that reaches the relay deals one point of damage and disappears; killing it earns one scrap.
The initial state is a relay at 6 of 8 integrity and 0 scrap. The player starts below the relay, moves with WASD, aims with the pointer, and fires one pulse with Space. There is one enemy type, one hit point, and no enemy attack. Enemy contact with the player does nothing. These limits keep the first checks focused on aim, hit feedback, leaks, and the choices between waves.

| Rule | Relay Ridge contract | What to inspect |
|---|---|---|
| Player | Starts at (400,440); moves at 160 units per second; aims toward the pointer | Movement, facing direction, and pulse follow the chosen input |
| Pulse | Space fires at 400 units per second, with a 0.3-second cooldown and 1 damage | A hit removes a 1-HP drone; a miss changes neither enemies nor scrap |
| Enemy | Moves straight from a left or right gate toward the relay at (400,250), at 30 units per second | It does not attack the player or pathfind around obstacles |
| Relay | Starts at 6/8 integrity; each leak removes 1, and 0 causes immediate defeat | One leak costs exactly one integrity and gives no scrap |
| Reward | Each player or sentry kill awards exactly 1 scrap once; scrap starts at 0 and carries | No reward for a miss or a drone that reaches the relay |
This is a prompt-design example, not a broad tower-defense plan. It does not add enemy attacks, redirectable projectiles, spell combinations, a boss, or an upgrade hub. The one repair-or-sentry decision is there to make the prompt sequence concrete; it is not a progression catalog.
Prompt the arena and first wave
Ask for one arena and one wave first. The prompt sets the geometry, starting state, controls, and the single way an enemy can hurt the objective. Keep its output small enough to inspect: can the player move and fire, does one hit remove a drone, and does a leak subtract one relay point? Do not ask for later waves or intermission choices until those behaviors are visible in your own result.
Create a 2D top-down defense shooter in an 800×500 arena. Put a relay at (400,250), enemy gates at (0,250) and (800,250), and the player at (400,440). Start relay integrity at 6/8 and scrap at 0. Move the player with WASD at 160 units/second, aim toward the pointer, and fire one Space pulse at 400 units/second with a 0.3-second cooldown; each pulse deals 1 damage. Add one enemy type with 1 hit point that travels directly toward the relay at 30 units/second. Wave 1 has five enemies, spawning at 0, 0.8, 1.6, 2.4, and 3.2 seconds, alternating left/right starting left. A killed enemy gives exactly 1 scrap; an enemy that reaches the relay removes 1 integrity and gives no scrap. Show relay integrity, remaining wave enemies, and scrap. End this wave when all five enemies are killed or have reached the relay. Do not add later waves, upgrades, a sentry, enemy attacks, obstacles, or random rules. Add Restart to restore this exact first-wave state.
After the first pass, inspect one deliberate hit and one miss. A hit should remove the one-hit-point drone and add one scrap exactly once. A pulse that misses should not remove another drone, change relay integrity, or award scrap. Also allow one drone to arrive at the relay: it should disappear, lower integrity by one, and add no scrap. These are checks for a future result, not observations from this package.
Add wave timing and relay damage
Once the first pass has the right state changes, extend the schedule without changing controls or enemy behavior. The first drone in each wave appears at time zero, then one appears every 0.8 seconds, alternating gates from the left. The last spawn arrives at 3.2 seconds in wave 1, 4.8 seconds in wave 2, and 6.4 seconds in wave 3. Those are spawn times only; each drone still moves toward the relay until it is hit or leaks.
| Wave | Drones | Spawn interval | Last spawn |
|---|---|---|---|
| 1 | 5 | 0.8 seconds, starting at t=0 | 3.2 seconds |
| 2 | 7 | 0.8 seconds, starting at t=0 | 4.8 seconds |
| 3 | 9 | 0.8 seconds, starting at t=0 | 6.4 seconds |
After waves 1 and 2, wait until every drone has either been killed or reached the relay, then pause spawning for four seconds. Let the player make at most one affordable preparation choice during that pause. Wave 3 has no final intermission: once its last drone is removed, finish immediately with victory if relay integrity is above zero. If integrity reaches zero at any point, show defeat immediately.
Keep every existing Relay Ridge control, speed, enemy, gate, hit, and wave-1 rule unchanged. Add waves 2 and 3 with seven and nine enemies. At each wave, spawn at t=0 and every 0.8 seconds, alternating gates starting left. After waves 1 and 2 end because all enemies are killed or reach the relay, begin a four-second intermission and pause spawning. Keep one scrap per kill and no scrap for a leak. During an intermission allow one repair action: spend 3 scrap to restore 2 relay integrity up to 8. Disable repair at 8/8 without charging scrap. Carry remaining scrap and relay integrity into the next wave. After one purchase or the four-second timeout, start the next wave. Defeat immediately at 0 integrity; clear wave 3 above 0 for immediate victory, with no final intermission. Do not add a sentry yet. Show the current wave and result clearly.
Check the count and timing display separately from the combat. Wave 2 should list seven drones with its final spawn at 4.8 seconds; wave 3 should list nine with its final spawn at 6.4 seconds. A leak is an enemy removal event, not a kill reward. If the last drone leaks and the relay remains above zero, the wave is over; if that leak takes integrity to zero, defeat takes precedence immediately.
Make the between-wave choice change the next wave
The intermission is a decision point, not a decorative screen. Relay Ridge offers a repair for 3 scrap or a one-time sentry for 4. After a clean wave 1, five kills mean 5 scrap and the relay stays at 6/8. Repair spends 3, raises integrity to 8, and leaves 2 scrap. The sentry spends 4 and leaves 1. At 8/8, repair is disabled without a charge. State the costs, cap, and no-purchase behavior before asking for more enemy types.

The sentry goes on the fixed relay pad at (400,250), can be bought once per run, and instant-hits the nearest drone within 140 units for one damage every second. No target in range means no shot. A sentry kill awards one scrap once, just like a player kill; a drone that reaches the relay earns none. Keeping the pad fixed makes the range check repeatable and avoids a second placement system.
Keep every current rule unchanged. Add one alternative intermission action after waves 1 and 2: spend 4 scrap to deploy a sentry on the relay pad at (400,250), at most once per run. Every 1 second it instant-hits the nearest enemy within 140 units for 1 damage; with no enemy in range it does nothing. A sentry kill awards exactly 1 scrap once. During each four-second intermission allow at most one affordable action, repair or sentry; unused scrap carries. If no choice is affordable, let the timer end normally. After a purchase or timeout, start the next wave. Persist the sentry through later waves. Clearing wave 3 ends the match immediately, with victory above 0 relay integrity and defeat at 0. Restart must reset wave index, enemies, projectiles, player position, relay to 6/8, scrap to 0, sentry availability, and intermission timer. From a fresh wave-1 state, confirm repair spends 3 of 5 scrap and raises integrity to 8; after another fresh start, confirm sentry spends 4 of 5 and appears in wave 2. These are checks to run, not results already observed.
Keep restart complete and predictable. It returns the relay to 6/8, scrap to 0, the player to the original location, and the sentry to available. A reset that only clears the wave counter but preserves spent scrap would make the two purchase checks incomparable.
Check the state, then repair one rule at a time
Use the contract as an acceptance list for your own build. Record the starting state and the action before judging the result; then compare only the fields that action can change. The examples below are hand-resolved expected values, not a report of observed gameplay.
- Start: relay 6/8, scrap 0, player at (400,440), no sentry.
- Kill all five wave-one drones: relay stays 6/8 and scrap becomes 5.
- Choose repair: spend 3 scrap, raise integrity 6→8, and keep 2 scrap. At 8/8, repair should be unavailable and cost nothing.
- Restart and choose sentry: after the same five kills, spend 4 scrap and retain 1. The sentry should appear at (400,250) and persist into wave 2.
- Check a leak: integrity drops by one, the drone disappears, and scrap does not change.
- Finish the run: zero integrity means immediate defeat; clearing wave 3 above zero means immediate victory, with no final pause.
If your own observed result awards scrap on a missed shot, a narrowly scoped repair request could say: “Keep the arena, controls, wave schedule, relay damage, and sentry rules unchanged. Correct only the pulse-hit reward condition: award one scrap once when a pulse removes a one-hit-point drone; do not award scrap for a miss or a relay leak. Show the changed condition and list the hit, miss, and leak checks that must be rerun.” This is a hypothetical example of how to request a repair, not a finding from a run here.
Do not ask a model to declare the system fixed without an observation. Before you have a build, the expected-value table is a paper contract. Once you inspect a real result, write the first mismatch, request one change, and rerun the affected checks. Leave any state you could not observe marked unverified.
Review your own result

This target scene shows the sentry branch; it is not an observed win or generated game. The current official Free AI game maker page describes plain-English prompts, a playable 2D or 3D first result that can be tested in the browser, and follow-up prompts for iteration. Before submitting, review the selected model, available Koin balance, and displayed generation cost. These general workflow steps do not establish that Relay Ridge’s wave timing, scrap, or sentry rules have been generated or tested.
Keep the first project small enough to verify: one relay, one weapon, one drone, then the schedule and one preparation choice. A clean state record gives you a better next prompt than a long feature list.
Frequently asked questions
Which rule should I define first?
Define what the enemy targets and what a leak costs before adding more enemy behavior. In Relay Ridge, drones move straight to the relay, each leak removes one integrity, and a kill awards one scrap. Once those outcomes are clear, player speed, pulse timing, wave cadence, and preparation choices can be checked against the same objective.
Why split the design into three prompts?
Separate prompts make it easier to see which change introduced a mismatch. The first requests the arena and wave one, the second adds the wave schedule and repair pause, and the third adds the sentry. Preserve earlier controls and rules each time, then inspect the new behavior before extending the design further.
Can a drone reaching the relay still end a wave?
Yes. In this contract, a leak removes that drone from the wave and costs one relay integrity without awarding scrap. The wave ends when every drone has either been killed or reached the relay. If integrity reaches zero, defeat happens immediately; otherwise the first two waves enter the four-second intermission.
How do I compare repair and sentry costs?
Start with the same fresh wave-one state each time: relay 6/8 and zero scrap. Five kills yield five scrap. Repair spends three, restores two integrity up to eight, and leaves two scrap; the sentry spends four, appears at the fixed relay pad, and leaves one. Treat these as expected values to check, not measured results.
Have these prompts or Relay Ridge been tested?
No. Relay Ridge is a fictional hand-resolved example, and the prompts in this article are templates rather than recorded model runs. No generated build, playable result, or playtest is available here. Use the numbers as an acceptance target for a future result, then report only behavior you actually inspect.


