Objective • Technologies • Widgets • Download • Credits
Notice: This is my first project in Unreal Engine. I intend to improve it as I learn to use the engine.
You are more than welcome to help me enhance this project, especially if you also want to venture into the world of 2D games in Unreal Engine
Your goal is to find all the keys scattered throughout the map to unlock the door and advance to the next level. Each level will have its own difficulty and a different number of keys to be collected.
- Paper2D
- PaperZD
- 100% Blueprints
- Unreal Engine 5.2
Image | Description |
---|---|
Player's life based on health bar | |
Number of times the player has died | |
Player's current level | |
Collected keys / Total keys |
You can find all the levels in the "Maps" directory.
To create a new level, simply create a new map and follow the numerical sequence of the existing levels. For example, name them as "LEVEL_6," "LEVEL_7," and so on. This will ensure that the player is automatically teleported to the corresponding next level.
Remember that it's important for the level you create to have a name starting with "LEVEL_" (all in uppercase) followed by the level number.
- 1. Place the trap anywhere in the level.
- 2. Click on it and open the "Details" window.
- 3. In "Details", find the "Default" option and customize it according to your preference.
Variable | Type | Description |
---|---|---|
Loop? |
Boolean | If true, the trap will return to its initial position when it reaches the end of the path and vice versa. |
Spline Movement Duration |
Float | Set the time, in seconds, that the trap will take to complete its trajectory. |
Player Damage Value |
Float | Damage the player will take upon touching the trap. |
To define the quantity of keys the player will need to collect to open the door is quite simple. Just place the keys somewhere in the level (it can be as many keys as you want). When you start the level, the count of keys created in the level will be automatically done through the "BP_DoorLevel" class.
The "PaperZD" plugin was used to perform player animations.
In level 3, you will come across a lever that can interact with the environment, opening a passage.
However, you can also use it to interact with one or several characters in the environment. This is completely customizable without the need to create a new class for each interaction.
To do this, go to the actor class you want the lever to interact with. Add the "leverInteract" tag.
Next, create a new function also named "leverInteract"
Inside this function, you can define what will happen when the lever is triggered.
Then, to link the lever to one or several specific actors, place the lever somewhere in the level and, in the detailed settings, look for "Actors interacting with the Lever
." Add the classes that will be called when someone interacts with this specific lever.
Download this project and open it by clicking on the "captain2D.uproject" file.
Pixel Frog's art, which is freely available on itch.io, was used in the creation of this project.
Pixel Frog Assets |