Pong – States
I have continued my work on my pong game and have taken the rough game that was just a single file of code and refactored it to separate some classes out.
I have also now added states (just enums and if statements) for a main menu and a pause state for the game. Now that I have these, I want to refactor them into their own classes and then expand the menus to have options that can be selected with the mouse.
And Were Back
There seemed to be some DNS issues with this site during the day. I could get access to it yesterday, but when I tried this morning it wasn't there. Confusingly I could get access to another site that was on the same web server with a different virtual host and all the same DNS settings as this.
This was a problem because a subversion repository that me and some other developers use is also hosted on this domain and the access to that went as well.
All issues seem to be fixed now however.
Moved Domain Registrar
I realised that my domain names were up for renewal at the start of the next month, so I decided that I would do my part and take a stance against SOPA. And so, I now have my domains registered with Namecheap, which, along with being against SOPA, are also cheaper than GoDaddy (my old registrar).
Back to games, I am trying to work on implementing game states into my pong game to allow me to create menus easier. Whilst I am not sure if is the best way to accomplish this task, I am taking inspiration from Managing Game States In C, which provides an example way to create and manage game states.
Pong – Complete
In my last post I said that I wanted to start actually making games and completing them, well I have a working version of pong with complete gameplay. Last time I attempted pong, I got stuck trying to work out how to make the ball bounce at the proper angle. This time, It clicked in my head that I just need to invert the X acceleration when it hits a paddle and the Y acceleration when it hits the top or bottom boundary.
The next steps that I want to do with this code are:
- Refactor
- Menus
- Opponent AI
- Online Leader boards
- Online Opponents
I intend to work on these ideas at the same time as working on the next game, which will be a breakout clone as it is similar to pong but is slightly more complicated. Hopefully, I can start building up a good collection of reused code to make it easier in future to implement these games.
Screenshot:
Pong
So, I have realised that I have never actually created a working game that is playable and I intend to make this year a year where I actually make games. To kick it all off I am going to make pong. I have already created a simple version in OpenGL where I can move two paddles and the ball bounces around with the ability to score. The next phase is to have a score counter on the screen and lives so that there is an end to the game.
This is a good step forward, as last time I attempted to write pong I got stuck trying to work out how to make the ball bounce correctly. This time it hit me that it was as simple as just reversing the X acceleration if it hits a paddle, or the Y acceleration if it hits the top and bottom boundary.
The code is at: Pong
The Tempest
Today, me, my brother and some friends from university went to a performance of Shakespeare's "The Tempest". It was performed by "Actors From The London Stage" at the University of Notre Dame.
The performance started being difficult to follow but I attribute that to the fact that there were more characters in the play than there was actors to play them leading to the need for actors to play multiple roles. After the first couple of scenes the play became easy enough to follow as I had seen the actors play through their different characters and knew which character was which via clothing and the way they act. The only other barrier to understanding of the play was due to the prevalent use of Old English, this did not detract from the play as you can grasp what is happening through the performing as much as the words.
One of the major features of this specific group of actors is that they shun the use of too many props, this lead to one confusing scene where one of the actors lifted up another actor who was being ridged. This turned out to be a character collecting a log for firewood.
The lack of props did not detract from the play as it allowed the audience to use their imagination to understand what was going on. It also produced a few laughs as at one point there was a summoning of a banquet which turned out to be a bed sheet with the word banquet written on it.
The overall view of the performance was that everyone enjoyed it.



