Spite: Wrath of Valkyria

Production time: 14 weeks, 50%

Team size: 22

Engine: Catbox


Contributions:

-Gizmos

-Scene & object serialization

-Interactable UI sprites

-Multi-editing gameobjects & components

-Undo/redo functionality

-Material editor with modifiable shader properties

-Replace selected objects with prefab

-General A* pathfinding class

-Bone parenting

-Prefab brush tool

-Fog


Basic engine functionality

During the first couple weeks of this project I was setting up basic engine/editor functionality. I already had a good base to work with since I spent a lot of time working on the engine during/before summer. The GameObject component system was already in place, along with transforms, ImGui and rendering. Clicking on objects in the viewport to select them was also possible.

During this project I added ImGuizmo, serialization and deserialization of objects and scenes, and quality of life features such as duplicate, delete, copy and paste, undo and redo, F to focus, and multi-editing of objects. I also added a settings window where the LD could tweak things such as editor camera move & zoom speed, snap settings, and the background clear color. These settings are saved to an userprefs file.

Bone parenting

Although our engine is mainly designed after Unity, I preferred the Unreal Engine approach to bone parenting. When you drag & drop an object onto a gameobject that has a skeleton, a dropdown menu appears with a list of all the bones you can parent the object to. In my opinion, this approach was less cluttered and simpler to work with.

Since I had already implemented regular parenting of objects, bone parenting uses the same concept. Each bone gets its own Transform which GameObjects can be parented to, and the bone’s world transform matrix is then reconstructed for each frame. This was very useful for parenting a hitbox onto our snake boss’ head bone so the collider would follow the animation.

Shader properties

The Shader asset class has a few virtual functions that can be overridden so the necessary shader data will automatically get sent into the shader. The shader data can also be rendered and modified on the material in the properties panel.

Prefab brush tool

This was a tool I made to make set dressing easier and faster. You can quickly place out prefabs and scale, rotate and move them without using the gizmo.

Fog

I made a fog post-processing effect by using the camera’s depth stencil as a shader resource. I also made a height fog which uses the pixel world position rather than the camera depth. Both types of fog have tweakable settings for color, density and cutoff, and they can be combined.