Quote:
OK, people, let's get a little bit more specific here... Saying that scripting would be cool, attract more users etc is fine, but doesn't help to design a bot. I noticed that in the other threads as well, there is a lot of very interesting discussion going on, but everything is too abstract, no examples, no design proposals (I mean class-wise)... I don't know if it's just me, but I feel that we could be going on like that for months without any clear decisions and any real progress.
|
Exactly. I was about to hit the fist on the table once again.
I have read yesterday all the articles in the Game AI programming wisdom book and I have made my mind regarding this issue.
Scripting language -> whatever one. Simple. Weak-typed. Case-insensitive.
LIMITED.
Runtime machine -> a stack machine. There are good examples of this in the AI prog wisdom book.
Additional libraries -> external DLLs in C/C++ that provide large sets of facilities to be used by the script. This to overcome the limitations of the language.
Intrinsically limited scripting facilities -> why ? because we don't want to provide debug support for evolved third-party code full of bugs.
What to script ? -> the AI character's Think() function. If we stick to the frame scheme:
sense -> think -> act
sensing and action ought to be complete, fully-featured and quick, written in fast C/C++ code. Eventually make "what" to sense requestable by the script in order to lower CPU usage.
Ideally: the whole Think() process ought to be scripted.
Realistically: put AS MANY of the heavy general-purpose funcs (pathfinders, vistable analysis, etc.) in script libraries in C/C++.
What NOT to script: the sensing and action part. The chat engine. The low-level "user interface" that the bot client uses. The sensing part must make available to the bot, at time t, ALL that the bot sees, ALL that the bot hears, ALL that the bot touches. The motile part must take from the script, for date t, HOW for it to move, HOW for it to point its gun and HOW for it to act upon entities and equipment (attack/use/whatever).
How to pass information back and forth from the script to the C code is my last question. Any advice ?
Everything else -> INI files.
Does it answer to your question, Killaruna ?