ID:178809
 
Hi all,
For the following question i have already looked through the tutorials and demos and tried to integrate it into my game but it just dosent work so... here I go!


Can someone out there in the far reaches of Byond please show me how do do MONSTER AI!?
i don't know how do do. :P
In response to Airson
Airson wrote:
i don't know how do do. :P

Whats the point of posting then?

-Kappa the Imp
Rinereg wrote:
Can someone out there in the far reaches of Byond please show me how do do MONSTER AI!?

Its obvious that you are patient and diligent in looking for your answers in the sacred texts(docs, tutorials), and as you realized, there is no one section that screams AI! AI! this is not because the author has hidden it, its simply because AI is not some mysterious blackbox that causes great things to happen.

It is easy to think of AI as being just about the monster or enemy, but it really has as much to do with the game world itself. This even includes mob placement. Ai can be more effective due to proper placement on a map.

So far, I have not told you a heck of a lot, I know. Here is a little more meat.

What you need to do is set definate goals regarding what you want your opponent to be able do. You need to write this down, because an idea in your head is simply too nebulous in concept.

Once you understand what the end result is, you need to list the steps to achieving this. For example, to hit with a sword, you need to find out if you hit. This would be the procs.

So now that you have a list of procs, you need to find the commands that will achieve these procs. This is things like oview and rand. using them in the right order will achieve a clean sensible procedure that executes quickly with hopefully no bugs.

Its a lot like doing an outline for an essay. The main topics are your game effects, subtopics are like procedures, and relevant points are the DS commands.

good luck!