This post is a portion of Part 5 in my on going series about 2D Game Development using the Allegro 5 library. These posts are in course order. You can see all of the posts in this course by clicking the “2D Game Development” button at the top of this site.
- 5.0 – Our First Game
- 5.1 – Our First Game: The Player
- 5.2 – Our First Game: Timing and Movement
- 5.3 – Our First Game: The Projectiles
- 5.4 – Our First Game: The Enemies
- 5.5 – Our First Game: Collision Detection
- 5.6 – Our First Game: Game Logic
- 5.7 – Our First Game: Conclusion
It is finally time! In this part of the webseries, we will be going from beginning to end on making a video game. I am going to start off by saying that this game is in no way cutting edge. In many places, I have used the most simple and watered down solutions to problems. There are a few reasons for this.
No Class
First and foremost, this series is intended for people without a strong understanding of Object Oriented Programming and classes in C++. With this in mind, there are no classes in the code. Instead, I use the simpler cousin: The Struct. The struct gives us the data modularization that makes the program easier, without the syntax that classes bring. Due to this choice, the game is not very extensible (easy to upgrade or change). Instead, the game works as an intro to putting all of our skills together.
The Little Engine That Won’t
In this game, we don’t use a game engine or any real over-arching control scheme. Everything is handled on the function level, so you can see exactly how the pieces fit together. This allows a more transparent look into the inner workings of our game, but reduces the efficiency of our game.
In Summary
To sum up: this game is simple (almost painfully so), but it allows for a firm grasp of what is happening in a game. Over the course of the series we will be adding to, and updating this game so that eventually it will look pretty good. Without further ado, let’s talk about the game.
Space Defenders that Invade with… Centipedes
In this game, I took a page out of classic shooter games. The concept of this is simple. The player controls a space ship that is tasked with destroying comets plummeting to earth. A point is scored everytime a comet is blown up, but loses a life if he/she misses one or is hit by one. Many simple things can be done to make this game easier or harder, such as: adding more lives, changing the number of comets, changing speeds, etc. Beyond the fact that this is a game all by itself, it also serves to demonstrate what make a good prototype. You can think of this game as our original prototype for a final game. Maybe the artists are finished with the art, but we want to move forward with coding. Using simple primitives in place of art, we can do just that.
In the next video, we will be looking at the base structure of our game and our player object.
*maybe the artists [b]aren’t[b] finished with the art?
First, thanks for this amazing tutorial. Second:
-why does when we use timer the movement of the player ship becomes faster than it was before(Before there was no wait, hence the ship must move very fast)?
-how can we make the interface or game window appear full screen?
I am not sure why the ship would move faster. It shouldn’t have
Look here for information on full screen games:
Here
Or here
Please reply soon!
I was wondering if you knew any reason why I might be getting the Error:cannot open source file “objects.h”
I’ve basically re-installed allegro and have started a new project to see if that helped, but it did not. Also everything in the tutorials has worked before this. I’m running this on visual c++ 2010 express with allegro version 5.0.8.
Also I wanted to thank you for creating such great tutorials. Without them I would probably still be trying to install allegro. Thanks again!