One of the ways I thought we could make the puzzles was to find an algorithm for it, and generate as many as we want. This might work, but it gets very complicated very fast. For example, in our game some puzzles you can solve by just looking at them before you start the timer. This means you can clearly see where to put a pylon in order to block the robot. Generating maps for these types of puzzles is not so hard. But we also have puzzles where it not only matters WHERE you place the pylons, but also WHEN. For example, sometimes you have to let the robot reach a dead end and when he is coming back, you quickly place the pylon.
See example below:
These types of puzzles are a lot more difficult to generate with an algorithm and in our case it was not the best solution. So we decided to make them all manually..you know..using our brains.At this moment we have roughly 50 maps and we hope to order them on difficulty as we do our alpha-testing. But how do we come up with these puzzles?
I bet there are a lot of nice ways to come up with puzzles but what I do sounds very straight forward to me. The first thing I do is, I roughly pick a width and height for my map. Now that I have the general layout I put in my START and FINISH tiles and simply hit PLAY. At this point the map is empty and the player has no objects in his/her inventory to use. I simply observe what the current solution is( if there is one) and I ruin the solution by putting an object in his path.Now I hit PLAY again and I observe to see if there is a solution. If there is not, I give the player one object to place and I play the game again. When I find the new solution, I decide to block that route too. Now the puzzle is getting more difficult. From here on I can keep repeating this as often as I want. Find the solution and block it. The more often you do this, the more difficult a map gets.A big part of creating good puzzles is the editor you use. We have created several little tools in our editor to help make things easier. Here is some of those tools that help us make the puzzles:
- Map sharing. Everyone using our editor has a user-ID and we save every map online using that ID. This makes it easy for that person to share the maps with friends so that they can play and give feedback. We don’t store any models or textures of course, but only the position of the tiles and the type of tiles. This way most maps don’t even reach 1 KB in size.
- Replays. Now that every map is stored somewhere online, we thought it would be cool to add replays. This means every time someone plays the game, every decision he made in the game is stored, and we can play it back. So if we encounter someone with a VERY fast record, we can take a look and see how they did it. We can also use this data for the ‘hint’ system. So that the best solution is fed to other players as hints.
- Records. This is a bit similar to the one above, but this means that we store some of the records like the fastest player or the least amount of tiles taken to finish a puzzle. We can use this data to help us find ‘secret-easy-solutions’ or simply for the high-score table.
- Visual help. In our editor, when you are play testing your new map, you can turn on a preview of your path. With a series of white dots on the floor, we predict the movement of the player and when you put a wall in front of his path, you can see it change in real time ( see image below )