SimpleEngine

Inspired by my experiences with 'SimpleJson' which, ironically, was anything but simple, I set out to craft my own engine, humorously named SimpleEngine. This effort mocked the misleading "simplicity" promised by such tools. Olle, whom I had previously worked on projects like Spoopy Sprint and Stella's Quest with, harbours a distinct aversion to the use of singletons and global variables, a stance that, while typically aligning with good practice, I playfully chose to ignore for this engine. Embracing the chaos, what could go wrong?

 

Simple, it's just that easy

 

DirectX11

SimpleEngine, initially for fun, became my gateway to learn graphics programming. In this image I've implemented deferred rendering technique with 2 point lights. I still have issues with applying ambient light from the skybox and shadow but I hope it will get resolve soon.

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 delved into the intricacies of concepts 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. However, the animations didn't play correctly. After days of searching for the culprit, I discovered the issue was in the shader I had mistakenly used the '+' operator instead of '*' for the joints transforms.

 

hehe
finally!

 

Animation Blend

Utilizing a model previously created in Abalabos,I incorporated linear interpolation to smooth transitions between different animations for testing purposes. There are ImGui windows where it's possible to adjust transition speed and values. Unfortunate, the engine is currently on a big restructure and I don't have a good gif saved to demonstrate.

 

Animation LERP
 
Profilering (EasyProfiler)

While implementing and testing animations, I encountered significant performance hit when updating multiple instances of the same animation type. This led me to devise several solutions.

  1. For models undergoing the same animation without variation, I update the animation once and then applying the new pose to all models sharing that animation.
  2. For models with differing animations, leveraging a Thread Pool to update animations concurrency before proceeding.

The impact of these optimizations was remarkable, yielding a ~1 milliseconds (release) improvement per frame for 200 animations on an Intel Core i5 9400f, with even more substantial gains for models using identical animations. The rendering is still responsible for ~90% of the performance bottleneck so I'll need to optimize it in the future.

 

Model created by Oliver Benedetti (SG22)
Profilering (Memory Leaks)

Using this simple memory tracker, I can check for total allocations, memory leaks, and their locations. It can be turned off in a JSON configuration file with two settings. 

  1. TrackAllAllocations: this is very fast and just print amount of memory leaks.
  2. TrackAllStackTraces: this is much slower but will also print out where the leaks could be.

Additionally, there is a global memory tracker that keeps count during the program's lifetime. This global tracker is turned on by default to remind us to fix the leaks eventually. The stack traces could also be saved to a txt file.

I lost quite a lot of hair trying to solve the Static Initilization Order Fiasco problem :(

Scoped tracking
 
 
And more

Over time, SimpleEngine has evolved, increasingly focusing on implementing new features. This includes the integration of navigation meshes and pathfinding algorithms, as utilized in Spite: String of Fate, and the exploration of Entity Component System (ECS), a concept I delved into due to our team's use of FLECS for the Spite project in our TempEngine at The Game Assembly.
You can read more about my ECS journey here, Entity Component System

There are many more features that I've implemented in the SimpleEngine, but I don't think they're interesting or have enough time to write about. 

I intend to persistently enhance SimpleEngine throughout my game development journey, curious to discover where this path will take me. So far, developing SimpleEngine has been a fulfilling experience.

We've integrated the Node Scripting System (NSS) into SimpleEngine and are currently working on ensuring compatibility between ECS and NSS. NSS is created by Emil.
You can read more about his amazing work at https://broremilolofsson.github.io

 

Pathfinder testing