How to do an endless wave survival game.
zefrof
Member Posts: 26
I'm wanting to do an endless survival game like nazi zombies. I want it to track waves, know when a wave is over, add more enemies each wave, and do it continuously so there could be any number of waves. The only thing I can think of is tracking the number of enemies killed and when that number reaches a certain amount have the next wave start. The problem with that I would have to input the amount of enemies that need to be dead, there by not having unlimited waves. Any ideas?
Best Answers
-
Braydon_SFX Posts: 9,273I'll see if I can make a quick demo - please email me as I cannot do it now. Give me about 3 hours.
ThanksMy GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
-
jn2002dk Posts: 102int wave=1
int localwave=wave
boolean nextwave=true
If nextwave= true then localwave=wave and spawn localwave*x enemies and set nextwave=false
When an enemy is killed localwave=localwave-1
If localwave=0 wave=wave+1 and nextwave=true
That would add 1 enemy to each new wave. From there you could do variations of that for example by using weighted randoms to add bigger enemies or what ever you want
This discussion has been closed.
Answers