Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Jozers
19
Years of Service
User Offline
Joined: 19th Nov 2004
Location: If I knew I would tell you!!
Posted: 20th Jan 2006 17:03 Edited at: 20th Jan 2006 17:04
After using dbc for several years on and off, I am finding it hard to complete games because i become confused when it comes to Enemy A.I. I have tryed to make simple games where you must defeat one monster, etc, but haven't succeeded. But I have decided to start a new project (possibly a FPS) which will need A.I.

I was wondering whether someone could direct me to some good tutorials or would be so kind to produce a small snipet with comments with a basic A.I system.

BTW i have done the tutorials on the developer's section of this website

Cheers

Life is like a box of chocolates...
Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 20th Jan 2006 17:40
I have some Goblin AI in a zip file on the Open MMORPG forum - the goblins in question have a parent base (a tent in this case) and wander around the tent until you get close.

They then chase you. If you run away fast enough, they abandon the chase and go back to their base.

I'm sure if you can get to grips with the code, you could have them attacking, or shooting or something - and the models are of course up to you (there were only placeholders).

Hope that can help you.
Jozers
19
Years of Service
User Offline
Joined: 19th Nov 2004
Location: If I knew I would tell you!!
Posted: 20th Jan 2006 20:27
cheers for that tinkergirl, i'll check it out later tonight when i get time too.

If you know any other examples please let me know?

Life is like a box of chocolates...
StevetS
20
Years of Service
User Offline
Joined: 19th May 2004
Location:
Posted: 20th Jan 2006 21:29 Edited at: 23rd Jan 2006 16:54
Hi,

*EDIT to remove the bumph!

When devising your game you need to consider which variables you want to introduce to provide the most suitable and realistically challenging situation possible. The inclusion of a limited number could give a good representation of intelligence to the user/player:

npc_health – a npc with high health may have a higher chance of engaging a player
npc_fear – a npc with a low fear may fight, but with a high fear may flee
npc_bravery(!) – a npc may be more likely to stay and fight if other npcs are in the vicinity and likely to engage in a fire-fight.
npc_anger – a certain anger level may cause a npc to ignore its fear and face an opponent
npc_wary – a high level may cause an npc to check for the presence of a player more often, i.e detecting players at a further range or scanning for a player more often.

You can check for the above pretty much on a dice-roll basis. eg. if a random number between 1 and 10 is greater than 7 then the npc scans for the player location within a certain range.

crighton
18
Years of Service
User Offline
Joined: 5th Nov 2005
Location: In your soup.
Posted: 23rd Jan 2006 14:33
My understanding of A.I. is really just a computer programmed to copy what you would normally do in the game.
Imagine a first person shooter where you are the bad guy gaurding a base. Then you hear a sound/see someone or see the fellow standing next to you loose his head from a sniper blast.
Then you would think of how you would react to it.
1. Would you run and hide screaming.
2. duck down, and pear over a box to see if anyone is about
3. start running around looking for what ever it was you heard or saw.
4. .... there's plenty more.
So, then you just change the state of your self to one of these modes and act apon it.
Same thing for the enemy AI.

In my god sim, I just get the other god to make his base, get him to randomly look at mine, and if he has the mana and feels(used loosely) like it, then he will cast a spell, or he will just go back to creating his base.
This works beautifully for me, if i didnt make, i would think dam this god is clever. But all he is really doin is acting apon some random states at random times.

Anyway, thats just my take on it. I hope this has helped a little.
cheers
crighton


Why are the forgotten always remembered? But no-one remembers me?!
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 23rd Jan 2006 18:32
can i play your god sim?

life's one big game
crighton
18
Years of Service
User Offline
Joined: 5th Nov 2005
Location: In your soup.
Posted: 24th Jan 2006 02:50
yes
http://forum.thegamecreators.com/?m=forum_view&t=68923&b=8

enjoy


Why are the forgotten always remembered? But no-one remembers me?!

Login to post a reply

Server time is: 2024-09-24 15:32:06
Your offset time is: 2024-09-24 15:32:06