Workshop › Tower Defense › Step 31 of 42
Later waves also come faster: the wait between two enemies shrinks by 2 frames each wave, down to 20.
```js
// Later waves come closer together, which is where splash damage shines.
spawnIn = Math.max(20, 46 - wave * 2)
```46 - wave * 2 is 44 in wave 1, 40 in wave 3, 26 in wave 10...Math.max(20, ...) picks the bigger of the two, so the wait never drops below 20 frames.In update, replace spawnIn = 45 with the comment and the new line.
Skills: Game states
← Stronger every wave Out of lives →