[angelscript] Game scripting question

  • From: "Daniel Krenn" <daniel@xxxxxxxxxxxxxxxx>
  • To: <angelscript@xxxxxxxxxxxxx>
  • Date: Wed, 3 Mar 2004 22:36:54 +1000

I was wondering if anyone has any real world examples of using an embedded
scripting language such as AngelScript to control character AI..
This is something I've been pondering for some time, but I'm a little lost
as to the direction I should take since there are numerous ways to integrate
scripting support into a game.
What I'm trying to do is set up a server side application that contains
multiple scripted entities that interact with one another, and with their
environment.  Characters should be able to follow routines such as waking
up, going to work at a designated time, heading home at a designated time,
going to sleep, reacting when attacked by either attacking back or fleeing
if the attacker is too great a challenge.

Should the character framework be event based, and if so, should scripts be
used for simple decision making?  or should there be 2 types of scripts..
one for the character's routine, which contains a list of commands / tasks
such as "Move("<Location Name>")", "Pickup("<Item Name>")" etc.. and the
other set of scripts which are event activated e.g. "OnHeartbeat",
"OnAttacked" etc.

I'm really quite lost as to which direction to take - as I mentioned, I've
put a fair amount of thought into this, but I'm still looking to find a
solid solution.

If anyone has any real world examples of integrating AngelScript with a FSM,
setting up event driven scripts / routines etc.. I would be extremely
appreciative if they share them with me (and others) or possibly provide a
breakdown of a solid scripted character framework for me to look at.

Regards,
Daniel.



AngelScript - AngelCode Scripting Library
http://www.angelcode.com/angelscript/

Other related posts: