Simon_Templar![]() Member Posts: 330 From: Eau Claire, WI USA Registered: 10-25-2004 |
I have begun to delve into the topic of Game AI. I'm particularly interested in developing AI to run NPC's in a role playing game. Have any of you guys dealt with this before, or thought much about it? ------------------ |
|
goop2![]() Member Posts: 1059 From: Registered: 06-30-2004 |
uh..... good work ST! lol, I dont code... YET. ONE DAY I SHALL TAKE OVER THE WORLD WITH MY.... CODE OF..... DOOM.... OR... something..... ------------------ [This message has been edited by goop2 (edited March 14, 2006).] |
|
Lava Member Posts: 1905 From: Registered: 01-26-2005 |
I have, in fact I found a good enemy-chase-character function in Blitz3D and I hope to implement it by the 3rd Adventure Game demo ![]() ------------------ [This message has been edited by lava (edited March 14, 2006).] |
|
firemaker103![]() Member Posts: 643 From: Registered: 07-13-2005 |
If only we could have a MakeHalfLife2() function..... *sigh* .. For one thing, AI is just really hard. Just slap some online play instead ------------------ |
|
Ereon![]() Member Posts: 1018 From: Ohio, United States Registered: 04-12-2005 |
I have an excellent book on the subject as well as some interesting ideas (genetic game style algorithims anyone ![]() ------------------ |
|
goop2![]() Member Posts: 1059 From: Registered: 06-30-2004 |
Id rather a Makexbox() function ------------------ |
|
Lava Member Posts: 1905 From: Registered: 01-26-2005 |
here's a freebie that you can plug into your Blitz3d source code, it's the enemy chase thing I wrote.
------------------ |
|
goop2![]() Member Posts: 1059 From: Registered: 06-30-2004 |
you mean your selling the rest? ------------------ |
|
Lava Member Posts: 1905 From: Registered: 01-26-2005 |
lol, well if I was to go into commerical game writing I would keep the source confidential unless you bought it or something ![]() ------------------ |
|
Ereon![]() Member Posts: 1018 From: Ohio, United States Registered: 04-12-2005 |
I'm working on an AI algorithim for Soul Catcher that adjusts the enemies to the player's fighting style working off of the principles of microevolution. Every time you fight and enemy its success is measured via a mathematical equation (how long it survived, how much damage it did to you, ect). Each time an enemy is creating its abilities are randomized to a certain point, and every 5 enemies the "most successful" enemy is used as the base stats for the next set of randomizations for the next "generation". The end result is a constantly evolving set of enemies that adapt to your combat style, the enemies who are the most successful "pass on" their particular mix of abilities to make a generation that is (hopefully) better than the last one. This system of selection continues through the game adapting constantly to your play style. All this is done mathematically with arrays and such in the game and random number generators. ------------------ |
|
crazyishone![]() Member Posts: 1685 From: Registered: 08-25-2004 |
That's a great idea, but you might want to put in some form of checking. If you have the most successful enemy attributes being passed on and getting better, completely unchecked, your player might be fighting a bunch of Agent Smiths by the end of level 3. ------------------ Will the emo kids be my friends now? |
|
Ereon![]() Member Posts: 1018 From: Ohio, United States Registered: 04-12-2005 |
Exactly........*lightning flashes in the background as Ereon cackles diabolically* ------------------ |
|
crazyishone![]() Member Posts: 1685 From: Registered: 08-25-2004 |
I look forward to the open beta. ------------------ Will the emo kids be my friends now? |
|
Jari![]() Member Posts: 1471 From: Helsinki, Finland Registered: 03-11-2005 |
Yes I have been working with NPC conversation dialogs, but what comes to NPC's movement, there is currently only basic moving from point A to B implemeted because that's all what NPCs in VoHW need. ------------------ [VoHW] (Help needed) [Blog] - Truedisciple (mp3) |
|
NileCoder![]() Junior Member Posts: 8 From: winter park, fl, 32792 Registered: 03-20-2004 |
You should do some research in FSM ( finite state machine ), path finding, and depending how complex your game is, neural networks. You can find most of this by searching the web. If you are doing this in C++, I can lead you toward the right direction. ------------------ |
|
firemaker103![]() Member Posts: 643 From: Registered: 07-13-2005 |
A good tutorial: http://web.archive.org/web/20050319160542/www.blitzcoder.com/cgi-bin/articles/show_article.pl?f=morduun07112003153313.html ------------------ |
|
Simon_Templar![]() Member Posts: 330 From: Eau Claire, WI USA Registered: 10-25-2004 |
I have a basic understanding of finite state machines and basic chase/evade. I think in an RPG the optimum for me would be to have a blend with the non essential characters being fairly basic if then kind of AI, but with more story important characters having a responsive/evolving AI. I haven't read much on neural nets as of yet I'll probably check that out next. What I'm really interested in right now is the concept of introducing something to simulate the way people make decisions, based on risk/benefit, but also emotional/ethical values, and sometimes just a good ole bit of randomness. ------------------ |
|
Ereon![]() Member Posts: 1018 From: Ohio, United States Registered: 04-12-2005 |
I like the AI system that's being used in Morrowind:Oblivion, its based off of a need system, if a character needs something (like food) it will go get it, and if it doesn't feel that its getting enough it will come up with a way to get more. Its a very simple but very interesting concept, because most humans, unless they choose otherwise, and driven by the system of needs/wants anyway, so its a pretty realistic system. ------------------ |
|
Simon_Templar![]() Member Posts: 330 From: Eau Claire, WI USA Registered: 10-25-2004 |
Thats an interesting concept. I was thinking of something like that where each NPC may have a list of needs or wants, I'd call it a priority list.. normally the NPC would have a list of items with differing importance, it would include things like food, money, but also staying alive, honor, protecting something (if they are guards). Some of the priorities may increase with time (such as food). To simulate the unpredicatbility of human decisions I'd have the NPC's action be determined by a radnom die roll which is modified by the priority list.
------------------ |