creating flow by dynamically changing enemies
TRANSCRIPT
![Page 1: Creating Flow by Dynamically Changing Enemies](https://reader036.vdocuments.net/reader036/viewer/2022082602/577d33ba1a28ab3a6b8b93af/html5/thumbnails/1.jpg)
8/8/2019 Creating Flow by Dynamically Changing Enemies
http://slidepdf.com/reader/full/creating-flow-by-dynamically-changing-enemies 1/5
Creating Flow by Dynamically Changing Enemies
John Doran & Stanley Thai
[email protected] , [email protected]
In this current age, video game players have never varied larger in terms of their skill when it
comes to completing objectives. It is a designer’s job to carefully balance and tweak gameplay to
work for all sorts of people, but it would be easier to have the game assess how the player is
doing and adjust the game on the fly. Valve’s Left 4 Dead series took the first step with its
Director system where it decides how many zombies to spawn at one time. Our project takes that
concept to the next level by changing the enemies to fit the level of the player to hopefully create
the psychological state of “Flow” in the player.
In this project, we will use the familiar multi-directional shooter in the vein of Bizzare Creation’s
Geometry Wars and will modify it by shaping the enemies as the game continues. Using the
traditional story arch in terms of the amount of base stress the game will create we will adjust
aspect of the enemies the player will face with a director of our own. With both of these aspects
in place it is our goal to simulate the idea of “Flow” in games.
Overview
To begin, we created the game itself to be rather simplistic in order to make the changes in the
game that much more important to the gameplay. We felt that the idea of a multi-directional
shooter would be a good genre to experiment in as it typically relies on hard-coded values for the
creation of waves and could potentially benefit greatly from this research. First, a workable
version of a top-down shooter was created. Please refer to Figure 1.
Figure 1. A top-down view of our game field.
![Page 2: Creating Flow by Dynamically Changing Enemies](https://reader036.vdocuments.net/reader036/viewer/2022082602/577d33ba1a28ab3a6b8b93af/html5/thumbnails/2.jpg)
8/8/2019 Creating Flow by Dynamically Changing Enemies
http://slidepdf.com/reader/full/creating-flow-by-dynamically-changing-enemies 2/5
Enemies were created with the simplest AI as possible, once again to maximize the effect created
by the dynamically changing statistics, to only travel towards the player in a suicide run.
Enemies only contain 3 statistics, which are their health (how many bullets need to hit them
before they die), their damage (how many health are taken from a player should he get hit by
them), and their speed (the rate in which the enemy moves toward the player). To make changes
more apparent to the player, the enemies are color-coded based on their changes. Please refer to
Figure 2. How they change and what effect they have upon gameplay will be discussed later in
the paper.
Figure 2. A description of what the color of an enemy represents.
The player will be able to evade and fight enemies that spawn until the game is over in 300
seconds. While a game is going on, data is being recorded and processed by the game’s director.
Depending on how the player’s play-style the enemies spawned afterward will evolve.
The Director
The director is the brain of the game and is in charge of everything that the player himself
doesn’t do. This section will go over the basics of what he does and will describe the thought
process of it.
Spawns Enemies
In keeping with the traditional story arch, enemy spawn times are set in this project following
with a parabolic curve set reach its low point when there is 20% of the game left. Please refer to
Figure 3. This will mean that while the game continues, the number of enemies and the way they
spawn will always be the same.
![Page 3: Creating Flow by Dynamically Changing Enemies](https://reader036.vdocuments.net/reader036/viewer/2022082602/577d33ba1a28ab3a6b8b93af/html5/thumbnails/3.jpg)
8/8/2019 Creating Flow by Dynamically Changing Enemies
http://slidepdf.com/reader/full/creating-flow-by-dynamically-changing-enemies 3/5
Figure 3. The spawning rate of characters is based upon the classic story-arch.
Changes Enemies
When an enemy dies, they send information to the director who will then take into consideration
if the player is doing better or worse against the enemies it has spawned so far.
Damage
Damage is the amount of damage done to a character if the player is by an enemy. Damage is
calculated in a parabolic curve to increase as the game continues till climax similarly to the
spawn rate. By doing so, tension continues to increase in accordance with the story arch.
However if the other statistics are in sync, damage should only come into consideration if the
player makes a series of mistakes in their normal play.
Speed
Speed is the rate in which the enemy moves toward the player. Taking into consideration a
player’s skill, if a player is defeating enemies quickly the director should make enemies quicker
so they get to him quicker. This is done by taking the average time a player kills an enemy and
comparing the latest death. The percentage difference is then taken and multiplied by the current
speed. It is important to note that you need to take in a number of enemy kills before you can
find the actual average.
var director = GameObject.Find("Director");
var dirB : directorBehavior =
director.gameObject.GetComponent(directorBehavior);
timeLived = Time.timeSinceLevelLoad - createdTime;
var Avg = (dirB.averageEnemyDeathTime + timeLived)/2;
![Page 4: Creating Flow by Dynamically Changing Enemies](https://reader036.vdocuments.net/reader036/viewer/2022082602/577d33ba1a28ab3a6b8b93af/html5/thumbnails/4.jpg)
8/8/2019 Creating Flow by Dynamically Changing Enemies
http://slidepdf.com/reader/full/creating-flow-by-dynamically-changing-enemies 4/5
var percentIncrease;
if(dirB.enemiesKilled > 1)
percentIncrease = (actualAvg/dirB.averageEnemyDeathTime);
else
percentIncrease = 1;
dirB.spd = dirB.spd * percentIncrease;
Health
Heath is a calculation of how many bullets need to hit a specific enemy before they die. If a
player is hitting an enemy without fail it should make sense that they would be able to do so
multiple times. This stat was turned into a compromise in which it would adjust itself based onthe player’s overall accuracy over the course of the game where if they kept their accuracy as the
game continued the enemy’s health would increase.
dirB.health = dirB.health *
(((250 - Time.timeSinceLevelLoad)/250) +
(dirB.shotsHit / other.shotsFired));
if(dirB.health >
Mathf.Round((1 -(250 - Time.timeSinceLevelLoad)/250) * 10))
{dirB.health =
Mathf.Round((1 -(250 - Time.timeSinceLevelLoad)/250) * 10);
}
Conclusion
This article should give a brief insight into what is involved in creating a system of gameplay for dynamically changing enemies that level with the player as they play. This research was just the
tip of the iceberg of what could actually be done with this kind of thinking and plenty of gamescan benefit from this. In the realm of single player games, catering your game to any type of player would fit perfect with this system. Please refer to Figure 4.
![Page 5: Creating Flow by Dynamically Changing Enemies](https://reader036.vdocuments.net/reader036/viewer/2022082602/577d33ba1a28ab3a6b8b93af/html5/thumbnails/5.jpg)
8/8/2019 Creating Flow by Dynamically Changing Enemies
http://slidepdf.com/reader/full/creating-flow-by-dynamically-changing-enemies 5/5
Figure 4. The completed project shows as the game shows that enemies spawned change based on how you play.