Looks like the minimalist side of our retro-minimalist game console is taking over! Someone make Pong this minute!
Okay!
I did make Pong, and here it is.
Controls:
Up/Down - moves paddle
Start(Player 1 controller) - starts ball
Select(Player 1 controller) - resets game when ball has not been start yet
Holding down B while Up/Down - moves paddle faster
Rules:
When either player scores up to 9, game ends
Thanks for the pong game - a treat to play. It took me back to 1978 and an old radio shack box that had 4 versions of the game...
I found your code a treat to play around with as well - more interesting than a simple tutorial. I started working in it a bit: removed the double arithmetic for the ball, added a single player mode, fiddled with the paddle bounce and many other things... when I looked back I'd ended up with all new code - my apologies! So, I'm knocking it all back for you or others to stare at and fiddle with - like I did.
orthopteroid wrote:Thanks for the pong game - a treat to play. It took me back to 1978 and an old radio shack box that had 4 versions of the game...
I found your code a treat to play around with as well - more interesting than a simple tutorial. I started working in it a bit: removed the double arithmetic for the ball, added a single player mode, fiddled with the paddle bounce and many other things... when I looked back I'd ended up with all new code - my apologies! So, I'm knocking it all back for you or others to stare at and fiddle with - like I did.
cheers
I skimmed through your code, looks nice! I'll have to try this out when I get the chance. Thanks for the hack!
@Daveypocket
This is a really good and retro looking version of pong, feels right at home on the Uzebox. When you get some time to think, like the others suggested, p2 ai would be the biggest addition. Even if it was simply moving the paddle up/down based on ball y with some randomness thrown in. I never got the ball stuck in the floor when I played, but from past experience making pong I recall it can occur when the ball is at the top/bottom of the screen and a paddle comes into it? I think a few little checks in the collision response fixed anything like that if I remember.
@Orthopteroid
It appears in your version you aren't doing a bounding box check on the ball versus paddle but instead only checking if it's between paddle y and paddle height when it hits screen edge or something? I'm don't recall what the original behavior was in the arcade version but it seems a bit off when the ball goes into the paddle 7 pixels? Not bad or anything I was just curious about how you were doing it differently and if that was actually the original behavior. I guess that would be an easy way to ensure the ball never gets stuck though. I remember playing around with the atari version of pong in 6502, always fun to mess around with stuff!
Yes, collision is done using screen-edge detection... I played my console version soooo long ago I don't remember how it might've been implemented! Feel free to hack away or offer any other feedback!
On a side note, I noticed that my button-debounce macro uses && instead of & - a small mistake.