I'm writing a series AI routines for the AppGameKit platform tier1 in purely physics game to control autonomous characters to the extent that you wind them up and let them go....
The problem I have ran straight into is *not* the simple commands like Seek, Flee, Evade, Arrive or Wander ... those you just call and that's it, they do their simple thing and it's over.
The real problems arise with complex commands ones like Patrol (An area), ... and the key issues seems to center around the autonomous character having to do *multiple* tasks w/in the framework of the screen refreshing and calling/recalling the command w/in the do-loop.
For instance: the Patrol command first constructs a Point Of Visibility Navigation Map (essentially 5 circle sprites arranged in line of sight graph in the world), and the character has to move from one node to the next, visiting each node and then starting over again. Simple for C++, Java, etc ... not so simple in AGK.
Since the command originates in the do-loop (as it must) it gets repeatedly called (which in some cases is a good thing), but in this case that means the same original parameters are always passed in which leads the character to simply goto the first node and stop, always ...
Now in order to move from one node to the other, etc, it must make decisions based upon data that's dynamic (which is easy) but that does *not* depend upon the parameters of the repeatedly calling original function in the do-loop. Does that make sense?
So ... has anyone any experience with this kind of thing whom can give me any pointers? Am I explaining the issue clearly enough?
Many thanks in advance ...
----
From the Desk of Prof Versaggi ...