Pong

Use this forum to share and discuss Uzebox games and demos.
User avatar
DaveyPocket
Posts: 378
Joined: Sun Sep 14, 2008 8:33 pm
Contact:

Pong

Post by DaveyPocket »

From another post....
Looks like the minimalist side of our retro-minimalist game console is taking over! Someone make Pong this minute! :mrgreen:
Okay! :D
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

Screenshot:
Image

2 player game

Source code and hex attached. Enjoy! :mrgreen:
Attachments
pong.zip
Source
(232.81 KiB) Downloaded 1332 times
Pong.hex
Game
(63.21 KiB) Downloaded 1037 times
Last edited by DaveyPocket on Thu Jun 04, 2009 3:39 am, edited 2 times in total.
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Pong

Post by uze6666 »

Neato! Finally a game my old father will want to play! :mrgreen:

Congrats & keep the classics coming!

Cheers,

-uze
User avatar
Jhysaun
Posts: 214
Joined: Tue Nov 04, 2008 12:32 am

Re: Pong

Post by Jhysaun »

There's a slight glitch where the ball gets stuck on the floor.

Other than that great :D
>J
Lerc wrote:I intend to use my powerful skills of procrastination to ensure that when I get to making things, the chips will be available.
User avatar
paul
Posts: 457
Joined: Sat May 02, 2009 8:41 am
Location: Brisbane, Australia

Re: Pong

Post by paul »

Ha! Nice work, Davey. I thought someone might take the bait :twisted:

Just a note: on v1.09 of the emulator, I get player 1 Select as starting the ball, and start as reset. Unless the emulator command listing is off.

I think if you put a very simple title screen/menu and some simple AI for 1P mode, we could throw it on the completed games pile.

Good job.
User avatar
DaveyPocket
Posts: 378
Joined: Sun Sep 14, 2008 8:33 pm
Contact:

Re: Pong

Post by DaveyPocket »

After playing a while with a friend, I realized I need to make it a bit more challenging. I think the ball goes a little too slow.

I will revise it and post it when I get the chance(which will be soon), maybe I can add an AI for the second player.
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Pong

Post by uze6666 »

I second for P2 AI. A menu or option for speed would be a great addition too.

-uze
orthopteroid
Posts: 12
Joined: Mon Jan 18, 2010 8:08 am
Location: Vancouver, Canada

Re: Pong

Post by orthopteroid »

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
Attachments
Pong.zip
(250.59 KiB) Downloaded 328 times
Pong.hex
(54.65 KiB) Downloaded 345 times
User avatar
DaveyPocket
Posts: 378
Joined: Sun Sep 14, 2008 8:33 pm
Contact:

Re: Pong

Post by DaveyPocket »

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! :mrgreen:
User avatar
D3thAdd3r
Posts: 3221
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Pong

Post by D3thAdd3r »

@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!
orthopteroid
Posts: 12
Joined: Mon Jan 18, 2010 8:08 am
Location: Vancouver, Canada

Re: Pong

Post by orthopteroid »

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.
Post Reply