Skip to content
AI-powered appsNewChat, vision, voice, generationBookings & schedulingAppointments that book themselvesShops & sellingA storefront in every pocketClient & businessRun the operation from one placeCommunities & clubsA home that is not a group chat
Health & wellnessHabits, tracking and calmGames2D, 3D and multiplayerPersonal & toolsThe tool you wish existedInternal toolsThe tool ops never had time for
See all use cases
ArcadeNewPricingSecurity
EngineThe game engine and World EditorHow it worksFrom one sentence to a live productDocsGuides for building and publishingBlogStories, guides and newsChangelogWhat shipped latelyStatusUptime of every serviceSupportGet help from the team
AI-powered appsBookings & schedulingShops & sellingClient & businessCommunities & clubsHealth & wellnessGamesPersonal & toolsInternal tools
See all use cases
ArcadeNewPricingSecurity
EngineHow it worksDocsBlogChangelogStatusSupport
Language
Blog
Game mechanicsNovember 22, 20266 min read

Enemy Waves and Spawners

Waves are the pacing engine of arena games, tower defense and survival modes. Here is how to describe them as data and keep them fair.

Startbase Team
Editorial ink illustration of wind-up tin soldiers lined up at a small wooden gate, the turning key in ember orange

Key takeaways

  • Describe waves as data: a hand-written table for the first waves, then a point budget that grows 10 to 20 percent per wave and buys enemies by cost.
  • Spawn where the player can react: off screen but close, at least a few character widths away, with a half-second warning in closed arenas.
  • Plan for stragglers and counting bugs: enemies that split, flee or get stuck are why waves never end.

An enemy wave system decides what attacks the player, how many, from where and when. The reliable way to build one is to describe waves as data (a table of enemy types, counts and timing), spawn enemies where the player can see them coming, cap how many are alive at once, and define exactly when a wave counts as finished. Hand-write the first few waves to teach each enemy, then let a growing budget generate the rest.

Our top-down shooter guide introduces discrete waves versus continuous pressure. This article goes into the machinery underneath: tables, budgets, spawn points, directors and the bugs that keep a wave from ending.

Waves as a table

A wave is a list of spawn groups. Each group has an enemy type, a count, a delay from the wave start, an interval between individual spawns and a spawn pattern. Written as data, the first wave of an arena game might be:

  • Group 1: 6 walkers, start at 0 s, one every 0.8 s, from the nearest two spawn points.
  • Group 2: 4 walkers, start at 6 s, all at once, in a ring around the player.
  • Group 3: 1 shooter, start at 10 s, from the farthest spawn point.

Data like this can be balanced by editing numbers, read by a designer at a glance and shown to an agent in a brief. Keep groups small (3 to 8 enemies). Sending a wave as several overlapping groups creates a rhythm of pressure and relief inside the wave instead of one block of enemies.

Teach, then mix

Hand-write at least the first five to ten waves. A new enemy type should appear alone or with the weakest enemy, the player should beat it once, and only then should it mix with others. In a tower defense game, the same rule teaches which towers counter which enemy. Our difficulty curve guide covers the overall shape: a ramp with dips after peaks rather than a straight line.

Budgets for the waves after that

Hand-writing fifty waves is slow and hard to balance. Most endless and survival modes switch to a spawn budget after the scripted opening:

  1. 01Each enemy type has a cost that roughly reflects its threat: walker 1, runner 2, shooter 3, tank 6, elite 12.
  2. 02Each wave gets a budget, starting around the value of the last hand-written wave and growing 10 to 20 percent per wave. Growth of 15 percent doubles the budget about every five waves.
  3. 03The wave buys enemies from the types unlocked so far, with weights (cheap enemies more common), until the budget is spent.
  4. 04Every fifth wave is special: an elite, a horde of the cheapest enemy, or a boss. Players remember those.

Budgets stay balanced because the total threat grows smoothly even when the mix is random. Add a minimum and maximum count per type so a wave never rolls twelve tanks or zero of the enemy the wave is meant to feature.

Where enemies appear

  • Off screen, but close. In scrolling games, spawn in a ring just outside the camera view, roughly 50 to 150 pixels beyond the edge, so enemies arrive within a second or two.
  • Never near the player. Reject spawn positions within a minimum distance (several character widths, often 200 to 300 pixels at 720p). Spawning on top of the player is the most hated wave bug.
  • Telegraph in closed arenas. When the whole arena is on screen, show a marker (a glowing circle, a crack in the floor) for 0.5 to 1 second before the enemy appears.
  • Validate the spot. Check that the position is walkable and not inside a wall or a pit. On a tile map, pick from a list of floor tiles; with physics, test for overlap before spawning.
  • Prefer fixed spawn points in designed levels. Doors, holes, portals. They give players something to watch and let level design control where pressure comes from.

Pacing inside and between waves

  • Live cap. Limit enemies alive at once (for example 30 on phones, more with simple sprites). When the cap is reached, the spawner waits. This protects frame rate and readability; raise pressure past the cap with tougher enemies instead of more.
  • Intermission: 5 to 15 seconds. Long enough to collect drops, heal or pick an upgrade. Show a countdown, and let the player skip it with a button once they are ready.
  • Wave start announcement. A short banner ("Wave 7") and a sound. If the wave has a twist, say it: "Fast wave".
  • Continuous modes replace waves with a spawn rate that rises over time (for example from one enemy every 2 seconds to one every 0.3 seconds over ten minutes), with scripted spikes every minute or two.

When does a wave end?

Two rules exist: all enemies dead (arena and tower defense) or timer (survival modes, where the next wave arrives on schedule whether or not you are done). "All dead" is simpler to understand but has a famous problem: the straggler. One enemy is stuck behind a rock, fleeing, or off screen, and the player wanders around looking for it.

  • Show arrows at the screen edge pointing to the last few enemies (when 3 or fewer remain, or after 20 seconds with no kills).
  • Pull them in. After a timeout, switch stragglers to chase the player directly, or teleport stuck ones to a spawn point.
  • Count correctly. The wave is over when spawning is finished AND alive count is zero. Checking only the alive count ends waves during a gap between groups.
  • Count children. Enemies that split or summon must add to the alive count. A splitter whose halves are not counted lets the next wave start with enemies still alive; one whose halves are counted but never decremented means the wave never ends.

Spawners as enemies

A spawner can also be an object in the world: a nest, a portal, a generator that produces enemies until destroyed. This turns spawning into a target. Typical values: one enemy every 3 to 5 seconds, a cap of 4 to 6 children alive per spawner, and health that takes a few seconds of focused fire. Spawners create priority decisions (kill the nest or clear the swarm?), which is the same role orbiters and summoners play in our enemy AI guide. Spawners should stop when the player is far away, or they fill unseen corners of the map.

A simple director

Some games adjust spawning to how the player is doing, often called a director. A light version is enough: if the player is below 30 percent health, delay the next group by a few seconds and slightly raise healing drops; if they cleared the last wave very fast, add 10 percent to the next budget. Keep the adjustments small and invisible. Big swings make the game feel like it is reading your mind, which players notice and dislike.

Other bugs to expect

  • Double wave start. The "wave complete" check runs on two frames in a row and starts two waves. Use an explicit state machine: spawning, fighting, intermission.
  • Spawning while paused. Spawn timers must use the game clock, not real time.
  • Spawning during the player's death. Stop or pause spawners while the player is dead or respawning.
  • Frame rate cliffs. Creating enemy objects mid-wave causes stutters on phones. Pool them. See making games smooth on phones.

A brief to paste

Add a wave system to my top-down arena game. Waves 1 to 6 are hand-written as data (enemy type, count, start delay, interval, pattern). From wave 7, use a budget that starts at 20 and grows 15 percent per wave, buying enemies by cost (crawler 1, spitter 3, brute 6) from the types unlocked so far, with min and max counts per type. Every fifth wave is a brute horde. Spawn just outside the camera, never within 250 px of the player, only on floor tiles; in the closed boss room show a glowing marker for 0.7 s first. Cap live enemies at 30. A wave ends when spawning is done and none are alive, counting split children. When 3 or fewer enemies remain, show edge arrows to them. Intermission 8 s with a countdown and a Ready button. Use a state machine for spawning, fighting and intermission, the game clock for timers, and pooled enemies. Expose the budget, growth, cap and intermission as dials.

Frequently asked questions

How do I make enemy waves get harder over time?

Give each wave a point budget that grows by 10 to 20 percent per wave and let it buy enemies by cost, while unlocking new enemy types at set waves. Add a special wave every few waves for variety.

Where should enemies spawn?

Just outside the visible screen in scrolling games, or at visible spawn points with a short warning in closed arenas. Always enforce a minimum distance from the player and check the spot is walkable.

Why does my wave never end?

Usually a counting bug (split or summoned enemies not tracked correctly) or a straggler stuck out of reach. Count every spawned enemy, end the wave only when spawning has finished and none remain, and pull stragglers toward the player after a timeout.

On this page

  • Waves as a table
  • Budgets for the waves after that
  • Where enemies appear
  • Pacing inside and between waves
  • When does a wave end?
  • Spawners as enemies
  • Other bugs to expect
  • A brief to paste

Keep reading

More in Game mechanics
Editorial ink illustration of a wooden toy figure in mid-air above a gap, the puff cloud under its feet in ember orange
Game mechanicsNovember 22, 2026

How to Add a Double Jump to Your Game

A double jump is one counter and one reset rule, but the details decide whether it feels like control or like cheating. Here are the values and the bugs to watch for.

8 min read
Editorial ink illustration of a small figure streaking along a stone floor with faded ghost copies behind it, the front figure's scarf in ember orange
Game mechanicsNovember 22, 2026

How to Add a Dash Move

A dash is a short burst of fixed speed that overrides normal movement. Get its distance, its ending and its refill rule right and it becomes the move players use most.

7 min read

Read less. Ship more.

Everything in this post is one prompt away. Describe your app and watch it build.

Start building

Apps, games, backends and publishing from one conversation.

Product

  • Features
  • Use cases
  • Pricing
  • Changelog

Resources

  • Blog
  • Docs
  • Support
  • Status
  • Security

Contact

  • w@startbase.ai
  • X / Twitter
  • LinkedIn
  • Instagram

Legal

  • Terms
  • Privacy

© 2026 Startbase. All rights reserved.