# How do I define spawn patterns for a Fruit Ninja-esque game?

I'm creating a game somewhat similar to Fruit Ninja and others, where bombs are thrown up on the screen and you click or touch them to defuse (here is an example of the game).

There are four bomb spawn points and I want to pre-define launch patterns that are interesting and challenging to the player. I'm struggling to think of a good way of defining this data.

How can I pre-define launch times for up-to 4 spawn points in a way that the data is human-readable (so that I don't have to spend too long tweaking each value)?

• Do you need the order to be predefined? What about something randomly generated? Does the order need to be repeatable? Define "too long". – AttackingHobo Nov 15 '13 at 18:10
• – MichaelHouse Nov 15 '13 at 18:12
• @AttackingHobo I'd like to be able to design patterns that are interesting and challenging to the player. With randomly generated patterns it's hard to ramp the difficulty. – kicker Nov 17 '13 at 8:46
• With randomly generated patterns there are lots of ways to increase the difficulty over time. – AttackingHobo Nov 18 '13 at 1:16

I would use a strategy similar to one defined in this question and answer. The sequence for spawning these patterns of bombs is very similar since it will also be time and pattern based.

Alternatively, you can define these patterns in a custom format of your own. Using a text file to make things very simple. For example, with the 4 spawner example, you could have a text file like this to spawn various patterns:

 1

1 1

1   1

1     1

1     1

1 1

1   1

1   1

1


It would be simple to define different numbers of different types of bombs and add new lines for spacing. Additionally, some meta data about the tempo of how the pattern should play could be included at the top of the file.