I am making a tower defense game for iOS using Sprite Kit. I would like for my game to support an endless number of levels, like in Bloons TD 5. What approach should I take to implement this?

  • \$\begingroup\$ It would help if you would give some more info such as: What are the dimensions of your level? Do you want your levels to be a fixed size? Do you want your levels to have multiple entrances or exits? \$\endgroup\$ – Lysol Jan 11 '14 at 6:10
  • \$\begingroup\$ Questions asking for lists of external resources, or for "how to get started" information, aren't appropriate here (see the help center). I removed those queries from your question as such. \$\endgroup\$ – Josh Jan 11 '14 at 17:48

By "endless levels" do you mean that there is no limit to the number of waves i.e. the waves keep coming until game-over?

If so then you need to develop an algorithm that takes the wave number as an input and returns an set of enemies suitable for that wave.

The most trivial of these would be to take the wave number and return a number of enemies or as peudocode:

function CreateWave(waveNumber)
    enemyList = new list
    for i = 1 to (waveNumer * 5)
    return enemyList

A more interesting approach would be to determine a difficulty rating for the wave, and a difficulty rating for each enemy type. Then you could add different enemies to the enemyList until you have reached the desired difficulty.


Not the answer you're looking for? Browse other questions tagged or ask your own question.