A new direction for Open Invaders
May 31st, 2007 by
jamyskis
With the release of version 0.07.1 of Open Invaders (the .1 at the end meant little more than the fact that the source code had to be altered slightly to allow for proper installation with the –prefix extension in the configure script under Linux as well as allowing for the creation of Ubuntu packages) I’ve decided to take the game in a whole new direction for 0.08 in the lead up to the beta 0.1.
First and foremost is a complete restructuring of the code, so that everything is displayed in a more modular fashion and everything can be coded in a way that is relatively self-contained. Thus, all the code dealing with graphics will not touch the code dealing with sound unless it absolutely has to, and even then most of the interaction between elements of the code will be dealt with by passing parameters between functions.
If you’re new to C++ programming but decide to take a look at the code anyway, you’ll see that what this means is that instead of two C++ files (main.cc and functions.cc), the whole thing has been divided into around a dozen different files, each corresponding to a specific purpose, for example, graphics, sound, game logic, collision detection, initialisation, the intro sequence etc.
I’ll also be trying to make more use of C++ specific features such as classes so that I can aim for a more object-oriented program, where individual game elements are treated like objects and can be manipulated in a more efficient fashion.
All of this is very new to me, so if anyone is willing to lend a hand to help me learn all this stuff or debug the code, drop me a line.
Posted in Development, Open Invaders |