OpenGL C++ Game - Lunar Lander
posted 3 weeks agoI’ve now finished my first year of uni! As part of my 2D Graphics Programming class we started on using OpenGL with C++ and had the option of creating a cannon/wall/target game or lunar lander. It was to be completed as a pair but I had to work myself. I choose the lunar lander, I’m not exactly sure but I think it took around a month or so to create.
The lander starts at a random position at the top of the screen, is immediately affected by gravity and you can use W, A, D or arrow keys to maneuver around. Your objective is to land on one of two flat landing areas. If you leave the screen at the left or right, your lander will appear at the opposite side of the screen and the appropriate height. Accelerating and reaching an altitude of 1000 will stop the game. You only have 300 fuel and each button press will reduce your fuel by 1, or you can hold the key in and it will reduce your fuel over time. The landing terrain is randomly generated in around the same area on the screen each time the game is loaded.
There’s some basic physics in involved, and some basic collision detection for landing/crashing. Early on I also had the lunar lander rotating but it caused some problems and since time was against me I had to take it out. Also if I had some more time I would definitely have made the collision detection a bit more accurate, but hey it works! :) Quite glad with the over all outcome, it was fun to create! Over summer now I think i’m going to tackle the cannon/wall/target game and some over stuff!
Ohhh, interesting! I need to get back into blading in summer, and i’ll be making more games by that time!
Blading the Game Tumblr for the latest on the game..
Original Promo edit: JJ’s Blading the Game


