Demonstration of a looping object and its shadow.

Looping Objects

In the game there are objects that would change transforms for each loop of a room. To make them more fair, I added a shadow that would show where they would be shown on the next loop.

This could be both used for platforming or just as visual objects in the background.


Year of production: 2020 August to September.

Rules: Make a Puzzle game.

Time: Four weeks.

Team size: nine.



UI Programming

Gameplay Programming


Follow Lars descent into madness as he loops through his own personal hell over and over until he recollects his memories and who he is.

The world changes around you for each loop you go through in this first person puzzle game.

But beware, the only way is forward in Lars journey!


Since visual looping objects won't need shadow, I just added a simple bool to control that.

To set the positions of where the objects will teleport, we used the functionality in unreal to show transforms as diamonds in the world.

Since it's on the looping object itself, the transforms are in local space. That was converted to world space in script.


The diamonds in the viewport are the transforms for each position the object is going to teleport to.

A pushable object will teleport with the looping object if it is on top of it.

Teleport Together

One extra mechanic that we added is when you have a pushable object on top of a looping object, they would teleport together.


This gives more flexibility in what puzzles the user can make.
Sadly, this was never used in the actual game, due to time constrains.

Hold right mouse button to move in blueprint.

LoopingObject Code


The full detail of the classes and code is shown when pressing the button.


Demo of how the pages opens up the way to the next puzzle.

Page Pickup

The main feature of the puzzles are the pages that you pick up. They are what you need to progress from each room and also tell the story of the game.

We wanted the pages to be very visible and understandable from the beginning. So we added numbers to show the order of when to pick them up and also highlight them to be able to always see them.

Since the rooms can vary in size, UI made it so each page controls its distance for the outline on its own. this way a user can just change the value when appropriate.


To view the story that is written on the pages, you would open up the book after picking up at least one page.

The last page you pick will always be the one you see when you open the book.

Picking up the puzzle pieces unlocks parts of the narrative that you can read in the diary.


When using the pickable object, you would set the number in the sequence. This is a array index, which in hindsight would be the number used in the puzzle instead.

I wanted to keep the UI simple to use, so I just have a textbox to write in any narrative is needed. And since the game uses two different personalities and fonts for the game, I have an Enum to determine which type use for each page.


UI settings for one the pickups.

Hold right mouse button to move in blueprint.


The full detail of the classes and code is shown when pressing the button.

Page Pickup Code

Demo of the reset function works. When resetting, all objects return to their original state.


Reset objects

In the game we have a button to reset the game in case anything gets stuck or the player falls out of the world.

To get this working, I made a interface class for all the objects that needs to reset. And when the player wants to reset, they call a Restart function for all objects with the IRestart interface.


Ui for the the checkpoint.


To get this working, I needed to have something that determines where the player can reset to. For this, I have a checkpoint volume that exist in each room. when the player enters the volume, it will save the positions of objects (If needed).

This Checkpoint also serves as a information holder for each room. What doors to close when entering the room, how many pages are in the room and how many looping objects are there as well. That way the character can determine what's needed to progress in each room.


Typical use of the IRestart functions.


Getting all objects with the IRestart interface, in the Character Class.


This is the call for Restart on all objects. Also in the Character Class.


The IRestart interface class has only two functions: One to set start values and the other for what happens when restarting.

The Set Start can occur either on the objects BeginPlay, or when entering a checkpoint volume. This depends on the functionality of the object.

The player class will then gather all the objects with the IRestart interface and then call for their Restart function.

This can create a few problems with the priority, since the array of IRestart objects is unsorted and can run in the wrong order.
This is in theory only and has never happened in the game.

Hold right mouse button to move in blueprint.

Checkpoint Code


The full detail of the classes and code is shown when pressing the button.


Minor scripts 

This is a list of more minor scripts I worked on, which doesn't need too much explanation.

Pushable Objects

The pushable object works as a Unreal physics objects and the movement is done automatically by pushing with the character.

The more interesting parts are to check if there's a looping object underneath the pushable and if so, teleport it with the looping object.

Blue objects are pushable.

Hold right mouse button to move in blueprint.


The full detail of the classes and code is shown when pressing the button.

Pushable Object Code

Each level streaming volume keeps track of itself and the rooms beside it.

Level Streaming

I added a few debug commands to the game, such as loop the loopable objects, deactivating portals and moving between puzzle rooms.


All puzzles are different levels, which are streamed in when the player enters in range.

To get the moving between puzzle rooms to work correctly, I needed to make my own level streaming volume that keeps track of which puzzle rooms the character has been in.

Accompanying this is a level streaming manager. This is used to keep track of what rooms the player have been in and what rooms exist in the world.


The full detail of the classes and code is shown when pressing the button.

Level Streaming Volume Code

Hold right mouse button to move in blueprint.

Level Stream Manager Code

Hold right mouse button to move in blueprint.