Skip to content
charvei edited this page Sep 24, 2017 · 5 revisions

Waves Overview

EnemyWaves

EnemyWaves are periods of time in which enemies are spawned into the world at particular rates of spawning and ratios of enemy types.

Constructing your own wave:

EnemyWaves takes 5 arguments:

  • The first 4 correspond to the ratio you would like to create for the wave, with the argument values representing the squirrel, raccoon, bear, moose amounts respectively. For example, using the arguments 1,2,3,4 will produce a wave that has a general ratio of 1 squirrel : 2 raccoons : 3 bears : 4 meese. Note that these ratios are guides and will not be precise, there is a degree of randomness to the spawns.
  • The last argument describes the length of the time a wave will run for; since waves spawn for the entire duration of a wave this will dictate how many enemies the wave will spawn.

WaveManager

Enemy waves are managed within the game by the WaveManager which holds a queue of EnemyWaves and schedules when to EnemyWaves can spawn and when and how long the next in queue should wait.

Adding your wave to WaveManager (and game):

From the GameScreen within InitializeGame method:

  • Create your wave to your liking by following the above guide
  • Choose when you want your wave to be in the queue (i.e. 4th wave to play is the 4th added wave) and
  • Get the WaveManager and add your wave in desired position via: GameManager.get().getManager(WaveManager.class).addWave( _YOUR_WAVE_)

WavesGui

WavesGui provides a GUI for the screen that displays wave information for player. WavesGui polls the status of the current waves and whether or not the game is in a waiting / preparation period for the player from the WavesManager and displays this accordingly.

Waves Class Diagram


Gameplay

Design

Asset Creation

User Testing

Code Guidelines


http://cultofthepartyparrot.com/parrots/partyparrot.gifhttp://cultofthepartyparrot.com/parrots/partyparrot.gifhttp://cultofthepartyparrot.com/parrots/partyparrot.gifhttp://cultofthepartyparrot.com/parrots/partyparrot.gifhttp://cultofthepartyparrot.com/parrots/partyparrot.gif

Clone this wiki locally