adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-devel] Event-driven schedules/pathfinding


From: Kai Sterker
Subject: [Adonthell-devel] Event-driven schedules/pathfinding
Date: Tue, 25 Feb 2003 13:23:47 +0100

I've practically finished the new character schedule design and am about
to implement things. The new system is a mix of the concept I developed
a while ago and the recent ideas:

Still, each character has a "manager" schedule and a number of activity
schedules. The difference is that a character's current activity is no
longer chosen by the manager alone. Instead, character activity can also
be set from the outside. In the best case, character behaviour will be
determined by the interaction with other characters.

The manager schedule is only a fallback, in case nothing is there to
influence the character right now. It can also be used to implement
large scale behaviour, like "stay at home during the night, walk the
streets during the day, go to the tavern in the evening".


As we decided last summer, schedules shouldn't be run every game cycle,
as that is a very costly operation. That also means that things like
pathfinding should happen entirely on C++ side. A schedule would only
set the goal, and afterwards it would have no more control over the
actual movement.

However, each schedule would have to provide two special methods:
"goal_reached" and "path_blocked" that would be called by the path
finder as necessary.

However, as a schedule could be replaced by one with higher priority at
any time, the path finder needs also provide the functionality to stop
movement, or to switch goals.


One last note about the player activity schedule. The default activity
schedule would simply listen to certain input events. That is, it will
not be run all the time like it is now, but only when a certain key is
actually pressed.

Furthermore, it would have a low priority. If we want to make in-game
cutscenes, we could simply implement them as player activity with high
priority. The player's manager script would simply restore the normal
keyboard_control schedule. So when a cutscene is over, control would be
automatically returned to the player.

Kai




reply via email to

[Prev in Thread] Current Thread [Next in Thread]