Pong Game

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
Renthal97
Posts: 29
Joined: December 23rd, 2012, 11:16 pm

Pong Game

Post by Renthal97 » December 2nd, 2013, 11:26 pm

Hey I'm currently creating a Pong game and I just wanted to get some feedback on how it looks/plays.
It' not 100% finished atm tho.
Things I know that need fixed:
~Ball goes same direction everytime
~Ball sometimes slides down the paddle bouncing back and forth
~Difficulties and Quit buttons don't work

If you guys find anything else please let me know!

~How to Play~
Select start with mouse.
Press space to start game.
Once you or the AI scores the ball is reset to center, press space to start again
Once max score of 3 is reached, the game locks, press enter to restart

Please note: this was built in VS 2013. To run using VS 2010, see post below by albinopapa
Attachments
Pong.zip
(135.48 KiB) Downloaded 299 times
Last edited by Renthal97 on December 5th, 2013, 2:37 pm, edited 1 time in total.

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Pong Game

Post by chili » December 3rd, 2013, 8:55 am

Thanks for sharing. I'll take a look at this when I'm back home.
Chili

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Pong Game

Post by chili » December 4th, 2013, 12:09 pm

Haha, looks like this uses features of the new revision of C++. Can't build it with my old VC++2010. :lol:

Code looks decent though, keep it up!
Chili

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Pong Game

Post by albinopapa » December 4th, 2013, 3:58 pm

It appears you have made this in VS 2013.

For anyone wanting to try and build this and don't have Visual Studios 2013 you can make a couple of changes to "Chili DirectX Framework.vcxproj" in the Chili DirectX Framework folder of the project.

look for <PlatformToolset>v120</PlatformToolset>, there should be 2 (one for debug mode and the other for release).

Change v120 to v100 for VS 2010, v110 for VS 2012.

Save the file and reopen the project using the .sln file and if it asks if you want to update the project (for whatever reason) go ahead. Though upon further inspection, Renthal97 has initialized a lot of his values in the header file, so would take some work changing those to be initialized in the constructor instead.

I see what you mean chili by new c++ stuff, I thought it was just a new ide that was stopping you.

Not sure about VS 2010, but changing all the structs to act like classes and initializing the variables like you would in classes seems to work in VS2012. Was able to play the game and wow very colorful.

My suggestion is either make the paddles wider or make it so the random color values don't drop below 64 or something, it's hard to see the paddle at times when the colors are dark and blend in with the background.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

Renthal97
Posts: 29
Joined: December 23rd, 2012, 11:16 pm

Re: Pong Game

Post by Renthal97 » December 4th, 2013, 5:00 pm

Thanks for checking it out! And ya sorry about using vs2013. I can reupload it from vs2010 when im 100% finished if you'd like? Also sorry about the paddle getting hard to see albinopapa I'll fix that for sure. Anything else you have suggestions on?

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Pong Game

Post by albinopapa » December 4th, 2013, 5:40 pm

As far as suggestions...nope I thought it worked fine. The paddles and ball movements are smooth, the color changing isn't overly distracting and makes the game feel fresh.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

Renthal97
Posts: 29
Joined: December 23rd, 2012, 11:16 pm

Re: Pong Game

Post by Renthal97 » December 4th, 2013, 6:10 pm

Alright cool thankyou again for checking it out

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Pong Game

Post by chili » December 6th, 2013, 3:13 pm

Yeah, he uses class member initializers that aren't supported by old-school C++. I must say, that's a feature that I've always wanted and never understood why I couldn't have it. Gonna have to migrate to 2013 sometime soon....
Chili

Renthal97
Posts: 29
Joined: December 23rd, 2012, 11:16 pm

Re: Pong Game

Post by Renthal97 » December 6th, 2013, 3:56 pm

chili wrote:Yeah, he uses class member initializers that aren't supported by old-school C++. I must say, that's a feature that I've always wanted and never understood why I couldn't have it. Gonna have to migrate to 2013 sometime soon....

If you have an email account setup with a school/college/university then you can signup for dreamspark through Microsoft and get ANY full version product almost for free. That's how I got vs2013.

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Pong Game

Post by albinopapa » December 6th, 2013, 4:03 pm

I guess there is a way around it by using the constructor function and initializing all your variables there in the .h file as well as define all the functions as well, instead of just declaring them in the .h file. I know not a nice solution.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

Post Reply