AGE

AGE – Another Game Engine


Overview

Goals

  • Primary Goal: To create an easy to use 3D game engine with Audio, GLSL support,Dear ImGUI, and C# Scripting support.
  • Secondary Goal: To create a self-consistent, extensible API for AGE.

Language

Main: Java

Scripting: C#

Libraries

LWJGL2


Minimum Viable Product (v 1.0)

Rendering: Rendering Some Perspective Correct Geometry, with Diffuse Lighting.

Audio: Playback a .Wav file on command.

Scripting: Basic c# Scripting

Version 0.1 Plan

Plan Overview

Primary Goal: Open A Window, Setup a OpenGL Context, and Render a Quad, and respond to window resizing events.

Secondary Goal: Research Good, long-term coding practices for the success of AGE

Design

(Fig 1. V1.0 Design)

Notes

  • LWJGL2 Has OpenGL functions spread across all the GLvv (where vv is the version number), so for convenience the functions will be wrapped up in the OpenGL static class.
  • Since we are using Java, might it make more sense to use java as the scripting language, or at least have it as an option?

(Fig. 2 – Drawing A Triangle)

(Fig. 3 – Sandbox Source Code v0.1)

Code Overview


DisplayManager.Create(1080, 720, "Hello"); //Opens A Window with dimensions 1080 x 720, and a title of 'Hello'. Vsync Is on by default.
        float[] positions = { //Setup Vertex Positions in Indentity Space (-1 - +1)
                 0, 1,0,
                 1,-1,0,
                -1,-1,0
        };

        int[] triangles = {0,1,2}; //Setup Triangles
        Mesh mesh = new Mesh(positions, triangles); //Create a new mesh using the previous vertex positions and triangles
        while(DisplayManager.IsActive()) { //Whilst The window hasn't been closed...
            Renderer.Clear(Color.red); //Set the background color / clear the screen to Red (255,0,0)
            Renderer.Draw(mesh); //Draw the mesh
            DisplayManager.Update(); //Update the window and input System
        }
        DisplayManager.Destroy(); //Close The Window