Oh boy, was this game a wild ride. This was the first game of year 2 of TGA, and we were tasked with creating our own engine from scratch. That is no easy task, but we put all of our wits together and ultimately created an engine that would support this wonderful game.
18 odd weeks
Creating a 3D engine
There are many parts to creating a game engine with 3D rendering capabilities, and in this project I was responsible for a vast majority of the rendering and resource management. We used DirectX11 as our rendering library, and over the course of this project I became very familiar and, indeed, comfortable with it.
I took our rendering from some basic colored rendering to implementing point lights, cubemaps, animations, custom shaders, and PBR.
I also had a lot of fun refactoring the basic system we were taught in our class to something flexible and comfortable to use.
Diorama made in the modelviewer
The resource system is for managing textures and shaders, and shares resources between objects that use them. They update automatically in-game when the file is changed externally, allowing for very swift iteration.
Using the resources is as simple as writing two lines. The interface is clear, and hides away any unneccessary steps that the user does not need to see.
The resource is lightweight, as well as stable. I use smart pointers to make sure that the resource is never used when it has been deallocated or has not been allocated yet.
When we were given our animation system, it was a mess. The variable names were strange and I didn't understand the theory. But through some thorough research, and a LOT of trial and error, I managed to get a grasp of how it worked and integrated it into our engine.
I created an animation interface for playing animations, where you can play animations and they blend into the next.
At some point we realized that setting an animation by index doesn't make sense, and so I added a mapping where a descriptive name could be assigned to a filename, so one could write "run" instead of looking up which index the run animation was.
My animation endeavors are continued in the next project, where I would go on to add additive animations, bone socketing, and bone manipulation.
Live updating resources
With Dear ImGUI, everything becomes so much easier. You want to edit the timestep scale? I'll whip up a time control window with a slider and some pause & play buttons. We need a way to load levels easily? Get yourself a dropdown menu. This ease of use and practicality is what drew me to create more and more interfaces and tools for the engine during development. The first truly useful tool was the object browser, which allowed us to view and edit components while in-game. We usually could only do that through our level editor (Unity).
Many more tools came after that. I added a graphics preview window, a way to move the player to a point on the map by clicking it, a time control & profiler window, a screenshot button, and debug drawing controls. Most of this came out of a desire to make the iteration and debugging process as quick and easy as possible.
This all came to a head when I decided to make the model/asset viewer. It was more than just a way to view models, however, and it became the primary way that we added meta-files to our models, edited animation data, and created particles, and much more.
I worked on the loading and construction of the navmesh graph. I revised my old A-Star algorithm to function with a template argument and implemented a simple pathfinding for the characters in the game. This served as a base along with the navmesh agent component.
I also worked on a lot of balance changes and polish, as well as effect and particle implementation. I added a particle and lights to the players weapon with some very primitive bone socketing, and attack timings.
I created the attack system aswell, which only takes a description and creates the attack object into the world.