So Here We Are

Published June 17, 2009
Advertisement
(Ok, I can't seem to add a link at the moment. It just makes the whole post disappear) (Now it seems to work. Can I not start a post with a link or something? Any way back to the original post)

Two Player Pong is finished!

So, after 5 days and 1233 lines of code, it is finally finished. I got around the collision detection problems I had yesterday by checking if the ball was only partially inside one of the sides of the paddle, then resetting the ball's position and reversing its velocity. This seems to work. I also spent a lot of the day changing the title screen so that it shows the controls for each player.

There is one problem that hasn't been ironed out and that is pausing the game when the window loses focus. What I have in there works when the window is minimised but not when you alt-tab away. Does anyone know how to solve this in SDL?

I have included the source code for anyone who wants to have a look. Any observations/comments of the game and/or code would be greatly appreciated.

Thanks
-AEdmonds
Previous Entry So Here We Are
Next Entry Plans
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement