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

Username:   Password: 
 RegisterRegister   
 Does someone know how to make paddles for pong that work?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
dude3000




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
poly




PostPosted: 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
dude3000




PostPosted: 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
Andy




PostPosted: Sun Jan 11, 2004 2:29 pm   Post subject: (No subject)

read up on the Input.KeyDown
Thuged_Out_G




PostPosted: 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)
CITC




PostPosted: 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.
dude3000




PostPosted: 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!!!!
McKenzie




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: