In November 2012 I was tasked to develop a game as one of the final projects of my Master of Technology. During most of the Games Programming unit I often heard the lecturer reference the classic "Hero Must Save Princess" type of game. I love archetypes, so I decided I would make a "Hero Must Save Princess" kind of game, and for the lack of a better name, I called it just that.

Hero Must Save Princess was developed as a classic 2D top-down RPG game. I based the basic gameplay and aesthetics on what I thought would have to be one of the most popular games in this category, "The Legend of Zelda". I never actually played Zelda, but its general style and gameplay influenced an entire generation of games.

So I started by designing some characters using a free online tool. I figured at the very least I would need a hero, a princess and some enemies. The gameplay concept was very simple, the hero would be able to walk around the map, with the camera following it until it reached the edges of the map. If at any time the hero collided with an enemy it would loose one of its 4 lives, unless the player held the space bar, in which case the hero would be able to hit the enemy with his sword. There would also be some obstacles around the map to constrain enemy and player movement. The objective of the game was to encounter the princess, which would be somewhere on the map.

I developed the game in C++, using the SFML library. I also made it compatible with a GUI map editor called Tiled, just so it would be easy to design new levels for the game (in fact, I got my wife to help me design them). I used freesound to get some cheap sound effects and used an old song I made as the background music.

The source code is available on GitHub. You can watch a gameplay video below.

You can also download the game for Mac OS X here.

I'd love to be able to add new features to the game, such as new levels, new characters, inventory, doors that can take the player to different rooms and maybe even the ability for non-playing characters to chat with the player. But I'll probably never get around to it.

I found the experience of developing a game from scratch very satisfying and rewarding. It's like cooking pasta from scratch, it takes a lot of time and effort and you end up with something that seems basic, but somehow it just tastes better (I've never actually cooked pasta from scratch, but I imagine it would be like that).