Does someone know how to make paddles for pong that work?
Author |
Message |
dude3000
|
Posted: Sun Jan 11, 2004 12:44 pm Post subject: Does someone know how to make paddles for pong that work? |
|
|
Does someone know how to make paddles for pong that work? I got the bouncing ball but i have a problem with making a counter and making the paddles move |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
poly
|
Posted: Sun Jan 11, 2004 12:49 pm Post subject: (No subject) |
|
|
If you search you should be able to find a few topics on pong. I think there was a pong game posted in the Submissions forum you could checkout and see how to do |
|
|
|
|
![](images/spacer.gif) |
dude3000
|
Posted: Sun Jan 11, 2004 2:00 pm Post subject: (No subject) |
|
|
poly wrote: If you search you should be able to find a few topics on pong. I think there was a pong game posted in the Submissions forum you could checkout and see how to do
I know that there are games, but I need the actual text so I can see how they made it |
|
|
|
|
![](images/spacer.gif) |
Andy
|
Posted: Sun Jan 11, 2004 2:29 pm Post subject: (No subject) |
|
|
read up on the Input.KeyDown |
|
|
|
|
![](images/spacer.gif) |
Thuged_Out_G
|
Posted: Sun Jan 11, 2004 2:56 pm Post subject: (No subject) |
|
|
drawing the paddle is the easiest part of pong lol
code: |
drawbox(x,y,x1,y1,color)
|
|
|
|
|
|
![](images/spacer.gif) |
CITC
![](http://www.gamespy.com/legacy/fargo/soulturns/letter14.jpg)
|
Posted: Sun Jan 11, 2004 6:06 pm Post subject: (No subject) |
|
|
code: | drawfillbox (10, 10, 60, 15, 12)
var paddle : int := Pic.New (10, 10, 60, 15)
cls
var paddlex : int := 50
var keys : array char of boolean
loop
Input.KeyDown (keys)
if keys (KEY_RIGHT_ARROW) then
paddlex -= 1
end if
if keys (KEY_LEFT_ARROW) then
paddlex += 1
end if
Pic.Draw (paddle, paddlex, 20,picCopy)
end loop |
you should also use View.Set ("offscreenonly") if you aren't already. |
|
|
|
|
![](images/spacer.gif) |
dude3000
|
Posted: Sun Jan 11, 2004 10:32 pm Post subject: (No subject) |
|
|
CITC wrote: code: | drawfillbox (10, 10, 60, 15, 12)
var paddle : int := Pic.New (10, 10, 60, 15)
cls
var paddlex : int := 50
var keys : array char of boolean
loop
Input.KeyDown (keys)
if keys (KEY_RIGHT_ARROW) then
paddlex -= 1
end if
if keys (KEY_LEFT_ARROW) then
paddlex += 1
end if
Pic.Draw (paddle, paddlex, 20,picCopy)
end loop |
you should also use View.Set ("offscreenonly") if you aren't already.
THANK YOU VERY MUCH!!!! |
|
|
|
|
![](images/spacer.gif) |
McKenzie
![](http://www.wizards.com/global/images/swtcg_article_27_pic3_en.gif)
|
Posted: Sun Jan 11, 2004 10:48 pm Post subject: (No subject) |
|
|
Dude, poly is actually not trying to be a jerk (I was earlier, but that's beside the point). I just spent 2 min following his advice, guess what? it was not hard to find full versions of pong. no, not .exe, .t |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
|
|