Tranquility (a.k.a. Castle Tranquility)

Tranquility is a wipe-it-clean game - your mission is to fling the monsters across the floor and toward the exit. It's your job to clean the castle before the Hero and the King returns!

Controls are straightforward: tap once to unleash the "wrath of wipe", hold and drag to pan around the level. There's about 6 levels to finish the game.

Press the screen to play!

Castle Tranquility Flash Game

Source code and assets

In the zip file you will find the complete project with source code and art assets (gfx and music). You will need HaXe, OpenFL and HaxeFlixel (and also probably FlashDevelop) to compile from the source. Follow the getting started guide at HaxeFlixel to get the setup working.

Download .zip (2.4 MB) 2015-04-19 (Competition Version)

Ludum Dare Theme

The theme for the 32th Ludum Dare Competition was "An Unconventional Weapon".

This time I was totally surprised by the theme! I only participiated in the Theme Slaughter and had no idea what themes were "hot" in the final 4 voting rounds so when I looked at the won theme early Saturday morning I honestly had NO idea what to do. I spent a good 2 hours just staring at my bare walls and surfing wikipedia for deep psychological insights into unconventional weapons; any idea I came up with implied a "traditional" weapon - also, weapons mean a protagonist and some enemies = lots of character animations to draw in a very short time. Not really my cup of roibos...

I meddled with some random puzzles for a while, but there wasn't really a weapon there. Also just making a strange character (tentacle equipped kitten, rabbit firing cotton balls) or some other distorted weapon (super shiny sword, 100x oversized machine gun felt a bit cheap. Instead I went for a setting I wanted some more experience with: a 2.5D scrolling adventure, f-yeah! So for the unconventional weapon I had to rely on game mechanics instead: the protagonist is invisible, but fires an expanding "wrath of wipe" that bounces the monsters in the Castle Tranquility around, flinging them hopefully toward the exit and ultimately their resting haven!

Yes, the aim of this game is to Clean the Castle™ and make it ready for the king and the heroes that are bound to show up any time now (2.5D castles are always awaiting the next hero, no?)


There was a lot of code to write this time and I had to struggle for quite many hours with the Nape physics engine to get an expanding point-source. In the end I had to bypass the physics engine for the force "exitation" and settle with a hybrid of my own code and Nape for something that worked good enough. Many hours were also spent trying to get the pixel scaling working and get things drawing where I wanted it. Early Sunday morning I had to give up for the night and get some sleep. With a fresh pair of eyes the following morning I threw out all the cruddy hacks from the night before and rewrote most of it from the start.


It is frustrating pushing pixels in your paint editor without having any code written - wondering if there will be enough time to get anything done before the deadline!!! This time I had set the bar very, very low for the quality of the artwork. I looked at some old maps of FF1 (NES) for inspiration, just to remind myself not to crazy with the shading and the tile work. So when I had the basic tiles working I just stopped making GFX and got on with the code...

Thanks to the MiniLD last month, it was a bit easier to use Tiled this time and I had a bit better workflow than previously. I'm getting better at parsing and dealing with the meta data that can accompany Tiled .tmx layers etc., which makes making levels a lot easier and more exact. I find I need much less hardcoded values in the code and more gameplay data in the levels/maps. I just have to learn Tileds shortcomings (the number of times I've but objects and tiles in the wrong layer is too damn high!)

Since I had a few hours left I could create some music and sounds this time. The music and SFX was made in FL Studio 11 (12 is coming tomorrow!) and it was a pretty basic process, splatting some loops, adding some chords, adjusting the EQ, hoping for some random accidents ... With a few more hours available I think I would redo the sound effects and create more variations to avoid the machine-gun effect. But then again, I will probably never touch this stuff ever again so what is there now will have to do.


This was a pretty stressful weekend, but I am actually a bit proud and amazed that it is possible to create so much under 24 h. I think much of it is because of the quality of the tools available. HaxeFlixel has been a really great library to use this time, but this was the first time I wished FlashDevelop would have a bit better "syntax intelligence" and a better debugger (couldn't get the debugger to work at all so I had to rely on old-school trace()-debugging). Coming from a few months of solid usage of Android Studio I really miss all the little shortcuts and tips that you get from that software. AS has been a very good and productive replacement for Eclipse for me.

Well, let's see how the LD "compo" goes. There's always a few gems and crazy/innovative ideas to be discovered. Most interesting will be to see how the hivemind has interpreted the "weapon" and the additional "unconventional" bit...