pong game and opengl

Started by
14 comments, last by phil67rpg 10 years, 8 months ago

well I want to post a pong game I am working on, I am almost finished, I wanted to get some feedback on my game. I am using vs 2012 and I am compiling the release version of my game, are there any switches I should use in order for my compiler to put out the release version of my game.

Advertisement

At the top next to your Local Windows Debugger (play button) two to the right it should say Debug, click on this and go Release.
you probably only set to include things (if you include any other libraries) in the Debug mode so you have to reset them for release in your project properties.

Also, if you can, test that your program runs on another machine than your own (even a virtual machine) before and inform people of what they need to download (any frameworks and so on) if you can't bundle them along. That way you can avoid the predictable 5+ posts of "it doesn't work".

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

well here is my pong game let me know what you think, [attachment=17478:pong.zip]

It doesn't work. More specifically, it still links to a bunch of debug-level DLL's, including msvcp110d.dll, msvcr110d.dll, and so on.. if you're a Visual Studio developer you will have those, but other people certainly won't. What you need to do is:

1. ensure you are building everything in release mode

2. if at all possible, link statically to the MSVC libraries (see google, stackoverflow, ..)

3. test yourself that it works on a different computer before providing a download link!!

Until you do that, nobody except you and possibly other VS developers here will be able to run your pong game without going dll-hunting.

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

ok cool thanks

[attachment=17479:pongzip.zip]well I tried this on my laptop and it works except that you have to extract it to a regular folder and I cant get the sound to work also.

attachicon.gifpongzip.zipwell I tried this on my laptop and it works except that you have to extract it to a regular folder and I cant get the sound to work also.

Works! No sound, it seems to be that the audio library you're using doesn't seem to support wave files with format other than PCM. If I substitute the .wav file with a PCM-encoded audio file, it works fine. Perhaps you can reencode your file to PCM and it should work then (did the sound work on your development machine?)

Some feedback:

- the paddle isn't very responsive, to move it quickly we either have to bash the up/down keys (which is slow) or keep them pressed (which has a delay before you start moving). I know this comes from how keystrokes are handled in Windows, because I assume you are relying on the KeyUp/KeyDown events. To make this better, you can try not using the events but instead, in your game loop, checking the keyboard state to see if the up/down arrow keys are pressed or not, and react accordingly.

- there is something wrong with the collision detection at the edge of the paddles, the ball will start spasming inside the paddle instead of bouncing back at an angle, eventually coming back out the same way it entered. We'd have to see the code to diagnose this one.

- the AI is unbeatable.

- after some period of time, everything gets slower (not sure if this intended, but it does make the game easier).

Other than that it looks pretty good! Are you going to share the source code as well?

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

The other paddle moves at the speed of the ball on the y axis, theoretically making it impossible to even get one point.

the sound works on my desktop, are you using windows? maybe my collision detection is flawed. and my AI needs to be tweaked.

This topic is closed to new replies.

Advertisement