Demo3

First of all new demo of SimpleSteer:

SimpleSteer Demo

This demonstration is supposed to showcase a more complicated movement. Each of the agents has a route of four checkpoints. In demo they move from one checkpoint to the next in a set order, but this can be changed easily because it is handled by a route manager component.

This continuous movement produces a lot of opportunities for equilibria to develop. Handling of these is done on a higher level and are controlled by a branch of a “MoveToLocation” sub-tree. So instead of using steering behaviours, I use the higher level, behaviour tree controlled, agent behaviour. The AIMotor component which actually uses (applies) the accelerations returned by the steering behaviours. It also has functions that allows the AIBrain (decision making component) to give orders to apply accelerations directly.

The first issue with this is detecting the state of equilibrium. My solution for this was to change my way of thinking. Instead of trying to decide wether the agent is ai a such a state, I decided on what the unwanted situations were and then I looked for the characteristics of these situations. So here are the three unwanted situations:

  • agent is stuck on level geometry
  • agent is stuck on other agent
  • the accelerations returned by the steering behaviours cancel each other out

The characteristics of the first two are:

  • touching a vertical surface
  • speed is low
  • the tag of the touching object is NPC or not NPC

The third situations :

  • there are multiple active steering behaviours
  • the sum of the returned accelerations is close to zero

This third situation isn’t handled yet, but the other two are ok. You can see that such a situation is being detected when the agents turn red. You can restart the demo by pressing space on your keyboard.

Advertisements

Tags: , , , , , , ,

One response to “Demo3”

  1. onetinyleap says :

    The demo had a bug. The agents did not visit their checkpoints the way they were supposed to. The issue was with the “MoveToLocation” sub-tree. I must admit that even though I have found it, I don’t exactly understand it. Maybe I’ll be able to figure it out when it’s not 0:48 am.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: