top of page

Unreal C++ Library Practice Project



Engine: Unreal 5.21

Programming Tools: MS Visual Studio 2022

Language: C++

Developement Time: 2 weeks

Genre: Vampire Survivor like (?)

Download: https://oliminor.itch.io/unreal-c-practice-project

Git: https://github.com/Oliminor/UnrealLibraryPracticeProject


Summary:Small 2 weeks project to find out my capabilities and the learning curve with Unreal 5 C++ library. The game idea is based on the Vampire Survivor type of genre. This project is focuses on the programming part, so the gameplay and the content is mainly for testing purpose.


The Development Process:

Programming:

  • Cooldown Manager: Utilizes a dictionary with string keys and float values to determine if the cooldown has finished, calculate the remaining time, and adjust the cooldown time if necessary. It counts down the cooldowns using delta time.

  • Enemy Spawner: Spawns enemies around the player on the map (outside the camera view) based on specified parameters such as enemy and wave numbers, wait time between individual waves, and enemy spawn time. Utilizes SetTimer to introduce delays in the spawning process.

  • Object Pool: Implements a basic object pool that can hold Actors, spawn them inactively into the world, and activate (or deactivate) them as needed using an interface.

  • UI Interface: Provides an interface to display user data, basic buttons to restart and quit the game, and additional buttons for the player to select new upgrades upon leveling up.

  • DataAssets: These assets store data similar to Unity ScriptableObjects. In this project, they are used to create different enemy waves, player upgrades (health, damage, critical stats), and skill upgrades, which become available as the character levels up.

  • Game Manager: Stores and manages abilities and upgrades. When the player character levels up, the game manager ensures that all data is updated instantly, allowing the player to enjoy the new power-ups.

  • Enemy: The enemy AI is relatively basic, involving walking towards the player and utilizing an avoidance function (similar to the one used for boids) to prevent them from stacking on each other.

  • Player Character: Features simple WASD movement and instantiates abilities.

  • Projectile: Three different behaviour projectile script, mainly for variety and testing purpse.


DataAssets:

As mentioned earlier, DataAssets primarily store data. While they can also accommodate functions, in this project, they serve the purpose of storing data to aid in gameplay and balance without requiring hardcoded elements. Designers can utilize DataAssets to create player upgrades, skill upgrades, and enemy wave data, essentially shaping the gameplay. In games of this genre, varied attack abilities and upgrades are fundamental for eliminating thousands of enemies effectively.


ree

Wave Data is used to create enemy wave information for the enemy spawner. The available options are to store the enemy type, the number of waves, and within each wave, specify the number of enemies to spawn. Additionally, it allows configuring the timing between spawns. An example of how it looks is provided, with added randomness to the spawn radius to prevent a uniform pattern:

ree

ree

Wave List Data simply stores or queues up the aforementioned waves. While Wave Data and Wave List Data could be combined into a single DataAsset, in this scenario, individual Wave Data can be reused in another list if needed. This method is just one variation, usually the designer states what they prefers.


ree

Skill Data includes the ability and its main stats, predetermined for every ability level. This includes damage, attack rate, projectile speed, and radius (damage area size). Additionally, there is a text box for the description data, which is shown for the player character when level up occurs.

How it appears on the UI:

ree

ree

The last DataAsset is Player Data, which is similar to Skill Data. However, in this case, it's used to upgrade the player's passive status, such as Health, Damage, Critical Rate, Movement Speed, etc. In this scenario, the designer can select from the stat list (which holds every single stat stored as an enum) and assign a value to it. When the player character levels up, they can upgrade one or multiple stats simultaneously.


The quality of this project and code is far from perfect, but it served as an excellent opportunity to challenge myself in a new game engine library and brush up on my C++ knowledge (which still has a long way to go before reaching 'perfection'). Overall, it was a valuable exercise, providing a solid understanding of what I'm missing and what I should prioritize if I dive into a new engine (thanks to Unity, this might happen sooner than later).

Project Gallery

©2022 - 2023 by Oliminor. Created with Wix.com

bottom of page