Emergent Behaviour: not just the AI.
The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company.
The number one source for emergent behaviour is the A.I. system. The complexity of a modern A.I. system can easily outgrow the capacity of the developer to understand it. Personally, I am a big fan of plan-based A.I. where the developer equips the NPCs with a vocabulary of actions with pre and post conditions, and a set of goals. A Goal-Oriented-Action-Planner, or GOAP, is then capable of finding solutions to problems that were unknown to the developer.
In this blog posting, I want to talk about another manner in which a game developer can be surprised by his or her own creation. This is what happened to me, playing my own game online against a human opponent.
The game in question is 'Buggy Bang! Bang!' of which I am the sole developer. It features 1-on-1 matches between armoured buggies. It comes down to shooting and driving in a set of different arenas. There is some single player component, but the bulk of the game play is player versus player.
When I designed my game, I only had a very rough idea on how actual battles would play out. What kind of tactics would be used by the players? Fast and furious, or cautious execution of cunning plans? Maybe even some traps with bait? Since I have not conducted anything more than very rudimentary play testing (a few minutes against my wife) I could hardly foresee how online play would actually turn out to be.
The first thing I learned is pretty obvious. A few days after launch, my customers got so good at it that I, the sole-developer who intimately knows his virtual buggy, got my butt kicked big time. Of course this was bound to happen. I got some lessons in playing my very own game.
But another lesson, I was not prepared for. It was a lesson in chivalry. In one of my sessions I was scheduled for a death match against a player with the ominous name 'Thek1llerofall'. Based on his stats and achievement I knew it would be a fierce battle, as we seemed evenly ranked. I think I got him during the first round, but the second round I made a big mistake. I managed to flip over my buggy, which leaves me completely defenceless and unable to right myself. It's pretty much like a turtle on its back. So normally I would just lie there, wait for the mercy kill by the opponent so that we can continue onto the next round.
To my surprise my opponent surveyed the situation. He (it could be a she, but for now I will assume 'he' considering his gamertag) seemed to pause for a while. Then he approached my defenceless buggy and started to bump into me with a clear intention to flip me back onto my wheels. It took him a few tries, but he finally managed to flip me right side up. As soon as I was on my six wheels again he would not waste another second, and shot me point blank.
I was quite elated. In this virtual game world I personally had created (I'm a one man indie who does code, art, design), a beautiful thing emerged that was not in the original design: a code of honour among players. So yeah, human opponents will surprise the game's creator in ways that an exceptionally clever A.I. system never can. A big thank you to my customers for making my game better than I could ever have planned.
Also, I think this act of valour will probably spread to other players. Once a player has been given this curtesy, it is likely that the player will do the same if the roles get reversed. It is one of the pleasures of a game designer to see how this online code slowly emerges. It's one of the perks of being a game developer.
This seems like an easy kill.
Or maybe give the opponent a fighting chance by doing the right thing, and flipping him back onto his wheels?
* For a video with game play see the Buggy Bang! Bang! trailer.
* For those interested in AI planning, check out my open sourced GPGOAP.