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

Username:   Password: 
 RegisterRegister   
 air hockey
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
sensfan_39




PostPosted: Thu Jun 09, 2005 10:20 am   Post subject: air hockey

i am making an air hockey game and i am trying to get the paddles on the screen and the ball to move randomly,help!!!!

here is my code so far



airhockey.t
 Description:

Download
 Filename:  airhockey.t
 Filesize:  1.88 KB
 Downloaded:  598 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
ZeroPaladn




PostPosted: Thu Jun 09, 2005 12:53 pm   Post subject: (No subject)

i can suggest things that can help.

for the paddles use a circle and use simple physics and collision detection using color. im not quite sure how to do this, im a newb myself (not that im calling you one Rolling Eyes ) ask an admin about it.
msimard8




PostPosted: Tue Nov 22, 2005 9:40 am   Post subject: BOOOOOOOOOOOOOOO

this game licks balls
do_pete




PostPosted: Tue Nov 22, 2005 11:30 am   Post subject: (No subject)

It's way too fast, put a delay in it. Also have a cls in the loop so that the puck doesn't leave a trail but then you'll have to redraw all the borders and stuff in the loop. In order to make the paddles move try something like this
Quote:
var Keys_Pressed : array char of boolean
...
loop
Input.KeyDown (Keys_Pressed)
if Keys_Pressed (KEY_UP_ARROW) then
PaddleX += SPEED
elsif Keys_Pressed (KEY_DOWN_ARROW) then
PaddleX -= SPEED
end if
%All the other suff goes here
Draw.FillBox (PaddleX, PaddleX + PADDLE_WIDTH, PaddleX + PADDLE_LENGTH, PaddleX + PADDLE_LENGTH, COLOUR)
end loop
Mr. T




PostPosted: Tue Nov 22, 2005 7:58 pm   Post subject: Re: BOOOOOOOOOOOOOOO

msimard8 wrote:
this game licks balls

Two Infractions:
1. Bringing up topics that are 6 months old.
2. Swearing / flaming needlessly.
do_pete




PostPosted: Wed Nov 23, 2005 11:13 am   Post subject: (No subject)

wow i can't believe i didn't realize it was six months old Hit Wall
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 1  [ 6 Posts ]
Jump to:   


Style:  
Search: