Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Pong AI...
Index -> Programming, Turing -> Turing Submissions
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Kuntzy




PostPosted: Mon Dec 08, 2003 10:49 pm   Post subject: Pong AI...

Just wanted to see what you thought of the AI, please don't comment about the crappy collosion detection, or the simplicity, i just got started on this.


Pong_GOOD_Mine.zip
 Description:
This is the source code

Download
 Filename:  Pong_GOOD_Mine.zip
 Filesize:  1.98 KB
 Downloaded:  366 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
poly




PostPosted: Mon Dec 08, 2003 11:34 pm   Post subject: (No subject)

Well I lost to it, because the paddle didnt move quick enough. Make it so that your paddle can get from the top to the bottom faster...
Tony




PostPosted: Mon Dec 08, 2003 11:35 pm   Post subject: (No subject)

i think that slow paddle movement adds on to the difficulty. To the extend that AI has a definate advantage Rolling Eyes
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
poly




PostPosted: Mon Dec 08, 2003 11:38 pm   Post subject: (No subject)

ya, in pong you can make an unbeatable ai...just make the computers paddle follow Y coordinate
Tony




PostPosted: Mon Dec 08, 2003 11:44 pm   Post subject: (No subject)

poly wrote:
just make the computers paddle follow Y coordinate


it will work only if the paddle moves atleast as fast as the ball Rolling Eyes

But you can always just calculate where the ball will try to cross AI's line after being reflected by the player and move AI's paddle there. But unbeatable AIs are no fun to play against.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
poly




PostPosted: Mon Dec 08, 2003 11:58 pm   Post subject: (No subject)

Quote:
But unbeatable AIs are no fun to play against.
well it would be pretty fun playing against one....and i say that with sarcasm
Tony




PostPosted: Tue Dec 09, 2003 12:47 am   Post subject: (No subject)

well you might as well play in pong against a wall then Laughing
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
santabruzer




PostPosted: Tue Dec 09, 2003 8:23 am   Post subject: (No subject)

The best positions you want to be at..... the computer can't do a thing...


bestposition.JPG
 Description:
 Filesize:  16.2 KB
 Viewed:  6402 Time(s)

bestposition.JPG


Kuntzy




PostPosted: Tue Dec 09, 2003 1:31 pm   Post subject: If I make you able to move faster...

The game is too easy, I am planning on makeing a easy, medium, difficult, and insane. And if I make the Computer mirror the ball, it will be impossbile, and you might as well play against a wall, making it meaningless.
Thank you for your input.
Andy




PostPosted: Tue Dec 09, 2003 9:31 pm   Post subject: (No subject)

its easy to predict where the ball will end up, so making an unbeatable AI isnt hard... the instant the ball touches the opponent's padle, the AI should already know where its going...
roer




PostPosted: Tue Dec 09, 2003 9:50 pm   Post subject: (No subject)

Change userSPEED to 5, it seems fairer Smile The AI dosent like moving much either
Tony




PostPosted: Tue Dec 09, 2003 9:51 pm   Post subject: (No subject)

heck, if the angle of reflection is always the same (seeing as the paddle is flat) then AI should know where the ball will be after indefinate amount of moves in advance Laughing
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Andy




PostPosted: Tue Dec 09, 2003 10:07 pm   Post subject: (No subject)

well, if the ball hits the coner, shouldnt it bounce differently?
Kuntzy




PostPosted: Tue Dec 09, 2003 11:43 pm   Post subject: (No subject)

[quote="dodge_tomahawk"]well, if the ball hits the coner, shouldnt it bounce differently?[/quote]

Like I said at the Start, i am goin to improve my collision detection. And I am now workinh on a paddle that looks something like this: /
|
\
This will make the game a little less predictable.
Also what does anyone think about adding in Random Walls here and there throughout the game, that could make it more interesting.
Tony




PostPosted: Tue Dec 09, 2003 11:46 pm   Post subject: (No subject)

maybe not entirely random... you can have like different level maps Very Happy

you can think up a bunch of features to make the game more interesting... heck, you can have powerups and what not. 8)
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 18 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: