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
Rennekon
22
Years of Service
User Offline
Joined: 7th Oct 2003
Location:
Posted: 16th Oct 2003 17:02
Is it possible to put AI into a game and if so could someone tell me how?

John "Dark Lord of Angel Destroying Destiny" Pringlebee, maybe?
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th Oct 2003 17:17
Yes it is possible, but no we can't ... you have given us no clue as to what type of game you want to do. Is it a board game? fps? rts? a fighting game?
Codger
23
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 16th Oct 2003 17:25
In reality all Artificial Intelligence boils down to is a simple decision tree. If condition “a� then do this, if “b� do that. The only other thing is to allow the computer some randomness i.e. if conditions “a� and “b� are equal use random function to choose between.

System
PIII 650 MZ H.P. Pavillion
394 Mem GeForce 4 400MX
Rennekon
22
Years of Service
User Offline
Joined: 7th Oct 2003
Location:
Posted: 16th Oct 2003 17:25
Sry for being scant on the details. The game we're trying to create is sort of hard to describe. Basically a alien crash lands in a school and takes over the princapal. A kid has to trick the alien into his own defeat . What type is this?

John "Dark Lord of Angel Destroying Destiny" Pringlebee, maybe?
adr
23
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 16th Oct 2003 18:35 Edited at: 16th Oct 2003 18:36
That's still not really enough....

I try not to think about AI specifically, just build it into the same rules as basic gameplay. In one of my many unfinished masterpieces, you could consider a computer-controlled player fetching the ball to be AI, but it's just a set of actions until a condition is met :

(sorry to do it c-style, but I think it reads easier)

while (!bGotBall)
{
faceTheBall()
walkForward()
if (playerTouchingBall()) bGotBall = true;
}

so, this player will be forever chasing the ball until he gets it. That's one tiny little subset of AI. You need to take care of path-finding (which can include waypoints, or just getting around obstacles), enemy ai (flee/attack principles), team ai (if applicable) ....

In true DBP newcomer style, it sounds like you've bitten off more than you can chew. That's not a slight on you, it just seems that plenty of recent newcomers don't seem to appreciate that a programming language is just that - a programming language, nothing more.

Can I ask you a Question?
What is it?
It's an interrogative form of sentence, used to test knowledge. But that's not important right now.

Login to post a reply

Server time is: 2026-07-26 09:29:24
Your offset time is: 2026-07-26 09:29:24