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.

DarkBASIC Discussion / AI problem

Author
Message
gamer n00b
19
Years of Service
User Offline
Joined: 14th Jan 2006
Location:
Posted: 24th Jan 2006 03:24

How can i make then other bar run smoother?
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 24th Jan 2006 09:18
Just make it switch direction when the ball is going to miss it. So you would use the Z value greater than the bat, and less than the bat to move the AI bat, but also with a small (random) delay so that the AI can miss.

gamer n00b
19
Years of Service
User Offline
Joined: 14th Jan 2006
Location:
Posted: 24th Jan 2006 21:34
how would i recode that
devastation
19
Years of Service
User Offline
Joined: 11th Aug 2005
Location:
Posted: 25th Jan 2006 00:08
you could have the computer only check it's position with the balls every 5th or 6th iteration but move every iteration to simulate reaction time

also smoothvalue(value, target value, step) is nice to get things smooth.

and good for u for starting with pong. i've seen many people pulled from their computer chairs and shot on the spot for asking why they cant figure out billboarding and pathfinding when they've not even done a hello world

peace
---Jeff

Your signature has been erased by a mod because it's larger than 600x120...

Login to post a reply

Server time is: 2025-05-23 00:45:18
Your offset time is: 2025-05-23 00:45:18