How to do an endless wave survival game.

zefrofzefrof Member Posts: 26
edited July 2012 in Working with GS (Mac)
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_SFXBraydon_SFX Posts: 9,273
    Accepted Answer
    I'll see if I can make a quick demo - please email me as I cannot do it now. Give me about 3 hours.

    Thanks
  • jn2002dkjn2002dk Posts: 102
    edited July 2012 Accepted Answer
    int 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

Answers

  • zefrofzefrof Member Posts: 26
    Nobody has ideas? This doesn't look good. . . .
  • zefrofzefrof Member Posts: 26
    Thank you @Braydon_SFX for the demo it has helped a lot! Thank you @jn2002dk very insightful.
  • GLGAMESGLGAMES SingaporeMember Posts: 988
    As you mentioned , you can track every waves' kills. simply have a condition in your actor which will be killed or destroy to +1 an int attribute every time it's destroyed. And also have a target kill amount. so when this integer = to target kill amount, go to next wave. Of course you have to increase the target kill amount for every wave but simply using when wave complete is true, target kill amount = target kill amount + 5 for example.
  • calolivarcalolivar Member Posts: 2
    I need to see this demo! I NEED to learn how to make this type of game.
This discussion has been closed.