gian marco toso computer engineer, software developer

Jam Engine An OpenGL-based 2D game framework

The Jam Engine (working title) is more of a framework than an engine, and its main purpose is to allow the creation of 2D games. It is based on SDL and OpenGL and is written entirely in C++, making heavy use of the most recent features of the language (C++11).

It has a modular structure, so that pieces can be added and removed easily, and tries to be as much abstract as possible in order to allow future developments such as a DirectX renderer or integration with a physics engine (right now I'm integrating it with Box2D).

Another interesting feature is its built-in event manager: the whole thing is event driven, so having two parts of the engine communicate is as simple as listening in to an event dispatched by a module!

Since it's still in the early phases of development, there is not much to show except for some code, but I prefer to keep it closed source until I've finalized some decisions about the overall design and implemented some of the more juicy features. There is still much work to be done, but my main focus right now is to implement what follows, not necessarily in this order:

OpenGL 3.2 Profile And DirectX renderer

Right now I am limited to the 2.1 profile. I want the developer to be able to switch between the two profiles, in order to have a more flexible and potentially backward compatible code base. I'd also like to add a DirectX 9 or 11 renderer at some point, because why not? :)


I am still not very much familiarized with shaders: I know how they work but I still need to get more proficient with their use and with their language. Still, I want to leave the fixed pipeline behind me as soon as I can and rewrite all the drawing code to use shaders (for both 2.1 and 3.2 profiles).


Jam Engine already uses XML: it reads the contents of a "game" from an XML file and dynamically instantiates the various C++ classes, both builtin and custom, based on the XML info. The next step is to allow scripting through JavaScript or LUA (or both), so that the developer won't need to write a class for each and every level, actor, entity or whatever he decides to add to his game if it's possible to extend a pre-existing one through the use of a script.


Yeah, games have sounds. I have yet to begin to explore this one, but it's definitely in the TODO list

Much more!

As I said, this thing is still in very early stages of development. I don't plan on building a feature-complete framework, since there are already a ton of those out there, but I want to see how far I can go while learning the stuff I need to better acquaint myself with game development. If I manage to make a game or two in the process, that's all the better! :)

Code is coming soon. If you want to know more, contact me!