Skip to content
MrNex edited this page Jun 28, 2015 · 21 revisions

Welcome to the NGen Wiki!

Contents

What is it?

NGen is a next generation free & open source game engine licensed under the QPL written by MrNex. The NGen has both Windows & Linux support and a myriad of simple systems creating complex features giving massive flexibility to create any simulation you could imagine. The NGen is component based with an extremely flexible and adaptable design.

The Mission

The NGen was created with one thing in mind- having no limitations. It was developed to have Open Systems. Any underlying system or structure in the NGen can be interfaced with, altered, or even replaced with amazing ease. If you've ever been frustrated at a game engine not allowing you to make your own rules, this is the solution for you.

A few adventures I, MrNex, have taken with this software include:

  • I decided it would be cool if the Y axis of an objects local coordinate system were to slowly rotate around the X axis, skewing the object until it's model had fallen flat. That was pretty weird.

  • I thought it neat to take a pointer to the row of the Camera's transformation matrix which signifies the looking direction of the camera, and sent it to the physics manager as a global acceleration vector (With a magnitude of 9.81). That was fun!

  • I dared to take the rotation matrix of the camera & sent it to the fragment shader to transform the texture sample of the ground, and it was fucking awesome.

  • I manipulated the perspective matrix to make things get BIGGER as they got further away, and it turns out that was not such a good idea..

Common Functions

There are a few common functions which you will find reoccuring throughout the engine. We will call these the common 3. These common 3 functions are Allocate, Initialize, and Free. Although pretty self explanatory, let us go over them here & take the time to discuss the finer points of such common functions:

  • Allocate is the malloc of the engine.

    • It will always take no parameters & it will always return a pointer to the structure you are allocating.
    • All members of the struct will be garbage values upon allocation! Allocate does not initialize any members!
    • Everything which is allocated (and not initialized) must be manually freed using C's free function in stdlib.h!
    • It is dangerous to use a structures Free function unless the structure has been both Allocated and Initialized.
  • Initialize is the constructor of the engine.

Components

The NGen is divided into various sections:

  • Mathematics

  • Data Structures

  • Rendering

  • Collisions

  • Physics

  • GObjects

  • States

  • Implementation

  • Managers

  • Assets

  • Loaders