Sign in to follow this  
  • entries
    55
  • comments
    55
  • views
    24447

So Here We Are

Sign in to follow this  

99 views

(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
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now