From 2002 to 2005, we have worked on a game called 8. One of its main features was that the protagonist was autonomous while the player looked at the game from a first person perspective. You could instruct the girl by pointing and clicking, but the idea was that you were more like a guardian or parent to her. This autonomous character is what inspired us to start the Drama Princess project.
In a first demo of 8 we just triggered some random motions. For a second one we developed an engine that we called the Mood System, because the girl’s behaviour was entirely based on how she felt. We never got the opportunity to fully explore the potential of this system and it’s probably too convoluted and too much like “real A.I.” to be suitable for Drama Princess, but certain ideas might be useful nonetheless. Here’s a summary of the design.
The Mood system was designed by Ronald Jones based on specifications and descriptions that Auriea and I had compiled. It was built with Quest3D. The only custom part we had made was a motion blender.
The core of the system was a set of three values, ranging from 0 to 1, expressing Energy, Happiness and Concern. We called these the Mood Variables. These values would be influenced by just about everything: player’s actions, own actions, environment, etc.
To define the behaviour of the character, we developed an Action Language. The core of this language was an array with a list of actions. Whenever the girl wanted to do something, the action was added to the list. When an action is done, the system moves down one row. This action array contained several columns to store bits of information (target position to go to, object ID of thing to pick up, etc) associated with the action.
One advantage of using a persistent list like this was that we would have a record of what she had been doing and could replay that if we wanted to. Or the other way around, we could easily write a script for her by making an action array by hand. The list of actions defined the girl’s behaviour, disregarding how the list was built (player instructions, autonomous decisions, canned sequences, randomness, etc). That made it very flexible.
Every request for the character to do something (either initiated by herself or by the player) would be translated into a list of actions that would be added to the Action List sequentially. Each request would have an ID so that, if so required, the whole sequence could be cancelled in one go, by moving to the row with the first different request ID.
Now, the fact that an action was on the list (however it got there) did not mean that the girl was actually going to do it. Every time a new action is processed, the Mood Variables would be consulted and she would only perform the action if she felt like it. This way we could deal with her changing mood. E.g. you tell her to go somewhere and pick up an object. She accepts to go there but when she arrives she realises that the floor is all sticky and weird and she refuses to pick up the object.
If she accepted to do a certain action, then she would also consult her Mood Variables to see which animations she wants to use for the action. Instead of walking, she could skip when happy or drag her feet when sad.
If she wasn’t being told what to do, she could make her own decisions. For this, we attached three envelopes to each action, one for each Mood Variable. These envelopes would return a number between -1 and 1 for each possible value of each Mood Variable, expressing her desire to do the action. This way e.g. a walk command would be accepted even if her Energy value was low, providing that her Concern and Happiness values were high enough.
Whenever she needed to make a decision on doing something, she made a list of actions sorted according to willingness to perform them and picked a random one from the top of the list.
Which, in hindsight, is kind of stupid since it doesn’t take opportunity into account. If you see an object, you would be inclined to pick it, no? Rather than thinking “I feel like picking up an object, hm, where can I find an object?” That’s silly. The environment would only influence her Mood Variables and that’s way too fuzzy to lead to any sort of reasonable action. To trigger behaviour that looks realistic, the object lying on the ground should say “Pick me up!” and the character should respond. Is this the postmodern version of A.I.? 🙂 The character is an empty shell and is simply being told by the environment what to do. It certainly fits with our desire to approach the problem from the outside rather than from within.
Exercise: look at people and pretend that they have no plans and make no decisions but instead their environment is telling them what to do.
Conclusion
Now that I look back on it, and after having programmed a lot more and having read a bit about A.I., I realize that this system is not as complex as I once thought. It’s main problem was that it was far too concerned with the character’s mood and far too little with what the viewer actually perceives. This is why, probably, random selections of actions often lead to more interesting behaviour. The Mood System also required extensive trial-and-error authoring to make sure that the willingness to do certain actions would correspond properly to the Mood Variables.
In short: it makes no sense to try and define a character’s mood with a limited set of variables and expect her to exhibit rich and meaningful behaviour based solely on this imperfectly expressed mood. Then, indeed, randomness is better.
The Action List, on the other hand, remains an attractive idea and seems like a solid way of storing behaviour sequences, potentially expressing even long term desires that can be interrupted by short terms ones.
Posted on May 31, 2006 at 5:20 pm
[…] Belgian game design duo Auriea Harvey and Michaël Samyn, aka “Entropy8Zuper!”, creators of 8, have more than one new ambitious projects in the works. […]
Posted on June 28, 2006 at 2:22 pm
[…] Originally we had planned to re-use the Action List system that we had developed for 8 but reading Elizabeth Gordon’s article about behaviours as lists of rules has made us reconsider. […]