Diana Calistru
Metroidvania Game Engine
Custom game engine made for creating Metroidvania games. The target game we wanted to recreate is Axiom Verge.

Gameplay Programmer

6 people

Custom Engine
About Broken Towel Engine
Broken Towel Engine is a custom engine created specifically for making Metroidvania games made by a team of 6 programmers using C++. The engine has a Grid-Based Level Editor system for quick level building, an easy setup for a character including running/jumping/attacking which are characteristic for Metroidvania games and the availability of programming enemy behavior using a state machine. These features together provide an excellent base for creating Metroidvania games with ease for both Windows and Switch platforms.
Our engine needs to support both Windows and Nintendo Switch game deployment. We used preprocessor guards to define platform specific operations. The structure of the project has a cross-platform setup.
​
The game we tried recreating is Axiom Verge.
​
We started by creating a detailed Technical Design Document detailing all systems the engine needed, things to consider when implementing them, as well as UML diagrams and pseudocode to help with writing the actual C++ code.
Then, we closely followed the document when creating the engine and made a recreation of Axiom Verge using our engine.
Parts of the Technical Design Document written for the custom engine
The engine is a library used by the Metroidvania Game project which runs on both targeted platforms





Project Roles & Responsibilities

Gameplay Programmer
-
Contribute to the Technical Design Document.
-
Implement core gameplay systems such as Input, Camera and Character Controller.
-
Work on platformer gameplay features related to movement.​

Scrum Master
-
Agile Project Management through Atlassian Trello.
-
Establishing an environment where the team can be effective.
-
Addressing team dynamics.
-
Ensuring a good relationship between the team and product owner as well as others outside the team.
-
Protecting the team from outside interruptions and distractions.
Entity Component System
I worked on implementing an Entity Component system for our custom engine. I used the EnTT library as it is a popular solution used by many games including Minecraft.
​
I onboarded the team on how to write systems using composition instead of inheritance which is mostly the norm for Unreal Engine.
​
Entities are just unique IDs which are composed from different components and systems operate on these components. The behavior of an entity can be changed at runtime by systems that add, remove or modify components.
Utility functions for Entitites
Onboarding presentation for my teammates




Transform Component updated by the Transform System


Input
Since our engine is cross-platform and supports making games on Windows and Nintendo Switch, the input manager is an overarching interface with the specific methods being implemented in separate children classes.
For Windows, I used the GaInput library. For the Switch, we had access to an SDK and Nintendo Developer Account and I used the provided documentation to write the input functionality.

Input Manager with separate implementations depending on platform


Input Manager UML and implementation

Different implementation of the same virtual function


AddJoystick is a virtual function in the Input Manager class that is overridden for the Windows and Nintendo Switch platforms with the intended implementation.
Camera
The engine implementation followed the TDD closely, especially the UMLs for the class structure and intended behavior.
​
The game has an orthographic camera that follows the player, as intended in the TDD.
Excerpt from the Technical Design Document about the camera system

Orthographic Camera UML

Orthographic Camera Class


Character Controller
As the engine we were working on is made for 2D Metroidvania platformers, one of the most important systems to get right is the player controller. Therefore, I put some thought into planning and creating the needed classes.
​
The character controller has editable variables and allows for walking, jumping and crouching. For improving the game feel, I added coyote time and jump buffering to make the player inputs more forgiving.
​
Then I spent some time fine tuning the movement to accurately match the target game in movement feel and recreated a level from the game in our engine.
Planning the character controller inside the TDD

Player Controller UML


Character Controller Component storing important data
&
Character Controller System updating all Character Controller components


Moving, crouching and jumping matches the target game Axiom Verge
Delta time implementation for both Windows and Switch


Character movement feel improved by jump buffering and coyote time

