Transitions between animation sequences

Posted by Michael on June 10th, 2006, in Development

All objects (including characters) in the game world advertise their opportunities. Mostly based on its relationship with these objects, a Drama Princess character chooses one of these opportunities as its goal.
An opportunity consists of several animations played in sequence. When a character chooses one as its goal, it’s going to play these animations one after the other. Some sequences will simply play from start to finish, after which a new goal can be chosen. Others may pause by putting the character in a certain state, typically expressed by a looping animation. After a while the character will get bored with this opportunity and it will finish the sequence by playing the final animation.

When a sequence has finished and before the character chooses a new goal, the character is in an idle state. To have the character return to the same kind of idle behaviour, like a neutral stance (as happens in The Sims and The Endless Forest) , looks very unnatural. To solve this issue our environment objects will offer several idle behaviours that are available for the current environment. So rather than going to a neutral stance when an animation sequence ends, the character will select an idle behaviour from the ones offered by the environment.

When a character is moving towards a relatively uninteresting goal and meets another character with which it has a good relationship, there’s a very good chance that it will interrupt what it was doing in favour of interacting with the other character. So rather than finishing the sequence and selecting an idle behaviour from the environment object, it will immediately start playing the animation sequence of the opportunity offered by the other character that it chose as its new goal.
For both cases, idle behaviour and interruption, a transition between two animation sequences will be required. Since so many combinations are possible (especially in the case of interruption), we cannot hard-code all transition animations.

Blending between two random poses almost always looks unnatural and can in some cases produce unwanted effects (like character rotating through the floor).

But we could simplify the problem by stylizing of our concept of invitation. When a character chooses to do an interaction with another character, it will send an invitation to this character and wait for it to respond and move to the right location and into the right starting pose. Then the interaction can happen, nice and synchronized. This moment of invitation could be made explicit in a certain pose that is always the same. Then the complexity of transitioning is at least reduced by half: we know the end of the transition.

The problem is that this may end up looking like a neutral stance in between animation sequences, mentioned above as decidedly unnatural. This is hardly acceptable. But it may be an area where we need to compromise. Perhaps extreme stylization (maybe in combination with camera cuts) may help make this more acceptable.

Decision filters

Posted by Michael on June 10th, 2006, in Development

This is a refinement of the decision making process suggested in Consumerism.

All opportunities offered by all objects in the world (including characters and environments) are published to a global list of opportunities. The character will choose one of these opportunities as its goal. To reduce the list to a single opportunity, a set of filters is used.
Each filter

  • orders the opportunities according to a certain value
  • reduces the size of the list to a fixed number starting from the top

The filters are executed in a specific sequence.
Every ordering includes some randomness that allows for a small chance that inappropriate items are included in the top of the list.

Happiness has been replaced by Comfort. The difference is that while Happiness made the character choose the opportunity that promises the most happiness, Comfort makes the character choose the opportunity that fits the relationship best.

Situation is a new parameter that is used for making sure that the character is in the capacity to execute an opportunity.

1. Filter of Situation: possible opportunities only

  • removes the opportunities that the character cannot choose, due to its situation
  • reduces the list to possible opportunities only

2. Filter of Distance: near objects first

  • orders the remaining opportunities according to distance modified by object type (characters can be further away than objects)
  • reduces the list to a maximum of 30 items

3. Filter of Relationship: loved objects first

  • orders the remaining opportunities according to relationship modified by attention span
  • reduces the list to a maximum of 15 items

4. Filter of Comfort: appropriate opportunities first

  • orders the remaining opportunities according to match of relationship & promise modified by fascination
  • reduces the list to a single goal

Thanks to Comfort, relationships can evolve more dynamically as a result of achieving a goal. Instead of simply improving, the difference between promise and relationship can be added to relationship. If the promise was larger than the relationship, it improves. If it was smaller, it decreases.

Consumerism as a model (system design 1)

Posted by Michael on June 9th, 2006, in Development

It’s funny how thinking about models to drive autonomous characters seems like a philosophical excercise sometimes. Maybe this is only because of the words we use. But we shouldn’t let philosophical preferences influence decisions about what might be effective artistic tools, should we? Consumerism, for example, might be a good model for Drama Princess. But it should be treated only as a starting point, not as a metaphor.

Likewise, we have to use the words we choose (happiness, relationship, fascination, shock, etc) for their symbolic meaning in the context of the design and not for their meaning in natural language. On the other hand, choosing appropriate words does help thinking about the design.

Anyway, there’s a bunch of things that I don’t like about the model described below. So this is definitely not the final design. It has already moved away from its original concept and I thought I’d publish it before it gets mutilated beyond recognition.

INTRODUCTION

A Drama Princess character moves through a world of opportunities. Every object and character in the world advertises the things you can do with it to a global list of opportunities. This list is ordered differently for each character, according to parameters defined by its personality and condition. The character doesn’t make a choice: it just does the thing that is at the top of the list. Doing this thing influences the character’s condition. This leads to changes in the order of the opportunities list as a result of which the character’s behaviour will show variation and growth. At each level of the decision making process, a certain degree of randomness is mixed in, allowing for unexpected behaviour.

Environment, decision making, action and consequences…

Drama Princess specifications

Posted by Michael on June 8th, 2006, in Development

Before we start designing, here’s a bit of a summary of things that have come up in these pages.

Requirements

  • give characters believable autonomy
  • express different personalities
  • simple design
  • ease of authoring
  • straightforward implimentation

Ideas

  • motivate characters by rewarding them (that way only one desire needs to be satisfied)
  • use graphic symbols to help express emotions
  • make the character (at least the avatar) express sympathy for the player
  • seperate animations from goals (so that goals can be attained in different ways and can be composed of several animations and interactions -as in 8’s “Action Language”)
  • make the environment trigger the behaviour
  • attach a list of possible interactions to each object and character
  • categorize actions in groups, don’t allow the character to switch groups too often (use attention span)
  • arrange all actions in categories with a preference value assigned by the author
  • define all actions and their effects in the context of relationships (with characters, objects and environment)
  • define a relationship as a single value, from good to bad, shared by both parties
  • or define a relationship as a pair of values, one for each direction
  • model social interactions as (dynamic) objects that exist outside of characters and that encapsulate them and tell them what to do
  • or (in There-speak) create a seperate “conversation mode” where the conversation itself selects (part of) the animations rather than the individuals
  • distinguish between autonomy when alone and autonomy when interacting with another character: the latter should be controlled from a higher level (less emergent, more meaningful); the distinction could perhaps be a gliding scale rather than binary

Hints

  • improve the player’s willingness to suspend disbelief
    • make sure the player likes the character
      • give character an attractive appearance (shape, colour and motion)
      • make an avatar somebody the player wants to be
      • make the character express affection for the player
      • make the character change or grow as a result the player’s actions
    • make sure aesthetic style and behaviour are on the same level
      • simple behaviour should be matched with simple appearance
  • the story happens between the ears of the player
    • leave gaps for the player to fill in with his or her imagination
    • model the symptoms, not the disease
  • use Loyall’s requirements for believability in an artificial being as a checklist
    • personality
    • emotion
    • self-motivation
    • change
    • social relationships
    • illusion of life
  • create drama that is larger than life, rather than an inferior copy of life
    • use stylisation: leave out uninteresting aspects and exaggerate the interesting ones
  • use the flaws of your system to your advantage (choose the system’s limitations carefully)
    • they can help express personality
    • they can provoke a desire to help or to care in the user
A mental verification test

Posted by Michael on June 7th, 2006, in Development

A way to test Drama Princess mentally is to imagine whether it could display the behaviour of other autonomous characters. Could Drama Princess drive Yorda? Or Black & White’s creature? And if not, what’s missing from the system?

Shopping list

Posted by Michael on June 6th, 2006, in Development

June is the month that has been scheduled to design Drama Princess. On the one hand, I feel like I have only started my research into this topic and there’s so much more interesting stuff waiting to be examined. But on the other, trying to actually make something will help us make decisions about which study material is useful for our project and which is not. Also, theoretic musings, while amusing in and of themselves, and very valuable as preparation, are not very satisfying for hands-on designers like ourselves.

From what I have learned already, I’m not expecting the system that we will now try to design and build to be the ultimate solution to our problem. I think we’re going to call it “version 1.0” and hope we get the opportunity to develop it further later on. After all, our main motto is “it’s better to make something than nothing”. 🙂
This does not mean that Drama Princess will be incomplete. There is a real game, 144, that we want to make that relies on this technology to work. This game has been designed and scheduled, so we have a strong motivation to build something that really works.

The first thing we need to come up with is a “shopping list”: a list of elements that we will need to make a complete system.

As a reminder, we’re talking about building a system for a non-linear interactive realtime 3D environment with no spoken or written language. All characters will be driven by Drama Princess, including the player’s avatar. And the project will be built in Quest3D, a realtime visual programming environment for DirectX.

Shopping list

  • character model and skeleton
  • skeletal animations
  • morph targets for facial animations
  • animation selection system (Drama Princess core)
  • object interaction (emotional response, observation, using)
  • perception (of environment, objects, characters and their properties)
  • navigation (motion, path finding, obstacle response)
  • external special effects (footstep sounds, footprints, shadows)
  • body special effects systems (clothing, hair, inverse kinematics)

Note that relatively trivial elements (such as interfaces between different elements) have been left out.

This list already represents a number of choices. We’re going to use a large number of pre-made skeletal animations and a system that will choose which animation a character should play. This system will be the core of Drama Princess where all the “A.I.” stuff will be happening. Object interaction could be considered to be a part of this, but we chose to list it seperately because it involves objects, which have to be dealt with on a higher level in the game engine design as well.

The list also implies a “philosophical” decision which has probably been sufficiently announced through previous posts: we consider the core of Drama Princess to be an “animation selection system”. This is not merely because, in the end, given our context, any A.I. system could be reduced to this. But also to keep us focused on our goals: animations is what the player will see, not mood, or mind, or intelligence, or even drama. All those things have to be triggered by the animations in the imagination of the player. But all that Drama Princess does, is select and trigger these animations. Whether we need a simulated mood or mind for that remains to be seen and is only a secondary problem.

The first three items in the list are “data”, i.e. to be produced by artists. But the choice of animations will at least be partially influenced by the “processes” designed in the remaining six items. The last item will be programmed in such a way that it impacts the logic of the other systems as little as possible.

It’s quite possible that this list keeps evolving as the design happens. But at least it gives us an idea of the scope of the project and the context of its core.

Drama Princess Symposium evaluation

Posted by Michael on June 5th, 2006, in Development

This is a little summary of what came out of our Drama Princess Symposium last month.

Certain properties that came up as desirable in autonomous characters:
(i.e. things that were assumed to make them seem more believable):

  • different personalities
  • consistent emotions (no unexpected mood swings)
  • growth, evolution, changes in mood
  • unique bond with the player and with each other
  • match between the personality of the character and the function it has in the game as well as the limitations of your software
  • a layer of interpretation/translation can help believability (Black & White) as long as it doesn’t represent the underlying system too directly (Sims)
  • actions with consequences
  • some time for the player to develop feelings for the character
  • various ways of performing the same action (at least for realistic-looking characters)
  • an avatar on the same level as the characters to help develop feelings for the characters (or alternatively a well defined role such as that of a god in Black & White)
  • acting on (perceived) moods, opinions or goals
  • choices that aren’t just motivated by needs and wishes
  • activities that player and characters do together
  • reciprocity: characters returning the affection you invest in them
  • response of characters to your actions as player (either immediate or delayed)

Things that don’t necessarily seem to be required:

  • intelligence (stupid characters are acceptable)
  • realistic appearance (matching appearance with sophistication seems more appropriate: stylized behaviour is ok for characters that look stylized)

In general, it seems that the players in our symposium didn’t have any particularly high demands in either graphics or programming. Whether or not they found an autonomous character interesting, depended more or on design consistency and narrative context. They seemed to be perfectly willing to accept limited “intelligence” as long as the context was appropriate. So communicating this context seems to be half of the work. Communicating the intelligence of the character itself didn’t seem very interesting. On the contrary, in general it seemed that obscuring clear communication about a character’s mood and mind leads to better believability. Vagueness allows for projection and empathy.
What did seem to be expected was evolution, growth or change. Both in the character’s behaviour as in the interaction between the character and its environment, including other characters. A clear impact of the actions of the player on the game environment, seems to be highly desirable.

Our approach to story

Posted by Michael on June 5th, 2006, in Development

After interviewing Andrew Stern, I realized that our approach to story is very different than most when dealing with interactive narratives. This has a deep impact on what we want our Drama Princess to become. I tended to make it easy on myself by just saying that we don’t care much about plot, but given, amongst others, the answers I got from Mr. Stern in response to this, I guess the impact of such an attitude is not clear.

So to make it clear, once and for all, at least for myself: 😈PLOT CAN GO TO HELL! 😈
Thank you. 😉
It’s not that we are satisfied with a weak plot, or half a plot or a plot that is co-authored by the user. No. It’s that we really don’t give a damn about plots or story arcs. This wouldn’t be surprising if we were game developers of the more traditional kind -the kind that says “gameplay first”- but we’re not. We do think story is at the very center of a satisfying interactive experience.

When we remove Plot, according to Aristotle, we’re left with five elements of drama:
Character, Diction, Thought, Spectacle and Melody.
That’s more than enough to tell a compelling story! Especially given that Aristotle had no idea about what would happen if you add interactivity and personalisation (an audience of one) to the toolset!

Auriea and I are very visually inclined and we like the sensual connection with the nervous system that visual elements can make. Interactivity, for us, is almost like a direct way of modeling this connection. And this is where stories happen for us.
We like how stories feel, we’re not necessarily interested in the facts and the flow of a story but much more in the associations in the reader’s mind, in the interpretation, in how narrative elements connect with the spectator’s background, culturally and emotionally.
That’s probably why we’re drawn to stories that everybody knows already: religious texts, fairy tales, myths. You might not know the exact story, but the characters, actions and situations, and in some cases the images and style, connect to something inside of you (whether this is cultural or psychological, conscious or subconscious, we don’t know and it doesn’t matter). It’s not about the story as linear tale anymore, it’s about the storytelling and more importantly the “storyhearing“. You know how Little Red Ridinghood or the New Testament is going to end. That’s not why you read it. You read it because, once again, you want to feel the emotions involved in the tale, and learn the lessons that it teaches you -perhaps the very repetition is part of the experience (rituals, dancing, learning, etc).

Interactive media can allow you to live inside a story, something I dream of every time I close a wonderful novel after reading the last page as slowly as possible, postponing the inevitable ending. With interactive media, things don’t need to end, goodbyes are obsololete, life is forever. Forever is a tiny bit of data, resting in the palm of your hand.

Everything is relationships

Posted by Michael on May 31st, 2006, in Development

This follows the individualistic model of describing personality and character growth discussed here. The idea was to lead evolution of a character’s personality by punishing and rewarding it for doing certain things. Whether an action would be rewarded or punished would be switched randomly once in a while, to avoid singlemindedness.

How about actions that involve relationships with other characters? Surely you can’t just randomly switch the approval on or off. Think of a pet dog, for instance: once a character grows fond of it, in reality, there would be no way to undo that!
Relationships should be excluded from this individualistic model all together, really. A relationship should be something that characters develop together.

But couldn’t you consider all interactions, even those with inanimate objects, to be forms of relationships?
Only to some extent because if one of the partners in the relationship is inanimate, it will not be able to perform any actions so the system can ignore it. On the other hand, even though an object is inanimate, the character might still treat it as if it were a character. People are fond of their stuff. If a character liked playing with a ball, it will hang on to the ball more than if the ball was thrown in its face.

You could think of solitary behaviour as expressing a character’s relationship with the world (or at least its current environment).
True. Perhaps the focus should be exclusively on relationships, then. And it is a character’s relationships that grow and not its personality. Starting values for actions would be replaced by neutral values for all things that the character hasn’t met yet.

But characters should not be blank slates like that! It’s not because Little Red Ridinghood has never met the wolf that she wouldn’t be afraid of it when she does!
Right. In fact, most objects would be like that. Only completely alien things would be met neutrally.

It would not be very practical to pre-define initial values of all relationships in the world. It would be an immense task and it would make it difficult to add new things.
We could solve this be defining a fixed number of classes or categories. And then giving an initial relationship value to each class.

This would mean that Little Red Ridinghood’s response to each different Wolf would be the same, even though some might look cute to her and others frightening.
Such important characters should just form a class on their own. And the initial relationship should be defined individually.
At least towards other avatars. Towards a bird in the forest, all wolves can be defined by one class.

But then you need at least two sets of classes.
We do, anyway. In the sense that we have the classes and we have the individuals. Even though a character may start the game with a preconditioned relationship with all animals (=class), when it meets and interacts with a particular animal (=individual), it will develop a unique relationship with this animal. Henceforth, this particular animal will be excluded from the class and treated as an individual.

So every character in the game walks around with an ordered list of values for relationships with individuals first, followed by a list of values for relationships with classes?
Yep.

Personality and growth

Posted by Michael on May 31st, 2006, in Development

A simplified model

Say all autonomous characters have the same list of possible actions to choose from. The likelihood of a particular action being chosen is defined by a value. When petting the cat has a value of 0.8 and climbing the tree has a value of 0.5, then the character will be more likely to pet the cat.
Different personalities can be defined by different values for the actions of each character.

Every time a character performs a certain action, it is rewarded or punished for doing so by respectively adding to or substracting from the value of the action. This way a character can grow and its personality can develop.

Whether a certain action is rewarded or punished is defined by the author. The author could, e.g. define starting values and desired ending values for each action, that way ensuring that the character will develop a certain way.

Objections

The requirement to come up with a value for each action of each character is not a trivial task. Not only could it be a lot of work, it is potentially a very tricky balancing act that would require thorough testing.
On the one hand, perhaps it’s worth the trouble.
On the other, perhaps it is possible to value actions in groups.

The value of an action depends on the situation. Eating a cake on the verge of indigestion is a bad idea and should be punished. But when the character is hungry, it should be rewarded.
Correct. Rules could be added to decide when an action should be punished and when rewarded. But then the authoring workload becomes even larger and the system a lot less simple.

Also, continuously rewarding a character for doing the same thing, will end up having it do the same thing even more. So the system would culminate in a “monoculture”
Perhaps randomness can come to the rescue here. Perhaps it can even replace the rules mentioned above. We could, periodically change the punish or reward response to actions. This may coincide with the attention span idea, mentioned elswehere. That way we would also reduce the workload for the author since desired ending values become irrelevant.

But you’re still stuck with defining the values of the actions to begin with. These are a very powerful way to define personality and cannot be left to chance.
Yes. Maybe the author will have to do a bit of work here.