2
\$\begingroup\$

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)?

\$\endgroup\$
  • \$\begingroup\$ Do you need the order to be predefined? What about something randomly generated? Does the order need to be repeatable? Define "too long". \$\endgroup\$ – AttackingHobo Nov 15 '13 at 18:10
  • 1
    \$\begingroup\$ Related: How to define data for an input sequence game? \$\endgroup\$ – MichaelHouse Nov 15 '13 at 18:12
  • \$\begingroup\$ @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. \$\endgroup\$ – kicker Nov 17 '13 at 8:46
  • \$\begingroup\$ With randomly generated patterns there are lots of ways to increase the difficulty over time. \$\endgroup\$ – AttackingHobo Nov 18 '13 at 1:16
1
\$\begingroup\$

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.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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