Computer Science Canada

air hockey

Author:  sensfan_39 [ 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

Author:  ZeroPaladn [ Thu Jun 09, 2005 12:53 pm ]
Post 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.

Author:  msimard8 [ Tue Nov 22, 2005 9:40 am ]
Post subject:  BOOOOOOOOOOOOOOO

this game licks balls

Author:  do_pete [ Tue Nov 22, 2005 11:30 am ]
Post 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

Author:  Mr. T [ 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.

Author:  do_pete [ Wed Nov 23, 2005 11:13 am ]
Post subject: 

wow i can't believe i didn't realize it was six months old Hit Wall


: