While at university I used an engine created to help beginners learn game programming, that was designed to be able to make 3D games very easily with little knowledge of how things are working.
It was a great engine, but as I have bit of a passion for 2D games, I decided to attempt to make a 2D engine, that was just as easy to use, for beginners to learn game programming.
Through this, and my unimaginative project naming, PurpleEngine was born!
Using SDL and various libraries that accompany it, I created a fairly simple 2D game engine with the same layout as the 3D engine we were using. It does not have many optimisations, and is not intended to make games of a commercial level, but should be far more than sufficient for learning.
I’m now releasing the engine as open source (LGPLv3 license to be precise) and intend to write some tutorials and examples on using it to create some simple games.
Using the Engine
For the moment, the build versions of the library are available, but are fairly outdated, so downloading the code and building it yourself is the best bet.
The code is hosted on GitHub here. To download the code using Git use the following command:
git clone https://github.com/robotgoblin/PurpleEngine.git
To build, you will need SDL, SDL_ttf, SDL_image, SDL_mixer and Lua5.1.
On Linux it should be pretty easy to download all of these.
sudo apt-get install SDL-devel SDL_ttf-devel SDL_image-devel SDL_mixer-devel lua51-devel
su -c "yum install SDL-devel SDL_ttf-devel SDL_image-devel SDL_mixer-devel lua-devel"
On Windows, you’ll have to download them all individually, simply searching for them on Google should quickly find you the latest versions.
Once you have all of the additional libraries installed, you can build simply using the Makefile provided.
Note: Due to slight differences in packages between different systems, you may need to modify the Makefile and PurpleEngine.h to point to the correct location of the installed header and library files.
There’s some documentation for the library, albeit it’s fairly minimal at the moment, but it should answer most questions.
The documentation can, at present, be found on the project’s GitHub Pages, here.
Doxygen is used to generate this documentation. For anybody wishing (or willing) to work on improving the documentation, check out the documentation git branch.
I will be providing several simple examples of how to use the engine, which will often be fairly simple, small little C++ programs that can be downloaded, built, examined and tinkered with, to help learn about using the library.
At the moment, the only example is a very minimal catching game, complete with a list of suggestions of what to add if you’re thinking of tinkering with the source.
You can download the source archive (tar.gz) here. Some very basic images are provided, but feel free to change them to your own.
If you are interested in working on the project, feel free to clone the Git repository and send me patches, or make pull requests.
I try to keep the issue tracker fairly up-to-date, so anything that’s on there would be a good place to start on, but feel free to make any changes whatsoever.
I’d happily accept some feedback on the project, including recommendations, criticism, and anything else.
Either drop me a message on this site, on GitHub, or email me (see my about page for my email address (avoiding spam-bots)).
[Update 5/8/2012]: There’s another example here, of creating a simple blank window using the engine. This could be used as a skeleton for PurpleEngine projects. You can download the example here.