AA  Engine

A Journey of learning

Right from the moment I wanted to make a Game engine, it has been an amazing journey. 

I am currently on the 2nd iteration of the N iterations of my Game Engine. The development is at full speed and below are the currently implemented features of my Engine!

The Headings below are drop-downs!

Rendering Engine

The Rendering Engine is abstracted from the User to help them render objects without the knowledge of Graphics APIs.

Rendering API and Renderer

The Rendering Engine has an abstracted API that is used by the Renderer to handle the Submitted render calls by the User.  The calls are currently handled synchronously and instantly, but in the future, the functionality will expand to handling Rendering on a different thread called the Render Thread.

Shaders, Contexts, and Buffers

AA Engine abstracts Shaders, Buffers, and the Rendering contexts independent of the API and is implemented per API. AA Engine also supports a shader library that the user can use to store and manage all the shaders. 

Forward Rendering

I have built a lighting system using the Phong Lighting system. I have also developed the code for shadows

Components of Phong lighting model using RGB model: OpenGL allows us to break this light's emitted intensity into three parts: ambient, diffuse, and specular. Each type of light component consists of these three major color components

Deferred Rendering

I built a deferred renderer that makes the rendering faster and more efficient at a slight cost to memory

Deferred Rendering is implemented in 2 passes, the G Buffer pass and the Lighting pass

G Buffer pass includes storing the information like position of vertices, diffuse, normals, texture coordinates

Lighting pass includes bringing all those values together and drawing them on the screen using blend nodes

Math with SIMD support

Custom Containers and Data Structures

Static Array

Dynamic Array

Red Black Tree

Red Black Tree is a Balanced Binary Search Tree that guarantees Searching, Insertions, and Deletions in O(log(n)) Time.

I built the Red Black Tree using a Root Node and a Nil Node.

A Node contains a Pointer to the Parent, Left, and Right Nodes. It also contains information about whether is a Black Node (or Red) and whether it is a Nil Node.

Currently, the Tree has a Pointer to the Root and Nil Node and a Predicate function for Comparisons.

Searching is similar to a Binary Search Tree.

Inserting a node is similar to inserting a node in a Binary Search Tree, but at the end, we fix insertions based on where the Node is inserted.

Insertion fixes are based on 4 cases.

Fixes can shift up the tree, so we need to keep running for these cases until we reach an optimal condition.

Deletion has 2 steps

When Node to removed has 2 Nil children
When Node to removed has 1 Nil and 1 non-Nil Child
When Node to removed has 2 non-Nil Children

ImGui

Layer System

AA Engine uses Layers to determine the order of various things like what needs to be drawn first/on top, and an order to Handle incoming Events. This gives the user an organized way to arrange things like Game Layers/ UI Layers, etc.

A Layer stack has Layers, and a Layer provides functionality for 4 things. 

Event System

AA Engine handles events using a base and derived event-type classes and an event handler that calls a function when an event needs to be handled.

The Events are categorized into 

Logging

Input

Project Setup

Abstractions

 Custom Smart Pointers

Unique Pointer

Shared Pointer and Weak Pointer

Currently not supported.

Profiling