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.

Newcomers DBPro Corner / AI problem

Author
Message
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 27th Aug 2005 05:12
I'm trying to make a pong game and i'm having some trouble with the AI.

My AI code is



the ai code is

if playerpos2#>bally#
playerpos2#=playerpos2#-player2movespeed#
endif
if playerpos2#<bally#
player2pos#=player2pos#+player2movespeed#
endif

"I will work harder... if you ask me enough times."
SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 27th Aug 2005 11:07
if that's wrong, why is it wrong?

what do you actually want it to do?

...maybe one day I'll finish a project
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 27th Aug 2005 11:15
Programmer of Power,

Try this:




+NanoBrain+
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 27th Aug 2005 13:58
I tried,
to try and regulate how fast it moves but the ai seems unresponsive.

"I will work harder... if you ask me enough times."
Fox Dark Master
20
Years of Service
User Offline
Joined: 20th Jul 2004
Location: Portugal
Posted: 29th Aug 2005 12:46
Try to draw the A.I in a piece of paper or make a schemme of it like this: http://www.ideiasinc.net/truephantasy/AI.ppt


True Phantasy
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 29th Aug 2005 13:06
Interesting idea Fox Dark Master. I never really thought of doing it that way. I wrote out the code when I was first figuring it out, but I never used a chart that way. Thanks for the advice.

"I will work harder... if you ask me enough times."
Fox Dark Master
20
Years of Service
User Offline
Joined: 20th Jul 2004
Location: Portugal
Posted: 29th Aug 2005 13:41
Sorry bout the example cause it's in portuguese (But is one of the most talked laguages in da world!!!). That's an example for gathering ideias about how it will work (Finelly , something usefull that i've learn in programming classes ^^).
One last advice, try not to folow to munch the example cause i've notice that the A.I. is very static. That's why i've introduce the Emotion (Emoções) factor, but i really don't know how will afect the decisions of da program.
Anyways good luck and i'll continue my research on A.I.


True Phantasy

Login to post a reply

Server time is: 2024-11-27 18:44:02
Your offset time is: 2024-11-27 18:44:02