Engine: Unreal Engine 5
Platform: Windows
Development Time: August 2023 - December 2023
Team Size: 22 developers (7 programmers)
Role: Gameplay Programmer
Kneedle Knight is a 3D platformer where the player controls a small mouse knight in a large world, with the power to merge into and travel across fabric surfaces. I was the programmer primarily responsible for the merging mechanic, and as a very experimental mechanic, this work pushed the boundaries of my knowledge and skills in gameplay programming much further than any previous project had, as the ability to travel across 3D surfaces as a 2D character came with numerous problems to solve, questions to answer, and decisions to make. In addition to this mechanic, I was also involved with working on several of the menus and the settings, contributing valuable UI experience to my overall skill set.
Kneedle Knight's core mechanic is the ability to merge into fabric surfaces and move along them as a 2D character, and I was the programmer responsible for this mechanic. When the player presses the merge button, raycasts are performed around the player to determine if there are any fabric surfaces around them, prioritizing fabric that the camera is facing first, then fabric that the player is facing if there is none that the camera is facing, and then fabric underneath the player if there is none that the player is facing. If fabric is found, the game will then check that the fabric is large enough for the player to merge into, and initiate a merge if it is. Once a merge has been initiated, the player character is switched into 2D mode, which entails turning off collision, reorienting the player and moving them to be flush against the wall, switching the model out for a decal, and disabling the standard 3D movement while enabling a custom 2D movement component to be used instead, as well as performing some haptics, VFX, and audio. The custom 2D movement component not only controls the ability of the player to move around on fabric surfaces, but also uses raycasts around the player to ensure that the player remains within the bounds of the fabric surface, functioning as a sort of "collision" detection against the fabric's edges; these raycasts additionally wrap around walls in order to differentiate between a fabric surface that wraps around a corner, and one that stops at the corner. In this mode, the player will also treat whichever surface they are currently merged into as their movement base, keeping their position and orientation consistent relative to the surface.
As well as merging into fabric already present in the level, the player can also create their own fabric surfaces using the "sew" mechanic, which was another of my responsibilities. After the player has thrown their needle (which itself is a mechanic that was done by another programmer), a rectangle of fabric will be left on the surface. The size of this rectangle will always fit onto whatever surface it is sewn onto without overshooting the edges. The way this is accomplished is that when the fabric rectangle is spawned, it performs a series of raycasts, starting from the point where the needle landed and expanding outward in 8 directions, to determine the bounds of the surface, and scales itself to match up to its maximum allowed size. Sewn fabric also matches the movement of objects that it is sewn onto, as well as maintaining its orientation relative to the object when that object rotates, by saving its initial offset and relative orientation when first sewn, and transforming these using the object's current transform to get the updated position and orientation.
In addition to being one of the gameplay programmers for this project, I also became the one primarily responsible for creating the settings menu later in development. For this task, I used Unreal's UI designer to lay out the UI elements, and coded the functionality of all of the UI elements in the blueprint graph, as well as creating a system for saving and loading settings. Furthermore, while most of the actual in-game effects of the settings were implemented by other programmers, I was the one to implement the in-game effects for keybindings, graphics presets, haptics, and the 2D movement mode setting (which allows the player to select between different control schemes for 2D movement).