FPS Tower Defense Toolkit Basics: Batched Wave Spawn Controller

[Note: As of the v3.10 update, this system has been revamped with a new design that uses Data Tables to greatly simply the process of creating your own waves, especially when dealing with large hordes comprising multiple clusters of enemies within each wave. For more information on the same, check out: https://forums.unrealengine.com/unreal-engine/marketplace/50583-fps-tower-defense-toolkit?p=1764666#post1764666]

The FPS Tower Defense Toolkit comes equipped with two different types of wave spawning models: one centered around user-defined wave patterns, and another geared towards generating waves based on weighted probability distributions [Read more about it here: FPS Tower Defense Toolkit Basics: Weighted Wave Spawn Controller]. Today we're going to cover the first model: the Batched Wave Spawning System.

The BatchedWaveSpawnController is intended to provide the designers with absolute control over the wave design and thus works best when going for handcrafted wave patterns. To help in this regard are a host of variables that allow customization of waves directly from the editor. I will go through each of those attributes one by one, and briefly explain their individual functionalities:


1. BatchedWaveSpawnDataArray: This array is responsible for storing all parameters that control the flow of waves, with each element representing information about a single wave. Information about an individual wave is divided primarily into two categories: the spawn control data for various AI classes, and the amount of resources to be distributed to the player.

The first of these data sets is contained within the BatchedAISpawnDataArray. This array is basically a list of spawn control information about the different AI classes to be spawned during the wave. Similar to the pattern employed by the parent array, each element in this array represents information about an individual AI class, thus splitting the wave into different automated batches, and hence the name. Here is a brief overview about the different parameters that define a batch:

  • AIType: An enum that defines the AI model.
  • SpawnPoint: Determines the spawn point actor for this group. These actors handle the actual spawning logic using the information passed on to them by the wave spawn controller.
  • SpawnStartingTime: Determines the time (relative to the starting time of the wave) at which this batch of AI bots start rolling out.
  • NumberOfUnits: Defines the number of individual units in the group.
  • SpawnInterval: Controls the duration between spawning of individual bots.
  • DataTableRowName: Connects this AI class with the associated row in the DT_EnemyAIStats data table. [No need to explicitly specify this as it will be set automatically by the wave spawn controller]
The second data set, dealing with resource allocation management is determined by the following variables: the PreWaveTowerBaseDistributionAmount and PreWaveTowerPointDistributionAmountwhich as the name suggests, control the number of Tower Bases & Tower Points to distributed to the player during the tower construction phase.

2. NumberOfWaveCycles: This parameter enables the aforementioned wave patterns to repeated any number of times. With each subsequent cycle, the enemy AI units gain more HP and thus become more resilient.

It can also be set to zero in order to activate the Endless wave system.

3. TimedWaveStarts?: Determines if new waves will start automatically after a designated amount of time. If turned off, the player will have to manually trigger new waves.

4. WaveTimerInterval: If Timed Wave Starts? is set to true, then this parameter controls the time interval between waves.

Comments