It is a simple single-player 2D game similar to pong. The game consists of horizontally movable platforms, solid vertical walls and a ball constantly bouncing around the screen. The objective is to control the platforms to bounce the ball back when it reaches the top or bottom of the screen. The game is lost if the ball is missed by the paddles. Some additional features include the ball changing to a random colour on every bounce and the colour of the walls is constantly changing.
This game is my first project made using OpenGL. I used a video tutorial series to learn how to link third party libraries like GLFW and GLEW and set up some basic classes like the vertex and index buffer. The vertex array object and renderer classes among others and the main application file are all original code. Other files are based on tutorial learning but still interpreted by me.
A syntax error in the a shader was preventing it from being compiled correctly, which is not an OpenGL error therefore making it difficult to figure out where exactly the error lied. This issue was fixed by implementing some simple error handling code in the shader's compile function in the shader class.
This code gets the shader's compile status and stores it at a variable, which is then checked to see if the compilation was successful. If not, the shader's info log is stored and printed to the console, indicating the specific shader and line in which the syntax error occured.