Jump to content
  • Advertisement
Sign in to follow this  
hop

First Game: PONG!

This topic is 4796 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have completed my first game in C++. It's a simple Pong clone, but includes one and two player support. I also think it's pretty well done and I tried to give it a retro feel. Download it here. There's one thing that may be wrong that I haven't gotten to test yet: The game may run too fast. I have a rather old computer, and the game has almost no delaying function to regulate its speed, so please tell me if this is way too fast (it should be pretty fast though).

Share this post


Link to post
Share on other sites
Advertisement
I had that same problem back in 2000. Try to count FPS in a loop, then divide every movment with FPS int. Simple, not?

Share this post


Link to post
Share on other sites
It isn't that fast, ( gues i have a slow comp ).
And there's a refresh problem. All the pics stay on background buffer.

Share this post


Link to post
Share on other sites
Hmmm, I don't have that problem with the background at all, and your comp may not be slow maybe the game is just fine for speed.

And thanks for the FPS thing I'll have to try that out.

Share this post


Link to post
Share on other sites
Are you using graphic API ( maybe Allegro or something ). 'Cause in that case its easy to set up speed. Anyway it isn't a bad game, better than my first game which was also pong. Mine was slow even on fast computers, and when i bought new comp it was faster...

Share this post


Link to post
Share on other sites
Yes, it uses SDL. Is there an easy way to regulate speed with that? I'll have to research it.

Share this post


Link to post
Share on other sites
Can someone else try it out to see if images are sticking to the background? That would really be a big problem I would like to fix (and would be very confused about because it doesn't happen to me and I think I understand completely how the buffers work in the game).

Share this post


Link to post
Share on other sites
Yeah, the images are "smearing". Possible causes: not using double buffering, or not using SDL_FillRect(pScreen, NULL, 0); in main loop. And yes, it is a bit fast.

Share this post


Link to post
Share on other sites
Thanks, I think I'll post a topic about this in the Begginners forum so more people can help (and perhaps figure out why this is happening to other people but not to ME!).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!