This is the first time that I speak about one game subsystem that I find especially interesting: the Game Director. This system, used in some form in games such as Left 4 Dead, is essentially a sort of artificial intelligence for dynamically placing enemies and encounters on the level, and Wizards of Unica will have something similar.
For now there are two ways to place enemies inside a level. The first way is to define a certain spawn probability for each building block. This technique is useful for set-piece encounters, such as bosses, or to spawn enemies guarding the exit from the level.
The second one, the actual Game Director, works like this. Each enemy has a Threat Level and each level has a Threat Progression and a Current Threat, that starts at zero. Every round the Current Threat goes up by a value specified in Threat Progression (it is thus additive), and every round the Current Threat is checked against the sum of all the Threats of the currently alive enemies, the Active Threat. If the difference between the Current Threat and the Active Threat is positive a new enemy (or group) of adequate threat is spawned just outside the character’s Filed of Vision.
By adjusting the Threat Progression it is possible to impose a certain “dramatic flow” to the level. We can decide for a level to offer a crescendo of difficult encounters or decide for an endless stream of easy enemies, we may alternate moments of strong tension with long stretches of quiet to build up tension or even decide to only use set-pieces in certain levels. This is an aspect of what I like to call Procedural Narrative.
The following is an example of the current test caves configuration.
<enemies threatProgression="1 0 0 0 0 1 0 0 0 0 2 0 0 0 0 3 0 0 0 0 5 0 0 0 0" maxThreat="20">
<enemy blueprint="bp_firefly" type="MOB" threat="1"/>
<enemy blueprint="bp_fire_bronze_thug1" type="STONE_WALL" threat="3"/>
<enemy blueprint="bp_fire_salamander1" type="LIGHTNING_BRUISER" threat="5"/>
<enemy blueprint="bp_fire_thug1" type="GLASS_CANNON" threat="2"/>
<loop name="intro" start="0" end="16540" maxThreat="0"/>
<loop name="combat1" start="16541" end="33090" maxThreat="2"/>
<loop name="combat2" start="33091" end="41360" maxThreat="6"/>
<loop name="combat3" start="41361" end="49640" maxThreat="15"/>
As you may notice from the example, the Active Threat also changes the background music to match the intensity of the encounter.
Another thing you may notice is the “type” of an enemy, according to our classification. This will be used in later releases to mix enemies in such a way to offer different challenges and tactical scenarios to the player.
In the future it may be nice to add conditions to the system. For example link the spawn of certain threats to the current health of your character or the type of spirits that you have bound. For now however the systems is behaving quite well.
What do you think?
Thanks for reading.