Magus Ex Machina – a product of a 48h codejam

(Collaborative post by Gynvael Coldwind and Mateusz “j00ru” Jurczyk)

Five weeks ago, we have taken part in a fancy game-development competition aka Google GameJam 48h. As the name implies, the contest lasted for precisely two days; unfortunately, we were proven to lack supernatural powers and had to spend some of the precious time sleeping :-) The theme of the event was “Magic versus Science”, and in our case, those two days of hardcore coding resulted in a 2D logic game called Magus Ex Machina. In the end, four teams in total managed to create and present games with actual gameplay; interestingly, we were the only ones making use of a native technology (i.e. OpenGL + SDL + a few other minor libraries), as the other competitors decided to go for pure browser (html + css + javascript) productions. Although we didn’t get the first place, we believe that the game is still fun to play, and thus worth sharing with a larger audience :-)

As for the game itself, the basic storyline is as follows:

Four powerful mages were returning home from a terrible war with great evil that haunted their realms. At the same time, scientists at CERN started a new experiment. And a black hole was created…

And hit by a lightning…

The lightning-blackhole turned into a magical inter-realm wormhole and teleported the mages.

Streight into the CERN main computer.

Help them get out and return to their realm.

The game is divided into separate levels (currently 13 of them, three of which are training-levels), each of which can consists of one or more distinct maps. On every level, the player is assigned up to four mages, each of them having a different skillset. And so, there’s a fire mage, who can shoot fireballs destroying parts of the wall (or rather turning them into gaps), a trigger mage who can summon and shoot huge metal objects which interact with the binary-switches present on the map (often resulting in opening/closing some doors), a support mage who can create bridges over holes, and a teleport mage who can create teleports all over the map.

In order to complete a level within a specific time limit, the player needs to coordinate the performance of all available mages, so that at least one of them reaches the exit located on one (usually last) of the episode’s maps. The player has full control over one mage at a time – he can then walk around the level and use the character’s specific skills (up to a certain limit); all of these activities are recorded, and saved for later. When the player is done with the current mage or the time limit expires, the next mage from a queue becomes active. At this point, the time is rewinded to the initial state of the level, and all actions performed by the previous mages are replayed. As a consequence, all characters end up playing simultaneously as the game progresses, creating an interesting  chain of dependencies between the mages, and making the gameplay highly dynamic.

Since even the best description won’t be as informative as a gameplay video, you can learn more by watching the following recording:

Although the game is theoretically compatible with the Linux and Mac OS X platforms (it was even tested at some point of the development), the official package is purposed for the Windows operating systems, only (feel free to build the game on the platform of your choice, though). Apart from adding a few (around seven) new maps, we haven’t changed anything (except on crash fix) since the end of the contest.

The game is released as open-source (see the README and LICENSE files for more information), and we’re not planning to further develop the project. We would like to acknowledge Peter Shanks, Kevin Saunders, Tomasz Wacirz and SoundJay.com for the media resources (images, music, sound effects) used in the game.

A full package (win32 executables, source code, media) can be downloaded from here (ZIP, 7.7 MB)
Disclaimer: the source code is a huge mess, but it was a 48h compo, don’t blame us :-)

And that’s pretty much it. Should you have any comments or problems related to the game, feel free to drop us a line.

Cheers!