For, In My Nightmares I Dream of Black Blocks, I aimed to make a game that combined several core game play elements together. The main theme around which I based the game was survival. I wanted the player to feel threatened, to feel like their chances of winning were limited. However it is difficult to create a game play environment that truly feels threatening. When playing video games I quickly start to notice where the rules can be bent; how the game has been structured and how those realizations limits the game designer from conveying the emotions they wish a player to feel. For instance in a game like Metal Gear Solid, your goal might be to stealthily sneak pass guards, but if you observe carefully you will notice a dissonance between what should realistically happen, and what the guard's AI is capable of emulating. You stand facing a guard and you see the guard, yet the guard does not see you. This is because you are standing just outside of his range of detection. Should this have been a situation in real life the guard would have been staring directly at you and you would have been caught. Noticing these patterns removes the player from the situation and makes them aware of the game itself.
With this in mind, there were several things we studied throughout the course that I felt could create a more satisfying type of game environment. Specifically, generative processes were intriguing to me, because they have the potential to create situations that are unique each time they are experienced. I decided to implement a genetic algorithm based on a class example. Using a genetic algorithm made it possible to develop enemies that would be responsive instead of premeditated in their actions. This also relates to Jim Campbell's article Delusions of Dialogue: Choice and Control in Interactive Art. By using a genetic algorithm to serve as the enemy's artificial intelligence, it appears that the enemies are acting with increasing intelligence. However every action each enemy carries out is the result of adhering to a strict set of rules. Yet, the enemies do not have a deterministic set of behaviours, their rule set instead determines how they learn to behave. Thus the enemies present an interaction with the player that is continuous in the way that they constantly measure the state of their success and act accordingly. This biological approach to computing also led me to want to incorporate other biological elements into my code.
Casey Reas' Process Compendium fit perfectly with my concept of genetic algorithms and behaviour. Each process in his work represented to me a DNA sequence or set of traits that could be passed down to future generations. Instead of just variables, behaviours themselves could become part of the DNA.
In My Nightmares I Dream of Black Blocks, is my attempt at creating a survival game that implements an environment that is adaptive instead of discretely responsive. By implementing a genetic algorithm, no matter how dumb the enemy, it will achieve its goal eventually.
How It Works
Players are given a setup period to construct a barricade. Barricades consist of 4 different elements:
There are two types of physical blocks that act as obstacles: wooden crates and metal crates.
Wooden crates are more abundant, however enemies will break through them fairly fast.
Metal crates on the other hand are much more durable, they have double the life span of a wooden crate, but there are fewer of them to utilize.
The other two barricading elements are traps.
Yellow squares represent traps that will limit the enemy's speed; making them slower and easier to avoid or escape.
Red squares represent traps that do damage over time. Enemies that walk into these traps will slowly have their life diminished.
After the player has finished setting up their barricade, the game starts. A group of enemies, "Creeps", will attempt to hunt you down. At first they may not even reach the player, however creeps come in waves and each generation of creeps are smarter than the last. Creeps have certain behaviours and traits they possess. Some creeps will try to break your barricade down, other creeps will consider barricades a dead end and continue moving. The player is tasked with surviving these waves of enemies for as long as possible.
To survive:
The player can move around the entire map positioning themselves to avoid waves of creeps.
The player is supplied with a gun and 100 bullets to defend themselves with.
Each creep takes 2 hits to kill, however shooting a creep temporarily halts their movement and forces them backward.
Creeps become smarter by determining which creeps are most successful and spawning a new generation of creeps that mimic successful behaviours. Currently success is determined by how close the creep makes it to the player and how much damage it does to the player.
Above: The game in action.
Improvements
The concept is not fully implemented and future versions could improve vastly on the formula. I wish to tweak the success criteria for the genetic algorithm to include things such as:
Does a creep have the player in vision?
How many collisions with undesirable objects have occurred?