AI Games

Started by Abdou23, Sun 08/07/2007 17:34:50

Previous topic - Next topic

Abdou23

Can i make ai games and make arteficial intelligence like Skyforce games?
or tekken or even final fantasy or diablo?
Can enemys take actions on there own?

Ashen

#1
The short and slightly uninformative answer is: Yes, if you're willing to code it.

There's no default code to make AI characters, and depending on how complex you want the AI to be it could be a great deal of work, but there's no reason most things wouldn't be possible with some effort. If you can come up with some specific examples, try a forum search to see if someone's already done the work for you. If not, and you can't figure it out, feel free to ask. But remember, the more specific you can be about what you want, what you've tried and what's going wrong, the more likely you are to get useful replies.
I know what you're thinking ... Don't think that.

Akatosh

Really simple AIs as in Diablo should be easy enough to script, but I'd advise you to grab the CCS plugin first - it makes things a lot easier.

Monsieur OUXX

#3
AIs are based on two things :

1/ A state machine representing the states which the "moods" of the character go through (defending, attacking, running away, etc.). It describes how the character goes from one state to another. Example : he's attacking, but goes defending on a certain condition*, then attacking again or running away**, etc.

* example : i'm attacking a lot myself so he should go defending
** condition example : my lifepoints are twice higher than his so he should run away

2/ An algorithm, telling "what the NPC should do on it's next turn in response of this particular action the main player did". Example : "if i cast a frozing spell, he should cast a fire spell, but only if his mana points don't go too low". For your algorithm to be more effcient, you should calculate these things several turns in advance, exploring all possibilities, and find the most efficient combination (after calculation you find out that "move" then "cast" then "run away" will be more efficient than any other actions --> you apply this combination and calculate it all again at the beginning of the next turn)


Note : there is a state machine module existing somewhere; i remember it confused an admin a lot because he didn't know of what use it could be...




 

Abdou23

Quote from: Akatosh on Sun 08/07/2007 18:31:10
Really simple AIs as in Diablo should be easy enough to script, but I'd advise you to grab the CCS plugin first - it makes things a lot easier.



This is damaged or containing errors i couldn't run it

R4L

It probably won't run on the newest version of AGS.

Quote
Note : there is a state machine module existing somewhere; i remember it confused an admin a lot because he didn't know of what use it could be...

This won't run on the newest AGS either; I've already tried.

strazer

Quote from: R4L on Mon 09/07/2007 20:26:29
Quote
Note : there is a state machine module existing somewhere; i remember it confused an admin a lot because he didn't know of what use it could be...

This won't run on the newest AGS either; I've already tried.

Well, then tell the author, it won't fix itself. Knowing that people are trying to use your module can be a powerful motivator.

Scorpiorus

As for the CCS plugin, it probably doesn't seem to work because of the well-known "const string" change in the script syntax.

But I'm not sure whether it's worth fixing it though, as we have a module to do the same stuff. So now, I'd recommend to use strazer's CharacterControl. It provides some extra features and what's more important, it doesn't break cross-platform compatibility unlike plugins.

SMF spam blocked by CleanTalk