PhoenixGames
Posts by :
Dynamic and Emergent Content in Computer Games: Part One
I have been thinking recently about the potential for increased use of dynamic and emergent content and related techniques in game, particularly with regards to story and plot development during the game itself.
Firstly, a description of what I see as a serious problem in the gaming industry. I am speaking here about story driven games, as opposed to casual games, and I am speaking particularly about FPS or “First Person Shooter” games, since they seem to fall victim to this problem much more often.
Most games use a strictly linear mission or level based structure, where the actions of the player matter little to the story, they are simply carried along for the ride. This often results in a lack of enthusiasm on behalf of the player for the story. For example, in many survival horror type games, one of the first objectives is simply to escape the Island/City/Dungeon etc that you find yourself in. However, the players knows full well that the first attempt at escape will fail, since the game isn’t going to end that quickly. So they are going along with the story even though they know beforehand that it is pointless. This disconnects the player from the story, and undermines the sense of immersion in the game.
Some games offer multiple endings or branching stories which present different story elements based on the players actions. These story actions are however predefined, and are hugely wasteful in terms of developer time. The developer has to create dozens of artwork and media files for choice points that the player will never see. This is why these types of stories are rarely seen, or when they are, they are usually limited to a handful of story branches.
There is also the issue of overuse of certain gameplay elements. In almost every FPS game I have played I have been tasked with destroying or repairing a power generator, shield generator or some other kind of generator, finding a certain key to open a door, being captured and losing my weapons at least once during the game, or escorting some weaker character while they perform some mission. These cliched objectives quickly become repetitive and boring, and again, disconnect the player from the story.
What can be particularly irritating is unnecesssary repitition of goals or objectives, destroy the five power generators, activate the four switches, disable the three transmitters, find the three keys, etc etc. In most, or at least many cases, this is a cheap way to prolong gameplay. A developer only has to create one power generator and associated code, and then duplicate that four times and scatter them throughout the game world. This is quick and easy, but it’s also repetitive and boring.
“Open World” or “Sandbox” type games provide a refreshing break from the claustraphobic linear progression of conventional shooters, but this causes a problem with story telling. Most of these games feature side quests and objectives that the player can accomplish in any order they choose, and at any time that they choose as well as main or story quests which advance the plot of the game. There are two main problem with this approach.
The first is that allowing the player the freedom (called “agency” in game design) to choose when to play a story mission presents certain challenges. This is particularly true with missions which have a sense of urgency, for example a rescue mission. The player receives a desperate plea from a character for help, and decides to spend hours accomplishing side missions or levelling up first. When they eventually decide to play the story mission, not only is the character still alive, they thank the player for their quick response! This again creates a disconnect between player and story.
A more serious example would be a player being able to choose to play story missions out of sequence, or accidentally skipping missions. This can be difficult to prevent in some cases, and can result in a convoluted mission structure.
An engaging story can avoid a lot of these problems, but it can still leave the player with the impression that they are not in control of what is happening, that the game is basically an interactive movie. My proposed solution, as the title of this article suggests, is to create a game which does not rely on a dull linear progression or cliched goals. The “holy grail” of this would be a game which constantly changes in response to the players actions, providing new goals, new challenges, new enemies, and new weapons at critical times during the game.
To my knowledge, this has never really been done before, however, I think it could be done. Programming a computer to produce a stimulating and exciting story with interesting characters is, of course, not possible. However, by predefining certain elements of the story, and then allowing for a large number of variables which can be controlled dynamically, I believe it would be possible to create a story which the player is in control of.
This could accomplished, for example, by creating several optional objectives or means to accomplish a broader task, and allowing the player to choose which objectives they want to accomplish and when. I first thought of this idea when playing the game “Dead Island”. In this game the player is stranded on an island which has been overrun by Zombies, and their main goal is to escape. The game takes the player through a series of fairly predictable plot twists and turns before the end. I think this type of Survival Horror or Survival action game would be a perfect testbed for emergent concepts, since the overall goal is very simple: Escape.
In order to create an emergent survival horror type game based on these concepts, a series of possible escape methods could be created: a plane, a boat, a bridge, a helicopter, etc etc. These would be static, but there would be enough of them that the player would be presented with a genuine choice in how to proceed. The game would keep track of how long the player has been playing and how quickly they are progressing, and keep presenting challenges to the player by stalling their escape until the story has been told.
This story would be given to the player in the usual fashion, in the form or in game messages, possibly cutscenes, etc. It would need to have some kind of branching element to it, and the critical thing would be to keep it vague enough that it does not incorrectly reference the players actions (For example congratulating the player on commandeering the boat when they instead decided to use a helicopter). This could be accomplised by including triggers in the game based on time spent playing, percentage of the map explored, or number of goal actions accomplished, this again would be dynamic.
This idea needs a lot of development, but it’s something I have been thinking about for a while, and I am convinced that with the technology of today, it could be viable. It could even revolutionise the way games are played, by putting players in charge of their own story. No more will players wonder “What am I supposed to do here?” or “Do I have to kill or spare this enemy to get the good ending?” Players would be able to choose what to do, and in what order to do it in. Players could team up with other players online and accomplish goals cooperatively, or competitively, as well as playing alone.
I have some ideas for a concept test of a game like this, which I may develop further in the future.
Vector Mathematics (and Matrix Operations)
I have noticed that with several of my most recent projects I have had to deal with vector mathematics and matrix operations quite a lot. I used this form of mathematics in college, but it was never my strongest point.
However, after working on the Icarus Rocket Simulator, and on Artillery! I have developed what I feel is quite a good working knowledge of this kind of mathematics. This is part of the reason why I chose to work on these projects, I wanted to improve my skills in these areas. This form of mathematics is vital in computer games, particularly 3D computer games, and it is found in everything from physics, to rendering, to Artificial Intelligence, to weapons. It is impossible to scrape by without it.
Vectors are used, amongst other things, to determine the facing or rotation of an object. For example, if an ai player is to be programmed to turn in the direction of a player or a target, this is achieved by using the currect direction vector of the Ai Player and the position of the target. Vectors can also be used to do very interesting things with objects, such as simulate gravitational forces (simply apply a vector with magnitude 9.81 on the negative Z axis) or wind (basically the same thing, but apply the force to other axes). They can also be used to change the direction of projectiles in flight, creating curved projectiles, something I did for my Artillery game.
I have mostly used matrices for carrying out rotations and in rendering code. One of the models I used had a “muzzlepoint” node. This node was used to determine the direction that the muzzle of a gun was pointing. I accidentally rotated it by 90 degrees in my modelling tool, meaning the projectiles were being fired 90 degrees to one side. I could have simply rotated the muzzle point in the modelling tool and re-exported, but to test my skills I instead rotated it by using a matrix, and it worked perfectly!
This is the 90 degree rotation matrix:
This again, is a basic but very important skill.
I have a lot of ideas as to how I might use vectors and matrices in future, they are very useful tools, and now that I have a good commad of them I should be able to make some pretty cool things!
Project 131: Artillery! Update: Bug Fixes, Gui Additions, Ai, and Wind
I am now coming close to achieving feature completion with this project.
I have added a menu which shows an analysis of the previous shot taken by the player, making it easier to adjust the settings for the subsequent shots. This allows the game world to be bigger, and shots to be taken over longer distances. This opens up the game, and provides for a more fun challenge.
I have also added improvements to the AI, allowing it to handle more variables, such as modifying the power of it’s shots as well as the rotation and elevation of the turret.
I have been working on the art for the game, and designing some new turrets and vehicles that will be used, as well as adding visual improvements such as visible player names, and various bug fixes.
Finally, I have added a simulation of wind forces to Artillery. Wind speed and direction can be set to vary between rounds, be constant for the entire game, or be turned off entirely. Having to deal with wind forces add a significant challenge to the game, particularly if it changes per round.
I have some more work to do to get all of the features I want into the game, and then I have the debugging and optimisations to do, followed by the rest of the art.
System Instability, Slowdowns, Blue Screens, and faulty RAM
I lost quite a bit of time this week due to major system instabilities I was getting on my main work machine. I was getting frequent Blue Screens, with seemingly random causes. I initially assumed the problem was due to a problem with Flash on my firefox browser, because switching to Chrome actually fixed the problem for several days, but it then returned.
After downloading a very useful tool called “Blue Screen View” from Nirsoft, I could see that most of the BSOD turned out to be of the type “Page fault in Non Paged Area”, which indicates a RAM problem. I used the famous MemTest86+ t0 check every one of my 4 RAM sticks individually, and I found one stick which produced over 86 thousand errors just halfway through the first pass! After removing that stick of RAM the system is back to performing well, albeit with just 6GB of RAM instead of 8.
Unfortunately, it is nearly impossible to buy RAM sticks individually, you almost always have to buy sticks in sets, so I have have to buy more than I need to get back to my preferred 8GB of RAM.
I thought this was worth posting about, since Blue Screens and RAM errors are both relatively common, and the aforementioned programs are invaluable in debugging and fixing them.
Below is a picture of the offending RAM stick. I don’t think Corsair Dominator is a bad brand, not at all, I have been a fan of Corsair memory for a long time. This is the only stick of RAM of theirs that has ever actually failed on me, and it’s about four years old.
Project 131: Artillery! Update AI: Random Level Creation, New Projectile Types
This is an update on my latest game project, Artillery! This is also, incidentally, the first real post in my new blog!
The project is coming along well, I have completed the AI code, tested and debugged the network play feature, and I am currently finishing up the random level creator.
I have also added support for three different types of projectiles: Standard projectiles, which follow a simple ballistic trajectory, curved projectiles which, as the name suggests, can be made to follow a curved path specifed by the user, and cluster projectiles, which split into a cluster of warheads at the apex of their trajectory.
The random level creator will be designed to not only randomly place players, but also randomly place objects in their path, which will have to be taken into account when firing. This is where more unusual weapons like curved shots come into play, sometimes, to hit an enemy, you may need to curve a projectile around an obstacle.
I have also dome some work on the camera system, which will automatically update the position of the camera depending on where the action is, and I have added a compass to the currently selected player, to aid in aiming.

![R(90) = delim{[}{matrix{2}{2}{0 -1 1 0}}{]} R(90) = delim{[}{matrix{2}{2}{0 -1 1 0}}{]}](https://phoenixgamedevelopment.com/blog/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_966.5_5d0260551cd827e128c013f925d91b4f.png)














