Request
Author |
Message |
Lierro
|
Posted: Tue Jun 10, 2003 8:32 am Post subject: 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 <= 1 then
a1:= 1
elsif a2 >maxx then
a1:=(maxx-51)
elsif b1 <= 1 then
b1:= 1
elsif b2 >= 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 |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Prince
![](http://www.angelfire.com/hiphop3/m-unit_hustla/images/fxckpare.jpg)
|
Posted: Tue Jun 10, 2003 9:58 am Post subject: (No subject) |
|
|
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 ![Confused Confused](http://compsci.ca/v3/images/smiles/icon_confused.gif) |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Tue Jun 10, 2003 1:33 pm Post subject: (No subject) |
|
|
yeah... you have to use Input.KeyDown for that
then read tutorial on collision detection before adding the ball to your program. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
|
|