One question people might want answered is “how many puzzles will Piczle Cross Adventure have?” and the answer is, at this stage… I’m not sure. The game’s initial design aimed at a minimum of 150, but because I spent some time building data-driven systems to handle the puzzles it is child’s play to add more and more puzzles. And as areas of the game are being created new ideas for puzzles crop up and are so easy to implement I simply add them.
Everything is driven by data. The puzzles themselves live in a data table which I access through an ID I assign to each puzzle. In the world I can simply drop a Blueprint object I created and assign it an ID. This object contains all the world-side elements of the puzzle, aside from its ID. It contains the effects for the puzzle before it is solved, the interaction when Score-chan gets close to it, the animation when the puzzle is cleared, and the final object once it is cleared.
Once the player presses A when prompted, a new object is spawned that contains the preview information, derived from the same ID. Here the player can see the puzzle’s ID, the size, any minimum requirements needed to play it, and, if the player has already played some of the puzzle before, all the blocks and crosses of the puzzle in progress. Here the player can choose to play this puzzle, or cancel this pop-up.
If the player decides to play the puzzle, the actual puzzle gameplay is spawned, again taking only the puzzle’s ID with it. Before the puzzle becomes playable a lot happens behind the scenes.
First I check the puzzle’s ID against the data table. In that data table I can grab the puzzle data, the size of the puzzle, the solution to the puzzle, the image associated with it, how much experience clearing the puzzle nets you, etc. The puzzle data itself is merely a series of 1s and 0s. The clues to the puzzle are automatically generated from this string. In short, the code counts all the clues required on the fly.
1 1 1 0 1 0 0 1 1 1 1 0 1 0 1 0 0 1 0 0 1 1 1 0 1 0 0 1 0 0 1 0 0 0 1 0 0 1 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 1 0 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 1 0 0 1 0 0 1 0 0 0 1 1 0 1 1 0 1 1 1 1This is what a puzzle’s data looks like…
During the puzzle the player can quit out. The current progress is then saved and the player returned to the world. Or if the player cleared the puzzle, the solution is shown, and the time and date recorded. After this the original world object kicks off the puzzle’s cleared animation and sets itself to “cleared”.
So when I’m creating a part of the world and suddenly I think, hey, I could easily add a puzzle here for such and such an object, I make a note (in old-fashioned pencil and paper). Later when I have completed what I was working on, I boot up the in-engine puzzle creator I made, and draw whatever puzzle idea I thought of before.
Now, there is a lot of checking code and play testing at this stage too, which I shan’t write about here. But once the puzzle passes muster, I create a colour image based off the black and white puzzle image, copy the puzzle data into the data table, add the solution image and solution text and hey presto. I then create a world sprite for the object, if it’s a simple static thing (animated or interactive objects require some extra work later) and plop it in the world.
The whole process from starting a puzzle to having it in the world can take as little time as an hour, though it usually takes a little longer for polish. The world puzzle BluePrint object has a couple of extra features. If I want to kick off a dialogue after the puzzle has been cleared, I can simply assign a dialogue ID to the object (if it remains blank it will simply ignore that option) and if a special hand-made event is required, that, too, can be kicked off right there. Both of those require some extra work, of course, so the “puzzle creep”, a content version of the old “feature creep” a lot of independent developers have to deal with, is mostly reserved for simpler, static puzzles.
As such, I designed for about 150 puzzles, with some leeway here and there. But as content is being created I am finding this number shift upward, quite steadily. I am not making any promises at this stage, but I wouldn’t be surprised if the game ended up with twice as many puzzles as intended. Sorry about that.