Technology is fun, isn’t it? We can manipulate shapes and colors on our phone screens. We can interact with vivid worlds and characters inside video games. So, for a long time, just like most of my generation who grew up with cathode ray computer screens playing Grand Theft Auto and Roadrash, I took for granted the graphics on digital mediums. It’s easy to forget that all these conveniences we have today came from decades of hard work by pioneers, contributors and countless programmers. I was only made aware of this history because of the computer graphics course in my undergrad. We had to learn about OpenGL1 (Open Graphics Library) in terms of how it went from creating geometric shapes to breathing complexity and life to those shapes. Our focus in the course was to catch a glimpse of how early programmers worked with computer graphics, and presented with the challenge of creating a simple game using this library.
Follow this link to find the video on my channel
Designing the game:
The essence of most games requires a player with a goal, challenges, a scoring system, penalties and progression of levels. With limited time and lacking an in-depth mastery of OpenGL I had to take inspiration for this project from arcade games popular in the 80s where the goal was to get the highest score. I tried replicating the setting from the game Defender (1981) where the targets to destroy appear from left and right. For simplicity, I designed the player (roughly) as a wizard sitting on a broom, who will get to move across the screen as obstacles come at them from only the right. The player would need to navigate across the screen to collect objects that increase the score while avoiding penalties that could lead to Game Over.
Playing the game:
The objective of the game is to stay alive by avoiding obstacles which are the green squares and brown balls (appears in level 2). Using the left, right, up and down arrow buttons, the player can be moved across the screen to avoid the obstacles and collect the yellow objects to increase the life bar and score. Each hit with an obstacle will cost life and the life bar at the top-left corner will indicate when life points are too low. The game ends when life score becomes zero. There are currently 2 levels to the game and it is still under development.
As with any code-based project or developing games worth our obsession, immense care and patience is required. This game didn’t turn out as aesthetically pleasing as I had hoped. So, for the next development phase I will focus on incorporating some more complex shapes and a better color palette. In the meantime, the project will be available on Github.
Source code available in this link
1 For curious minds like me, the following is a helpful guide on the origins of OpenGL and its evolution.
https://openglbook.com/chapter-0-preface-what-is-opengl.html