# Tower defense endless levels logic sprite kit [closed]

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?

• 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? – Lysol Jan 11 '14 at 6:10
• 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. – 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)

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.