
-----------------------------------
Lierro
Tue Jun 10, 2003 8:32 am

Request
-----------------------------------
I know I have already asked everyone for help with my pong game and I have had some replies but not enough help.
I am going to show you my game so that you can give me some inside.
Just to let you all know that I am new to this program so nothing too tricky o.k. :) 

var a1,b1:int:=1
var a2,b2,x:int
var c:string (1)

loop
a2:=a1+50
b2:=b1+50
cls
drawfillbox (a1,5,a2,0,10)
drawfillbox (b1,(maxy-5),b2,maxy,10)
getch (c)

x:= ord (c)
if x = 203 then
a1:= a1-7
elsif x = 205 then
a1:= a1+7
elsif x = 97 then
b1:= b1-7
elsif x = 100 then
b1:= b1+7
end if

if a1 maxx then
a1:=(maxx-51)
elsif b1 = maxx then
b1:=(maxx-51)
end if
end loop

This is just my paddles. I have not yet to get the ball in.
Comments welcome

-----------------------------------
Prince
Tue Jun 10, 2003 9:58 am


-----------------------------------
put setscreen("nocursor") at the top b4 the loop, that way u wont hav the cursor flashing in the paddle... and try and make it so that u can take 2 commands at a time cus with 2 players it would b kinda weird goin one at a time :?

-----------------------------------
Tony
Tue Jun 10, 2003 1:33 pm


-----------------------------------
yeah... you have to use Input.KeyDown for that

then read tutorial on collision detection before adding the ball to your program.
