Thoughts
Project Type
Personal Project
Project Progress
In Development
Technology
Unreal Engine 4/5 C++/Blueprints
Team Size
Solo
Thoughts is a game I have been working on for the past year, it started as a self improvement project, where it gave me a chance to try and implement different gameplay mechanics.
Features
Random Level Generation
+I designed and implemented a random level generation system for "Thoughts," incorporating variables to enhance design flexibility. These variables include minimum and maximum room widths and heights, the number of paths connecting rooms, and the total number of rooms. The algorithm operates on a tile-based framework, generating tiles and assembling them into rooms based on the specified inputs. Here's how it works:
1 - Variable Initialization: The algorithm begins by checking the input parameters for room dimensions and paths. It selects random numbers within the specified ranges for room height and width, and determines the number of paths to create.
2 - Room Construction: Tiles are spawned and arranged to form rooms, with equal numbers placed on each side of the starting tile to maintain symmetry. The algorithm tracks tile positions in a grid, ensuring cohesive room layouts.
3 - Decoration Phase: After building the rooms, the algorithm sweeps through each tile, applying decorations based on predefined restrictions. For example, corner tiles with two open sides are identified and embellished accordingly, selecting decorations from a predetermined array of actors.
4 - Path Creation: If additional rooms are required, the algorithm creates paths (corridors) between rooms, decrementing the room count with each iteration. Corridors lead the player to new rooms, with portals marking the end of each level.
5 - Optional Backward Build: An optional parameter allows for backward building, necessitating additional calculations to maintain room connectivity.
In conclusion, this random level generation system works for the design I have for the game. I'm happy with the way rooms are built, but I plan to further improve the decoration algorithm for the system.
Enemy AI
+I implemented the Enemy AI using Unreal Engine's Behavior Tree system. The behavior tree I created is fairly simple, and it's used for most of the enemies, where the main difference being in the the enemy character, where each enemy will have different sets of attack sequences (animation driven) with assigned values for minimum and maximum range, which allows the AI to correctly calculate which attack to use for each enemy. I also started working on defensive mechanics for enemies because I want some of the harder enemies to break out of a stun lock caused by the player, but for right some enemies will run away when the player is too close to them (Ranged enemies), but I want to expand on that and make it more dynamic later.
Combat System
+Combat was one of the most fun areas I explored with creating this game, where it was my first time attempting to create a full combo melee system. I had to go through multiple iterations to make it as fun and fitting to the game's design as I could. I'm fairly happy with how the combat looks. The combat is a modular code design driven by the weapon the player is holding, which for now means which class the player chose for the current run, where each weapon will have different animations, combat effects, combat sounds, as well as different damage. Combat is animation driven for the most part where logic behind which attack sequence to use (is the player dashing? is it a parry?) is predetermined, but logic such delaying an attack input to after the current attack is done playing (input buffer), playing sound and visual effects, and collision checking is driven by the animation (Animation Notifies).
Progression System
+The progression system for the game was an area I hadn't explored yet before creating this game. Since the game is a rougelike the progression system had to be randomized and unique for each run, so the way I designed and implemented a progression system was by rewarding the player when clearing a room by offering 3 different stat upgrades and allowing the player to choose one, and after beating the whole level (clearing the last room of the level) I offer the player 3 different special abilities (ex. have a 30 % chance of exploding while in combat dealing 50 damage to surrounding enemies) and let the player choose one. Special abilities were made using delegates on certain events that the player encounter, such as dealing damage, or taking damage, and binding these events to the special abilities when activated. Also, since the progression system changes player stats, abilities, and the special abilities offered at the end (I don't want the same special ability to show up twice), I created a system to save and restore player information when moving between levels.
Enemy Spawning System
+I created a system for enemies to spawn in a randomized pattern to stay within the random theme of the game's design. I created that system by splitting up enemies into 6 different tiers tier 1 , 2 , 3 ranged, and tier 1 , 2, 3 melee, and associated every level with some variables such as, min number of waves, max number of waves, and min tier 1 enemies, etc... and created a system where it calculates an approriate amount of waves and number of enemies to spawn within the wave from each tier. The system makes it easier to design the levels, and balance the game since I only have to change the variables to make it easier or more difficult.
UI
+I designed and implemented the UI for the game, mainly using photoshop and Unreal Engine's UMG system, which allowed me to integrate my 2D art and animate it in the engine.