Page 1 of 1

Pong Game

Posted: December 2nd, 2013, 11:26 pm
by Renthal97
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

Re: Pong Game

Posted: December 3rd, 2013, 8:55 am
by chili
Thanks for sharing. I'll take a look at this when I'm back home.

Re: Pong Game

Posted: December 4th, 2013, 12:09 pm
by chili
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!

Re: Pong Game

Posted: December 4th, 2013, 3:58 pm
by albinopapa
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.

Re: Pong Game

Posted: December 4th, 2013, 5:00 pm
by Renthal97
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?

Re: Pong Game

Posted: December 4th, 2013, 5:40 pm
by albinopapa
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.

Re: Pong Game

Posted: December 4th, 2013, 6:10 pm
by Renthal97
Alright cool thankyou again for checking it out

Re: Pong Game

Posted: December 6th, 2013, 3:13 pm
by chili
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....

Re: Pong Game

Posted: December 6th, 2013, 3:56 pm
by Renthal97
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.

Re: Pong Game

Posted: December 6th, 2013, 4:03 pm
by albinopapa
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.