Search the web
Sign In
New User? Sign Up
Rebol_New · For beginning Rebol programmers
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Programming a 2 player Pong game   Message List  
Reply | Forward Message #301 of 315 |
Re: [Rebol_New] Programming a 2 player Pong game

On Monday, 14-August-2006 at 20:39:42 trekkie576 wrote,

>I am new to the whole programming concept, and I was wondering if
>anyone knows the proper code for a pong game. Any websites would be
>helpfull also.

I don't think there's 'proper' code as such for the game. It'd need to be
different for every language it was written in, and different programmers would
write it differently in the same language.

My approach would be to start by working out how to draw a bat in a window.
Then how to position it differently, then how to move it up and down using the
keyboard or mouse.

Then draw the ball, then work out how to change its position from within a loop,
so it appears to be moving in a straight line. Then figure out how to detect
when the ball hits the edge of the window. Then how to detect when it hits the
bat, and how you should bounce the ball.

And finally, add a second bat, but under computer control, like the ball is.







Thu Aug 17, 2006 7:05 am

lunaread
Offline Offline
Send Email Send Email

Forward
Message #301 of 315 |
Expand Messages Author Sort by Date

I am new to the whole programming concept, and I was wondering if anyone knows the proper code for a pong game. Any websites would be helpfull also. Thanks...
trekkie576
Offline Send Email
Aug 16, 2006
2:54 pm

On Monday, 14-August-2006 at 20:39:42 trekkie576 wrote, ... I don't think there's 'proper' code as such for the game. It'd need to be different for every...
Carl Read
lunaread
Offline Send Email
Aug 17, 2006
7:01 am

Thank you very much. I will try your approach and let you know what I come up with. Thank you again....
trekkie576
Offline Send Email
Aug 18, 2006
4:21 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help