Simpleengine (under constructing)

Introduction

Inspired by my experience with 'SimpleJson' in the Tool Development course during my education at The Game Assembly which, ironically, was anything but simple, I set out to craft my own engine, humorously named SimpleEngine. 

This post was created through the combined efforts of ChatGPT and DeepSeek.

DirectX11

SimpleEngine, initially just a fun experiment, became my gateway into graphics programming. In these images, I've implemented a deferred rendering technique combined with Physically Based Rendering (PBR) to achieve more realistic lighting and material effects. In the future, I plan to implement visual effects (VFX) to add more juice to the gameplay.

Can you see what's wrong in the light calculations in these images? 😀

 
 
Animation Loader

My journey into procedural animation sparked with the captivating experience of Rain World. Witnessing its dynamic animations propelled me into a deep dive into the realm of procedural animation, where I delve into the intricacies of concept like inverse kinematics (IK). Eager to implement this in my project, I first had to tackle the basics: loading models and animations into the engine. Despite my initial lack of knowledge, I successfully integrated models, skeletons, and animations using FBXSDK. This marked the first step toward implementing procedural animation in my engine.

Absolutely nothing broke😝
It's working!
Animation Blend

This was the second step toward achieving my goal of procedural animation, as I needed to blend different animations together during transitions. To do this, I incorporated linear interpolation to smooth the transitions between animations. The usage is quite simple: we just need to provide the animation clip we want to transition to, along with optional parameters to control the speed, specific frame, and overall smoothness of the transition. This is incredibly useful, as we may often want to transition into the same animation but with different controls depending on the context. The next step is implementing Inverse Kinematics (IK), and I planned to start with the FABRIK algorithm. 

Walk & Idle animations transition blending
Profiling

While implementing and testing animations, I encountered significant performance hit and wanted to identify the bottleneck. To achieve this, I integrated a profiling library called 'EasyProfiler' into the engine. The benchmark results revealed that rendering was the primary bottleneck, specifically in animation updates and the rendering process itself. I began with a simple optimization using instanced rendering, which significantly improved performance. For animations, I leveraged a thread pool to update multiple animations in parallel. Additionally, for models sharing the same animation without variations, I optimized further by updating the animation once and reapplying it across all relevant models.

Another major bottleneck I encountered was with my editor updates, which were severely impacting performance, dropping from 1000 fps to 200 fps. This was due to my Content Browser, where I was looping through and updating the directory every frame-- an extremely expensive operation. To address this, I refactored the system to create a directory tree node once and update the current node only when the Content Browser is in focus.

Lastly, I have a zero-tolerance policy for memory leaks, which means I need a stable and efficient way to track them. Inspired by TGA's in-house engine's memory tracker system, I integrated a similar system into my engine and modified it to suit my needs. The original implementation reported false-positive memory leaks due to static instances begin cleared after the memory tracker system itself. I encountered a particularly annoying issue related to the Static Initialization Order Fiasco, but I resolved it (for now) by heap-allocating instances that would normally be static, such as singletons, and manually deleting them at the end of the main function. This approach almost guarantees that the memory tracker is one of the first systems to initialize and, therefore, the last to be destroyed--hopefully.

200 animations
Scoped tracking
Stack traces report which also can be saved as txt file
Editor

testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest

Entity Component System

testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest

Reflection (ECS)

testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest