Merle: The Kinda Incompetent Wizard

Introduction

“Merle: The Kinda Incompetent Wizard” is a platformer game inspired by “A Hat in Time” developed by a team of students from The Game Assembly Malmö.

This was the second project we made using our own custom engine. The engine was ported over and reworked with our experiences from the previous project in mind before starting development properly.

Contributions

Visual Scripting

For this project we were required to work with a visual scripting system. I was the programmer responsible for implementing it from our individual courses into the engine. But due to a manpower shortage I was too busy working with the refactoring of our scene management to allow for more organized game state handling. This resulted in a lot of our features that were planned to utilize our visual scripting being implemented with temporary code until very late in the project.

It got very useful when it came to UI. I refactored the UI editor to be able to apply scripts onto a UI element. This made it very simple to start iterating on the functionality of our UI.

Mesh Collider Import

We implemented NVIDIAs PhysX to handle the physics of our engine. In the begining we thought creating we could adding the coliders onto the unreal bluepint would work well enouge. Oh how wrong we were. It quickly got overwelming and we realized mesh colliders were needed.

With this chage a new problem arose. How were we going to get the collider data. PhysX suports several difrent types of colliders, not only mesh colliders. To not ruin our proformace we needed to simplyfy our meshes to more efficent collider types. This was where I was called in.

Our test model with several elements of diffrent collider types.

With the help of Melvin Turesson Nilsson, the main programmer responsible for our PhysX implementation, we reworked the mesh loadnign and collider parsing. Mesh assets instead contained two meshes containing the diffrent elements, sorted by mesh type goten by their prefix. Then we restructured the collider creationto also read from the mesh collider when inizialization using methods I derived to get the mesh types collider data from its verticeis with O(n) complexity.

This pipeline proved effective since our artists had learnet to worked with diffrent types of mesh colliders before. Since using the vertecies normals, binormals and tangents to get directionality for the box we incountered that some times it gave us weardly rotated colliders. After talking throu our artists workflow we discoverd that it was when triangulating the quads in blender.

Image of normals, binormals and tangents taken from catlikecoding.

Reflection

A lot of this project engine wise was about implementing improved to our old ways. For example, I added reflecting to the materials textures and variables coming from both Unreal and in our UI Editor. This was to give our technical artists more autonomy and control. With this autonomy came also an increase in talk about proper usage. Since that control was now primarily in the hands of others there was continues talk about improvements. Some examples being with the detail level of the colliders, or structuring of new shader materials, or complexity and versatility of the scripting. It made us more akin to advisers than being the sole developers of the features. It made work go significantly faster thanks to every member being able to contribute their all.