UE4 Puzzle Game


Download the project here! Unreal Engine 4 is required.

Summary
This is a puzzle game I made for Unreal Engine 4 in 4 weeks half-time at The Game Assembly. I wanted to mainly focus on the scripting using Blueprint, the visual scripting language for Unreal Engine 4. So I decided to make the visuals very simplistic.
Specification
· Developed at The Game Assembly
· Puzzle Game Scripted using Blueprint
· Development Duration: 4 weeks (half-time)

Tools
· Unreal Engine 4
· Blueprint
· Matinee

Watch the video above for an in depth developer walkthrough.

Process
I took inspiration from Super Mario 3D World by Nintendo and came up with the idea of a platformer where the player has to to jump on big buttons to activate them, based on a segment in the game. The player can toggle the buttons from red to yellow and once all buttons have been switched to the yellow state, they all turn green.

01toggle
02all_turn_green

I then added background music, some minor sound feedback for when the player activates or deactivates platforms, and another sound for when a puzzle is cleared.
01_UE4PuzzleProject

This is the logic behind the buttons.

This checks for how many buttons that are activated in the scene.

This checks for how many buttons that are activated in the scene.

Once all buttons have been activated, they all turn green and can not be interacted with any longer.

Once all buttons have been activated, they all turn green and can not be interacted with any longer.

 

After I was done with the basic logic for the buttons I started to play around with Matinee, an animation tool in Unreal Engine 4. I wanted to reward the player with an interesting introduction to every new puzzle so I made an animation for a wall that opens up, leading to the next puzzle.

03p2_intro

04tricky_jumps
The second puzzle is more of a platformer. When the player jumps on a button, more will appear from below. I wanted to make some jumps a bit challenging, giving players incentive to pay more attention through the potential outcome of death. To prevent backtracking in case the player were to make a mistake, I created a checkpoint system that spawns the player back at the beginning of the current puzzle. The current puzzle also resets if the player would fail.

When the player goes inside the checkpoint trigger, its position is saved to that new respawn location.

When the player goes inside the checkpoint trigger, its position is saved to that new respawn location.

When the player dies, she respawns at the last saved checkpoint.

When the player dies, she respawns at the last saved checkpoint.

Current puzzle resets when the player respawns.

Current puzzle resets when the player respawns.

 

When the second puzzle is cleared, the player is rewarded with a cinematic introduction to the third puzzle.

05p3_intro
06blue

 

Here the player is introduced to the blue buttons. When a blue button is pressed it activates or deactivates all adjacent buttons.

Blue button influence logic.

Blue button influence logic.

Overview of blue button puzzle influence.

Overview of blue button puzzle influence.

line

Final Thoughts
If future iterations would occur, I would like to make another type of button that can only be activated once, and then if the player wants to revert its state, the player needs to press another button before the first button can be pressed again. I would also like to add moving platforms and add more puzzles using the existing mechanics already in place. And of course, make a proper ending in the same way that I made the introduction to the third puzzle.

I had a lot of fun making this little puzzle game and it felt very satisfying when a feature worked as intended. I wanted to add more but I had to stop somewhere and call it done.

These kinds of puzzles could even be implemented in other types of games that are more fast paced like Unreal Tournament. Having the player push three buttons in a sequence to open up a secret door leading to an awesome weapon. Or even shoot buttons in the correct order.