This post should probably have been split into several different ones. It deals with problems that showed up after a first implementation of the Emotion Impact system. It may also explain a few basic concepts. And it ends with figuring out how to add lag to the system. But overall it’s one of those streams of consciousness that I don’t expect anyone to actually read. 😉
If you want to anyway, be my guest! 🙂
Drama Princess is based on the link, illustrated above, between the intimacy of the opportunities offered by objects and the affection that the actor feels for the object.
Note that the idea of relationships is simply a metaphor. We might have given things abstract names and said that if the actor is more yellow concerning an object, he will be inclined to do more blue actions. Since we are often going to use Drama Princess for expressing relationships, this metaphor makes sense. But it shouldn’t be taken too literally.
The reason for this is not to simulate emotions (!) but to allow an actor to display a gradually evolving pattern of behaviour. For a while the actor will be “into” doing a certain type of things and later he’ll do something else. But he should not flip back and forth between behaviours that are very different.
We thought it would be good idea to connect this evolution of the character to objects, rather than just to his own mood. This way his behaviour would be more varied but still consistent with regards to the objects.
“Objects” can be inanimate things, other actors or an environment. What turns them into an “object” is that they offer opportunities for interactions from which an actor can choose: you can do things with them.
The actor will choose an interaction that matches the affection that he feels for the object that offers the opportunity to interact. If his affection for this object did not change, he would do the same number of things with this object throughout the game. As per the graph above, when he cares about something, he would talk to it, greet it and hug it. Nothing else. The highlighted zone in the graph would not move. Boring and unbelievable.
So we need the affection the change.
In our first design, the affection improved every time an interaction took place. Very simple. So as an actor interacts more with an objects, new opportunities would become available (and old ones would disappear). The problem with the simplicity of this idea was that the outcome could only be a total orgy of everybody loving everything, since affection could only go up. So we added some elements that could reduce affection, like seperation and shock. But that seemed artificial. And only being able to improve relationships would restrict the potential of the system.
To allow for richer behaviour, we added the possibility of affection decreasing as a result of interactions as well. That opened up our very own mini-can of worms… 🙁
Suddenly we needed some logic to decide whether affection would be changed favourably or not, after an interaction. Which is a very hard thing to decide on. The idea we came up with was that opportunities with lower intimacy than the affection that the actor feels would reduce that affection. But this feels too strict for a grey-zone thing like emotions. Take the example above: is it really fair to reduce the affection for somebody you care about because you greeted him? Perhaps greeting is a bit distant, sure, but it shouldn’t impact the relationship.
So we need another algorithm to change the affection after an interaction.
What if the affection keeps going up as long as you do things that are in the range of your current affection? Perhaps it goes up more as they are more intimate but it never drops. Unless you do something that is out of the range. If it is too intimate, the affection goes down. And if it is too little intimate (i.e. hateful e.g.), it goes down as well.
The size of the range could be defined by the Enthusiasm of the actor.
Which is where we run into our next problem: whose Enthusiasm?
And whose range, for that matter?
An inanimate item does not feel affection. But when interactions between two actors take place, the affection of both actors is changed.
We have decided early on that both actors agree on the state of their relationship, so every interaction would alter the affection of both actors for each other in the same way. This is for reasons of simplicity. And because the relationship is only a metaphor anyway.
Currently the algorithm is rather complex: affection is changed based on a comparison of the intimacy of the interaction with the enthusiasm of the object. In other words, if you do something that the other person find too intimate, your relationship suffers. Ditto if it seems not intimate enough.
But this is too much like flipping a coin.
Perhaps, instead, the size of the range within which affection will improve is based on the average of the Enthusiasm of both Actors. This will make very eager actors seem more moderate and shy actors more pro-active. Which can be read as the result of these actors influencing each other’s behaviour.
In the current design, for negative affections, this logic would be reversed: if you do something that suits your bad relationship more or less, it will get worse. If you do something that is extraordinarily nice, it will improve. Or if you do something that is much worse, it will improve as well.
The latter seems a bit odd… But, hey, evil people are weird, right? They might accidentally end up liking each other because they fight so much.
The problem is the definition of good and evil. 🙂
We can’t say that a relationship of +0.1 (on a scale of -1 to +1) is good or a relationship of -0.1 is bad. We need a gradual transition, at least, or a gradual scale between the two extremes, preferably.
Currently we have solved this by making the affection change more random as the relationship moves towards neutrality. But the result of this is simply endless jitter of affection in the neutral zone. Which is not where you want your actors to be.
We could get rid of the notion of reversing the logic for negative relationships. And allow all relationships to improve as long as the actors do things that lie in the range. This would mean that people who are fighting each other will ignore each other after a while and perhaps even become friends. Only when they do things that are too loving or harteful, the relationship gets worse.
But this brings us back to our original problem of everything ultimately ending up in a love-orgy. Not as fast, perhaps, but still.
What if the actor is your avatar and you want to experiment with becoming enemies with another actor? How do you do that?
How do you become somebody’s enemy? Well, you do really nasty things to them (or extremely nice ones as long as it is clear that they are insincere). Things, in Drama Princess lingo, that are outside of the affection range with a much lower intimacy than suitable for the relationship.
Currently the opportunity selection logic doesn’t allow for choosing things outside of the range (except for through randomness or external factors like shock and urgency). So we’re stuck being nice.
The way this is currently fixed is by Attitude. The selection logic is based on Desire and not on Affection as such. Desire is Affection plus Attitude (more or less). If Attitude is negative, Desire creates a range that is lower than the Affection range. As a result, it is possible to do things that fall outside of the range.
So the range of actions to choose from does not lie at the same place as the range that is used to evaluate the action for emotional impact. The first is defined by Desire of the Actor for a future state, the latter by existing Affection between the Actor and the Object.
This is a good system, I think. The only problem is, again, the definition of good and evil. 🙂
Attitude needs to have some consistency. Otherwise relationships jitter in place. But we don’t want actors to never change their attitudes. That’s not as interesting as seeing actors change their opinion about certain objects. Changing this opinion is not trivial however and should be fairly rare. The Attitude that they start the game with should be one that they stick to most of the time. This Attitude could be set at random in the beginning of the game, or pre-defined by the author. And once in a while, a coin is flipped to see if we should change Attitude.
Currently Attitude is consistent with Affection: the bigger the affection, the more chance the Attitude will be positive. The smaller, the more chance it will be negative. The more neutral, the more chance it will be random. Again, the problem of jittering stasis.
So now we can become enemies if our Attitude is negative. The general rule remains that interacting with somebody, increases your affection for him. But if your attitude is negative, there is more chance of doing things that fall outside of the range, negatively. This is no different from a positive Attitude which may make things fall outside of the range positively. So Attitude would have no impact at all!… Unless a negative Attitude shifts or scales the affection range towards the negative considerably more than a positive one does towards the positive.
In general, we are all made to love each other. But if we have a negative attitude, the chance of hating becomes bigger.
How do we define Attitude for the player’s avatar?
Currently, your actions are judged to be good or bad. This judging is too fiddly, however, and leads to stagnation because of its randomness.
Also, the actions that you get to choose from are based on your current Affection and your Attitude. Affection can start neutrally and evolve. But how do we define your Attitude?
Perhaps Attitude is defined dynamically, but gradually. You start with a neutral Attitude about everything. And you get an average range of actions to choose from, one that matches your affection perfectly. In other words: you have no Desire. When you do something that is on the good side of your current affection, your Attitude Score gets a point. When you do someting negative, it loses one. If your Attitude Score reaches +10, your Attitude become officially “positive”. This means you have Desire and allows the game to offer you new opportunities in a range towards more intimacy. We keep track of your choices and if you do so many “baddish” things in a row that your Attitude Score drops to -10, we change the Attitude to negative and show you the darker side of the spectrum of possible actions.
Perhaps the interface can show graphically which interactions the game considers good or bad.
Because it’s still problematic: if “greet” is only vaguely worse than “talk”, does it make sense to define ten times “greet” as explicitly worse than “talk”?
Could this be used for the autonomous characters as well? Not really because the randomness when Attitude is neutral would force them to dabble endlessly in the neutral zone. They would probably never even reach an Attitude Score of +10 or -10. The player does this intentionally.
And I sort of like how the author gets to define the Attitude of the Actors towards the objects. Attitude about most objects might be set randomly, but Attitude about the ones that matter to the story (other actors e.g.) can be set to match the author’s expectations. If the author doesn’t have any such expectations, they can still be set randomly. The most important thing is that there is an Attitude, not which one it is.
A problem of relationships always getting better when Attitude is positive and worse when Attitude is negative, is that all relationships will ultimately end up in their extremes. Then we have the opposite of jitter in the grey zone but we stagnate in the extremes. Stagnation in and of itself is not too bad (and we still have Shocks to mess things up), but the fact that it only happens in the extremes is.
Most relationships, in fact, should never even reach the extreme. They should in fact stagnate at a certain point between neutrality and an extreme.
This also means that a lot of behaviours will go by unused. Extreme behaviours with objects that nobody develops an extreme affection for. That’s a waste of resources.
A solution for this is to limit the possible affection for certain objects. But that doesn’t solve the “extreme affection fate” mentioned above. It just moves it to a less extreme position, where it stagnates. And all actors would stagnate at the same point. Which is the core of the issue.
How can we stagnate the affection of different actors for the same object at different points? Points that will, most likely, not be either of the extreme ends of the affection spectrum.
Perhaps jitter can work in our favour here… jitter, or the continuous flipping of a state, causes the appearance of stagnation, even though the system is very dynamic. To make relationships stagnate, we could simply start flipping the Attitude more when the relationship reaches the point when it should stagnate.
Where this point is, is actually actually pretty clear: it’s either in the middle between neutral and bad or in the middle between neutral and good. We have opinions about most things we know. But we’re only extreme about a few. And there’s very few things we are completely indifferent about. Enthusiasm could define how close this point is to one of the extremes.
So basically, rather than making Attitude random in the neutral zone, as we are currently doing, we make it more random as the relationship reaches its point of most likely stagnasis. Through chance (or persistence in the case of the avatar), a relationship could still break through this point and evolve towards the extreme. This would be like the difficult transition between friendship and love that once it has been made, remains solidly in the love zone.
This still feels unsatisfactory. We’re just moving the point of stagnasis and taking a lot of the dynamic out of the system. It may be realistic that relationships stagnate but it’s not dramatic!
What if, rather than having a positive or negative Attitude and changing it once in a while, randomly, we have a target affection that the actor attempts to evolve towards. We change this target affection once in a while, randomly, and the chance that it gets extreme (or neutral, for that matter) is smaller. When the actor has reached the target affection, his desire decreases and the relationship stagnates. Until the target affection is changed.
This idea offers some interesting potential for scripted stories as well.
This does not work for the avatar, though.
The “problem” with the avatar is that the player has agency. He may want to do something specific: get on the good side of the object or on its bad side. How can the player have control over this?
If Attitude is only negative or positive, most interactions will move Affection towards the extreme, which may not be where the player wants the avatar to be. The only way to stagnate a relationship would be to stop interacting with that object (which would end up in decreasing the Affection because of absence).
One solution for this would be to offer the player a wider range of possible interactions. In other words, an avatar’s Desire (or Enthusiasm) is considered to be much greater than that of any of the autonomous characters. If the range is greater, the chance for extreme interactions becomes greater and extreme interactions can change the affection in the opposite way of the Attitude. A series of extreme interactions could flip the Attitude.
Attitude could still be defined as a target affection for the avatar but rather than simply positive or negative, it is defined as current affection plus a bit or minus a bit. Contrary to autonomous actors, the avatar’s destination is in the hands of the player. And that’s exactly where it belongs. 🙂
Maybe the avatar doesn’t need Attitude at all and the player takes care of the direction in which the relationship should evolve. This is possible if the range of possible actions for the avatar is wider than that for the autonomous actors. I like how this empowers the player and makes the avatar less autonomous.
Posted on January 7, 2007 at 5:27 pm
Wow…I read that. O.O In fact I read all your posts since the one with the little video-thing.
Most of this goes completely over my head. Occasionally I reach a little pocket of understanding, but my 13-going-on-14 brain can’t understand the vast majority of what you talk about.
What I CAN understand, however, sounds good. At the beginning of the post I was remembering the scene in Donnie Dark where the main character is asked to place a serious of scenarios on a scale from “fear” to “love” and argues that the spectrum of human emotion is far too complex to be narrowed down to one scale…at first I was remembering that, when only the link between Intimacy and Affection was being explored, but now Desire, Enthusiasm and all those other confusing things are thrown in I feel a lot better. =)
Yay for long sentences with not enough commas.
Posted on January 7, 2007 at 11:01 pm
One of the reasons why it this might go over your head is that there is a lot more stuff before the video-thing that I don’t repeat every time. Guess this is more of a personal journal than a public blog. But I have a draft for a very simple summary. Just need to make a few illustrations.
The intention of Drama Princess is not to let the virtual characters express emotions, it is to let the human audience experience them. The single scale is not supposed to represent emotions at all, really. It is just there to guide the behaviour of the characters in a somewhat consistent way. We’re counting on the imagination of the player to generate the emotions.
Posted on January 16, 2007 at 7:29 pm
Have you thought about keeping track of velocity, and modifying that instead of directly changing the Affection or Attitude value? I’m just thinking of how adding velocity to the physics of platform games makes them so much nicer-feeling. Compare the game N with pretty much any other Flash platform game.
I think it could be applied to non-physical things as well, like your concept of Affection. It brings in additional variables, like mass or inertia, how much force is required to change velocity. And also friction, how much the velocity slows down over time.
Let me know if you want more clarification about this idea. 🙂
Posted on January 16, 2007 at 7:39 pm
Just to clarify, I was thinking that adding velocity could help solve the problem of how to get the Affection or Attitude to change smoothly.
Posted on January 16, 2007 at 9:39 pm
Interesting thought to use physics simulation for this. At the moment, that would add too much complexity (too many extra variables). But perhaps in a future version.
Posted on January 19, 2007 at 3:25 am
Oh well, maybe later. 🙂 But anyway, there’s a Gamasutra article that explains using velocity and spatial concepts to apply to “opinion flow” in people:
http://gamasutra.com/features/20060928/cole_01.shtml
I don’t know if you’ve seen it before, but you might find it interesting. It’s the same kind of idea.
Posted on January 19, 2007 at 10:56 am
I had started to read that. And while it’s an interesting idea in and of itself, I stopped reading because it was not useful for what I’m trying to do with Drama Princess. The system described in the article relies too much on individuality of the characters for my taste. I’m more interested in global systems that push characters around. Emotional weather or something like that. I don’t want to deal with characters’ individual opinions and taste. (I only half-believe such a thing exists in real life so why would I try to create it in a virtual world 😉 )
Posted on January 20, 2007 at 2:59 am
Hmmm, I see what you mean. I still think that using velocity could be helpful though. Maybe not necessarily keeping track of individual factors like inertia or friction, but the idea of modifying the rate of change I think is useful. Keep it in mind as a possibility. 😉
I like that metaphor of “emotional weather” pushing the empty characters around. I’ll have to think about that some more.
Posted on January 20, 2007 at 9:31 am
Affection is calculated a bit like velocity in the sense that we (randomly) set a target for it and then every interaction moves the Affection a little bit towards that target. It’s a bit like applying a force in a certain direction. But without acceleration. The speed comes from the amount of interactions.