Pong

I followed the tutorial at http://gamecodeschool.com/sfml/coding-a-simple-pong-game-with-sfml/ for creating a Pong game in SFML.

All went pretty well, I got to grips with the setup of an SFML game, created a while loop to run it, and was impressed by the simplicity of functionality such as ‘rebounding’ off the bat or top, left, and right edges of the window:

As physics would suggest, the velocity of the ball is negated to send it back in the opposite direction.

Unfortunately, I did have- or, rather, still am having- trouble with using Text and Fonts. I thought that the issue may be with the font which I’d downloaded but I tried many different fonts without luck.

I kept getting access violation runtime exceptions thrown and couldn’t find anything to help me online.

The Pong game works, but the lives and score statuses should be shown at the top, I had to comment out these lines to be able to play the game at all.

If I figure it out, more updates soon.

Leave a Reply

Your email address will not be published. Required fields are marked *