Interactivity is fun!

Posted by Michael on December 20th, 2006, in Development

I was working on the Decision System and implemented The Endless Forest‘s Action Strip to show pictures for representing the Opportunities in the list that was filtered by the Filter of Distance. Then I made the pictures clickable so the player could choose a Goal for the Actor. It’s surprising to experience how much fun just telling a character where to go is. And to sit there and wonder what it will “think” of to do next. Avatars izz teh cool! 8) Autonomous characters are overrated. 😉



The Actor as Avatar

Posted by Michael on December 20th, 2006, in Development

When a Drama Princess Actor functions as the player’s Avatar, the player will not only make the final decisions concerning the Goal to choose but also control the movement of the Actor.

Autonomous Actors get their movement information from the behaviour that was selected as a Goal. For an Avatar Actor, in most cases, a movement command from the player will seem like a “go to certain position” behaviour. So perhaps this is how it should be triggered.

Perhaps the player’s Avatar has a Task to “go to the target defined by the player” that they will (almost?) always prefer to do over anything else.

Avatars of Madhvacharya.

One problem with this is that we would like the choice of Avatar to be dynamic. To allow for the possibility of the player switch avatars during the course of the game. So far, Tasks have been static pre-defined behaviours attached to an Actor by the author. Perhaps all Actors can have a latent “go to the player-defined target” Task with a Condition. Opportunities already come with Conditions. And a Task is a kind of Opportunity.

This Conditional Task could also be used to force Actors that are not Avatars to go to a certain location. For use in scripted cut scenes, for instance. So rather than having this Task look at a single set of coordinates, each Actor should have its own set of coordinates that can be changed, either by the player or by a script. This could simply change the Target Position variable that is already used by the Behaviours.

The problem with this “go to the player-defined position” Task is that, as a Behaviour, it would go through the Decision System and then be presented as a menu choice to the player. This makes no sense in terms of interface. The player should have direct control over the avatar.

An override is required. Player-controlled movement as a Behaviour is not suitable.

We need an interface to immediately set the Goal of an Actor to “go to this target position”. The logic to end the previous behaviour before starting the new one can still be used (so the Actor first stands up when they were sitting down e.g.).
That’s fine for point-and-click. For direct control (joystick, cursor keys, dragging), a “follow input directions” Goal should be used that doesn’t end until the player explicitly lets go of the joystick, cursor keys or mouse button.

The nice thing about the Drama Princess concept is that these new Behaviours don’t need to be built into the Actors. An Actor can do anything you throw at them, providing you give them enough information.

So basically, at any time (and without explicitly defining an Actor as Avatar), the player can override any Actor’s Decision System and force them to go somewhere. Cool! 8)

Action System test

Posted by Michael on December 15th, 2006, in Development

Here’s a little demo of the current state of the project. This concludes the work on the Action System so far. There’s a million little things that we would like to do but with respect to our main motto (“It’s better to make something than nothing”), we will proceed to start building the second big chunk of Drama Princess, the Decision System, next week.

Action System test 3

There are four behaviours in this demo that each of the actors can perform: walk to a random position, walk to a random position and sit down, and walk to a random object and walk to the other actor. In the case of the latter, a “Shock” is sent to the other actor that makes him or her turn around and face the actor (not very elegantly for now 😉 ).

These behaviours are just triggered at random. When a behaviour is chosen while another one is still playing, the system first ends the other one. Every behaviour is stored in its own file and loaded in memory every time the behaviour is triggered. If special animations are required to perform the behaviour (like sitting, e.g.), these are included in the behaviour file.

Every actor uses the exact same systems (not copies or instances) with different parameters (stored in an array table). In theory, the system can support an unlimited number of actors (until your videocard gives up) but the maximum in this demo is set to 10 (press the space bar to add an actor).

There is no collision detection but the actors are aware of which objects are close to them. They look at these randomly. If the object is another actor and the other actor looks at them, they will look away.

The idea of this Action System is to give the actors a natural looking idle behaviour with built-in reflexes: spontaneous responses to their environment that do not require any decision making. There’s a lot more we would like to implement (feel free to make suggestions in the comments) but for now it will have to do.

You can download this demo here.
It requires Windows and a 3D videocard.

Curiosity – Shock – Surprise

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

It’s our philosophy to only design for the rule, and not for the exception. So this post is sort of tangential since there’s not so much opportunity for it most of the time.

One of my mental tests for Drama Princess is to imagine what would happen if I, as a player, just “magically” dropped an object in the virtual world, not too far away from the actor. How would they respond?

In the current system, the actor would probably look at it. And then, depending on their relationship with this object and the other objects in the scene, they might go and interact with the new object.

This is not really what one would expect. If an object magically appears, the actor would be extremely curious. There’s a good chance that they would drop everything to go and investigate the new object. This investigation can take several forms, depending on whether the object seems to form a threat or whether it seems attractive.

To provoke this kind of response, the Drama Princess system would generate a Shock. A Shock adds a number of Opportunities to the list that the actor can choose from, and it gives those Opportunities a high Urgency value. The Shock could add an Opportunity for every desired reaction: fear, indifference, attraction. Because of the high Urgency, there’s a very good chance that the actor would “choose” one of these (the one that matches his or her relationship with the object best).

To generate a Shock as the result of user input is easy enough. But could we design a way in which Shocks can be generated by the system itself? (Do we need this?) A system like this would look at what’s going on in the world and generate a Shock when something surprising happens. To do this you need to define “surprising”.

This definition could be a list of equations, containing, amongst others,

  • actors performing interactions that don’t match their relationship
  • something bad happening to another actor (the lower the relationship, the worse it needs to be)

For each of these equations, the Shock Manager would need to have a few Opportunities that can be offered to the actors who are affected by the Shock.

If there’s several actors around, or if a similar response is required multiple times in the game, it would be good to have several ways to respond to the event with the same emotion. Otherwise all actors will perform the same animation and that will look unnatural. This can be partially guided with Conditions that need to be met by parameters in the actor’s definition (Enthusiasm, Faithfulness, Sexual Orientation, Gender, Age). But perhaps one of the Conditions needs to be “if no other actor in the area has chosen this opportunity”.