Traditionally, when writing a computer game, one follows a number of steps. Firstly you decide what kind of computer game you are writing, and then you find or write a game engine to power that kind of game.
It seems to me that this approach is wasteful. While it may have been true that you needed to hand-optimise every last bit of code to get a commercial-quality game, this is no longer the case as game companies are increasingly reporting that smooth graphics alone are not enough to sell new games. New genres and improved gameplay are becoming increasingly important.
What if we could make a computer game library that didn't assume anything particular about the type of game being played? If there was a library that could run games like pong just as easily as a full-blown, third person 3D shoot-'em-up/strategy game? A library that encapsulated many of the functions and procedures you needed in any kind of game? One could simply plug in different bits of code and graphics to make any kind of game you could think of and get a playable game out of it, in minutes or days rather than days or months.
This is the first and most important goal of this project: to design and implement a gaming library to abstract across all common computer game types. It is my hope that this will encourage new game types and cross-genre games.
One can make some observations about computer games. They mostly consist of objects moving around 2D or 3D space, with different properties. So it makes sense to use an object-oriented programming language like C++.
Modern computer games all have graphical interfaces. Also, a diverse range of platforms are increasingly being used, like Mac OS X and Linux. So it makes sense to use a cross-platform graphical library designed for game programming, such as SDL. I have been developing the game so far under Linux, using only portable code, with the SDLmm wrapper library to SDL.
There are a number of design requirements for the library:
I have put quite a bit of thought into the existing library. I believe that the best way to do this is to have a standard object, called TGObject, from which all “in-game” objects are derived.
Using multiple-inheritence, objects will also derive from a number of helper classes. For example, some classes will handle the movement of an object, others the behaviour in the event of a collision.
The current version of the library is documented in hierarchy.sxd (an OpenOffice.org document) available from CVS, with comments in DayLog.tex also in CVS.
The current priority is to implement this library, and resolve any conflicts and gaps. In particular, not a great deal of thought has gone into the human interface (especially menus and front-ends), and some event-map code needs to be worked out.
Future plans are to design a graphical development tool based on this library, to semi-automate the process of choosing classes to derive from. Also, a set of games will be made to demonstrate just what we can do.
If you would like to help development, please check out the CVS code (see The SourceForge Page), read the day-log and start coding. Please mark all changes in the day-log, which is also a good place to write down any thoughts on development or changes that have been made.
The author of this document is Robert J. Lee (email@example.com) Please contact me if you would like to be added to the game's development team, or if you have any questions.