A game engine is a game development tool that takes care of all rendering and complex mathematical computations. It frees the game developer from setting up the communication with the GPU, implementing various algorithms and computing numerical integrations.

A game engine consists of three smaller engines:

  • Math Engine
  • Rendering Engine
  • Physics Engine
  • Collision Detection System

The interaction between these engines allows a character to move, jump, collide, etc. It also allows a game scene to produce shadows or a scenery.


Math Engine

A Math Engine is responsible for all Linear Algebra computations, such as Space Transformations. For example, whenever a game entity rotates on a screen, a math engine computes the space transformation using Matrices operations.

Rendering Engine

The Rendering Engine, U4DEngine::U4DRenderManager, is responsible for interacting with the GPU and manages all Shaders (GPU programs) accountable for rendering 3D models and various graphics effects, such as shadows, lighting and particle systems.


Physics Engine

The Physics Engine, U4DEngine::U4DPhysicsEngine, is responsible for solving the equation of motion and for detecting collisions. You can think of a physics engine as a continuous loop. It starts off by simulating an external force such as gravity. At each new time step, it detects any collisions, then calculates the velocity and position of an object. And finally, sends the location data to the GPU. This continuous loop creates the illusion that an object is falling due to gravity.


Collision Detection System

The Collision-Detection System, U4DEngine::U4DCollisionDetection, is responsible for detecting collision among Convex objects. It works together with the physics engine to compute the resultant collision velocities of entities. For example, when two cubes collide and bounce, the Collision-Detection System and the Physics Engine work together to create the illusion of a collision.

To speed up Collision-Detection, the Untold Engine divides the Collision-Detection into different phases as shown below:

  1. The scene's space is parse and a tree-like structure known as a Boundary Volume Hierarchy Tree is computed
  2. Entities most likely to collide are sent to the Broad-Phase Stage
  3. Entities that pass the Broad-Phase stage, are sent to the Narrow-Phase stage

Components of the Untold Engine