This Ludum Dare we made "Enigma Cubes"!
We are pretty happy with the puzzles in the game and how it looks! From the feedback we got, it seems the difficulty of the puzzles is just right. Perfect! :smiley:


If you are interested in puzzle games, you can play it here.
How is it made?
Day 1
The team consisted of 4 people: 2 artists, a sound designer and me, the programmer. So, how did we make the game? We actually started of with a rather vague idea. After the brainstorming of day 1, we just had:
Cubes would move in loops and the player would have a kind of energy gun to stop them or push/pull them.
If you played they game you know the gun didn't happen, but the core idea is still there: cubes still move in loops and you can still push/pull them.
After the brainstorming, I started with the level editor. "Wait, why start with a level editor?" you ask? The idea was that this would allow us to quickly iterate on puzzles without having to place all assets again. Additionally, I needed a grid representation of the level in code anyway for handling the puzzle logic.
Levels are built in a program called "Tiled" and I am just reading the xml and spawning the prefabs. It is not the first time I took this approach. This is the view in the level editor for Level 4 in the final game (can be solved in 2 moves). It is the level which is also shown in the first screenshot of this post (in case you want to compare)...

Day 2
It is only on the second day while programming that the idea became less vague in my head. I really started to see what kind of puzzles we could do with this. I threw out the player and the gun because I realized the puzzles would work better without one and we didn't start modeling the player yet anyway. I moved the camera top-down instead of third person and started implementing a drag and drop mechanic instead of a gun.
Drag & drop had its own complications. I realized that I needed to stop time while you were dragging the cube, but how do you indicate that time is stopped? Shader magic! The time stop effect (while dragging) is a shader which is applied to all objects. I am affecting the shader on all objects with some global shader variables.

A is the part for the "time stop effect", with the top part of the graph being the edge wave effect, the section below the "activate time stop" and the part below the "de-activate time stop". Part B of the shader is unrelated, it is used for the cube mouse hover effect, and C is some other things for glow. I am pretty happy with how all the effects look.
Next to the time stop effect, I am also really stopping time with the useful Time.timeScale.
Meanwhile the artists in the team were building assets non-stop. Plants, crystals, ... However, I would need to place all of these. To get variation I would need to rotate them, scale them, and move them to a correct place. I would need to repeat this a huge amount of times for grass and plants. I started wondering whether there was a better way to do it. In the end, I wrote a button to do parameterized random rotation and scale and spreads them randomly through the level (position).
The random rotation script gets as only input the maximum angle that the asset can be titled. The code for random rotation looks like this:
In case your wondering, it took me 2 tries to get the Quaternions correct. The "random" rotation has a limited tilt means they are never placed up-side down. I limit the angle. Spreading assets through the level (position) was simple as I was already placing all the floors from code anyway, I knew where everything was. Just needed to spawn some additional assets per tile.
Placing things like mushrooms is now simply clicking the button, locking all other layers in Unity and then using box selection to quickly delete all the ones I didn't like. Deleting is a lot faster than placing things, especially if you can just drag a box and delete! :smile: Because all mushrooms sit on their own Unity layer and I locked the other layers, I couldn't accidentally delete anything else. It was actually pretty fun to mass delete mushrooms, grass, plants, crystals, ... Screenshot: right after clicking the button (on level 4).

I also put in some of the cube animations on day 2.
Day 3
Finally, on day 3, I took time to design the levels I had in my head (8 of them). Before this we didn't have any levels yet. I imported them, but still needed to implement some pending mechanics. By 6 PM CET on day 3 the mechanics got implemented and we could play the game for the first time. :sweat_smile:
I guess that is still on time? We still had 6 hours?
Even with the scripts I created on day 2, I still spent 2 of those hours actually placing all the mushrooms, plants and crystals though, ouch...
So, like the previous time, we didn't have a game yet on the start of day 3. I don't think that is necessary a problem though and I think in general, it went very well.
A different angle on level 3. It's a magical place!

That's it!
Interested in some nice puzzles?
Play & rate it here.