Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Abdou23 on Sun 08/07/2007 17:34:50

Title: AI Games
Post by: Abdou23 on Sun 08/07/2007 17:34:50
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?
Title: Re: AI Games
Post by: Ashen on Sun 08/07/2007 18:14:16
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.
Title: Re: AI Games
Post by: 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 (http://www.adventuregamestudio.co.uk/games.php?action=detail&id=186) first - it makes things a lot easier.
Title: Re: AI Games
Post by: Monsieur OUXX on Sun 08/07/2007 21:06:26
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...




Title: Re: AI Games
Post by: Abdou23 on Mon 09/07/2007 19:58:46
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 (http://www.adventuregamestudio.co.uk/games.php?action=detail&id=186) first - it makes things a lot easier.



This is damaged or containing errors i couldn't run it
Title: Re: AI Games
Post by: R4L on Mon 09/07/2007 20:26:29
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.
Title: Re: AI Games
Post by: strazer on Mon 09/07/2007 20:56:42
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 (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=21282), it won't fix itself. Knowing that people are trying to use your module can be a powerful motivator.
Title: Re: AI Games
Post by: Scorpiorus on Mon 09/07/2007 21:19:09
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 (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=28821.0). It provides some extra features and what's more important, it doesn't break cross-platform compatibility unlike plugins.