EGO Engine

Custom game engine for Metroidvania-style games

About this project

EGO Engine is a custom game engine, specifically designed for Metroidvania-style games. This was the first time that I worked on creating a custom game engine. This is also when I discovered that I really enjoyed the challenging task of creating custom game engines.
The engine runs on both Windows and Xbox One. For this project, I primarily worked on implementing the ECS (using EnTT), creating a system for saving and loading the level using Cereal (a serialization library), managing all entities, as well as tools for creating and decorating the levels.

This is a student project made during my 2nd year at Breda University of Applied Sciences.

My contributions to the project

During this project, I mostly worked on developing the engine. My biggest contributions will be listed below:
Implementing the ECS:  I implemented the ECS using the EnTT library and developed a convenient wrapper around EnTT functions. This wrapper streamlines interaction with the ECS, shielding users from the complexities of EnTT-specific functions and objects.
Several components were added, which made use of the ECS. Components include an audio component, camera component, physics component and mesh component.
Implementing level decoration tools: I added a tool for decorating the levels. This allowed the user to load custom models into the engine, which could then be moved around using gizmos. These models could be used as decoration in the background/foreground of a level. 
Decorations are serializable:  Decorations in a scene can be saved and loaded. When loading a level, the engine will look for a 'decor.save' file belonging to the level, which contains all information, such as the model path and a transform, about the decoration model. Saving and loading of decorations is done using the Cereal library. 
Moving decorations using gizmos:   In order to make moving models easier, a gizmo was added using the ImGuizmo library. Models can be moved, rotated and scaled, and the user can easily switch between the three modes using simple shortcuts or through the gizmo properties window. Grid snapping can also be toggled using the gizmo properties window, which makes it easier to accurately place models. 
Loading models using file browser:   To load specific models, users could open a file browser to locate and load a model. The file browser only displays .glTF files, which is the supported model format of the engine.  For this functionality, I used the ImGui-Filebrowser library, which is a file browser implementation for ImGui. 
Loading 2D levels created in the LDtk level editor: Since all levels are designed with a 2D layout, we opted to use the 2D LDtk level editor. I worked on implementing the systems required for reading the LDtk file and importing the data into the engine, so that the levels could be constructed. This was done using the LDtk Loader library, as well as some additional JSON parsing using the nlohmann JSON library. 
The video below demonstrates the decorator tool being used to decorate a piece of the level.
FMOD Studio:  I implemented FMOD Studio into the project for both Windows and Xbox One. FMOD Studio is the sound engine that we used to implement audio into our project.
Global and spatial audio: I implemented both global and spatial audio. Global audio is primarily used for background ambience, whereas spatial audio is used for 3D objects that live in the world, such as enemies. Spatial audio implements the FMOD 3D attributes, which allow sounds to move with an object, making spatial audio very immersive.
Audio parameters:  I implemented audio parameters, which are variables that allow users to control audio events. While audio parameters were unfortunately not used in the final demo project (due to time constraints), they were greatly used in previous demos to experiment with creating cool and interesting audio effects.  
Implementing greedy-meshing algorithm:  In order to decrease the number of collision boxes in our level, I implemented the greedy meshing algorithm. This algorithm greatly decreases the number of collision boxes, as a large number of them are grouped together into larger ones. Using the greedy-meshing algorithm also helped "smooth" the level out. There used to be an issue where the player would get stuck on neighboring tiles, even though there was no difference in height and no roughness between the two. Applying this algorithm helped fix that issue.
More details about these contributions can be found below.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Quick overview

Project Type:  Custom Game Engine
Platform:  Windows, Xbox
Tools:  C++
Role in Team:  Engine and Tools Programmer
Project Duration:  16 weeks
Release Date:  January 20, 2023
Team size:  6
Role in Team:  Engine programmer and Lead