Making a puzzle game in 4 days
Howdy hackers, once again I got side tracked from the tower defense game and decided to create a puzzle game. The goal was to make it as quickly as possible and not spend time on building overly complicated stuff. The puzzle game is inspired from one of the Machinarium in-game puzzles:
I found this puzzle a lot of fun and decided to create a dedicated game. The objective is to move over all tiles without getting trapped. Select a starting point then choose a direction in which the tiles will be lit all the way until a wall is hit, then select a new direction. You can’t move through yourself so you need to make sure you don’t get trapped.
Last weekend was extra long and that was the time span I sat out to do this within.
I started by created a level format, I kept it simple and used a char matrix to describe the board. Then I implemented a simple view on this that drew rectangles in different colors. And on top of this I added the ability to move over tiles. This was all straight forward and playable within a couple of hours.
Once I could actually play some test levels I went ahead and wrote a level generator. This was also pretty straight forward and very brute force. The only thing I had to put some effort in was the difficulty calculations so the levels could be categories into easy, medium and hard. I ended up using the number of choices needed to solve a puzzle going the easiest way (fewest moves). Another thing that I had to do was to remember to throw away duplicates, to do this I mirrored and rotated each solvable to make sure every level was unique. Totally more than 300 levels are used for the game. All in all I probably spent 10 hours on this.
Adding some nice graphics
Once this was done, the boring programming was left. Building some kind of menu, making games save, showing dialogs upon level completion or failure. This took the rest of the time. Anna did some cool buttons and tiles for the game to make it look better. This probably took 20 hours. All the fiddling with mouse overs etc. Phew.
Name: Touch All Puzzle
For now the game is available for free in the Android market. The name is “Touch All Puzzle”. I’m not very happy with the name, but it will do. I will make an IOS and flash version as well.
Also I would like to experiment with monetizing it as well. This is something I am really bad at. I’ve written free software for 15 years now but starting to feel that some money would be nice.