Pong!

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
User avatar
GreatJake
Posts: 169
Joined: January 6th, 2013, 5:13 pm
Location: USA

Pong!

Post by GreatJake » August 9th, 2013, 4:04 am

I made this a few months ago. Its pretty simple compared to some of the stuff you guys do but it was one of my first c++ programs i kinda made on my own since i used chilis frame work so i decided to share it.
Attachments
PongRelease v1.1.rar
(7.64 MiB) Downloaded 294 times
PongSource v1.2.rar
(903.08 KiB) Downloaded 289 times
Last edited by GreatJake on August 9th, 2013, 7:32 pm, edited 1 time in total.

User avatar
bshivam2001
Posts: 214
Joined: July 27th, 2013, 6:57 am
Location: India

Re: Pong!

Post by bshivam2001 » August 9th, 2013, 8:23 am

Good Work!
Its Pretty nice according to what we have learnt!
'If you can't make it good, at least make it look good'

User avatar
Nosferatu
Posts: 36
Joined: July 25th, 2012, 7:08 am
Location: Slovakia

Re: Pong!

Post by Nosferatu » August 9th, 2013, 12:57 pm

Pretty good, but the bounce sound makes my ears bleed :D and the game sometimes crashes when the ball hits the top of the table.

clau007
Posts: 15
Joined: July 30th, 2013, 8:36 pm
Location: Italy

Re: Pong!

Post by clau007 » August 9th, 2013, 2:22 pm

It's cool, but crashes very often!

User avatar
GreatJake
Posts: 169
Joined: January 6th, 2013, 5:13 pm
Location: USA

Re: Pong!

Post by GreatJake » August 9th, 2013, 5:01 pm

It never crashes when you run it in the exe. Im useing windows 8 so i think windows is adding some code that stops it from crashing if you draw an out of bounds pixel.

User avatar
LuisR14
Posts: 1248
Joined: May 23rd, 2013, 3:52 pm
Location: USA
Contact:

Re: Pong!

Post by LuisR14 » August 9th, 2013, 6:48 pm

you could just solve it by adding ifs in both PutPixel functions that discards the pixel(s) when x/y is less than 0 or greater than screenwidth/screenheight :)
always available, always on, about ~10 years c/c++, java[script], win32/directx api, [x]html/css/php/some asp/sql experience. (all self taught)
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat :mrgreen: --

User avatar
GreatJake
Posts: 169
Joined: January 6th, 2013, 5:13 pm
Location: USA

Re: Pong!

Post by GreatJake » August 9th, 2013, 7:34 pm

That feels very hacky. Doing 4 if statements for every pixel? that sounds very inefficient but i hope it stops all the crashes :D

User avatar
LuisR14
Posts: 1248
Joined: May 23rd, 2013, 3:52 pm
Location: USA
Contact:

Re: Pong!

Post by LuisR14 » August 10th, 2013, 2:42 am

well you can do it all in one if statement, doesn't have to be 4 :lol:
always available, always on, about ~10 years c/c++, java[script], win32/directx api, [x]html/css/php/some asp/sql experience. (all self taught)
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat :mrgreen: --

elnegro97
Posts: 3
Joined: August 10th, 2013, 12:39 am

Re: Pong!

Post by elnegro97 » August 10th, 2013, 5:30 pm

I made a Pong clone too, finished it today.

User avatar
GreatJake
Posts: 169
Joined: January 6th, 2013, 5:13 pm
Location: USA

Re: Pong!

Post by GreatJake » August 11th, 2013, 2:45 am

LuisR14 wrote:well you can do it all in one if statement, doesn't have to be 4 :lol:
True but your still checking for 4 conditions.

Post Reply