CENTRAL 3D

Initial steps into game engine development

CENTRAL 3D

Image

Expanding CENTRAL 3D

  1. Having fun, learning.
  2. Preparing stuff for Project 3 subject in CITM Barcelona (2020).

Overview

Latest version

Background Music

End of subject

Background Music

By AitorSimona

SPECIAL THANKS / REFERENCES

Unity

EduGameEngine by Ric (Teacher)

ThorEngine by Marc (Teacher)

NekoEngine by Sandra & Guillem (Students 4rth - Terrassa)

And all the 3rd party libraries too! Check them below!

Core subsystems

The engine’s pillars…

Game Objects (ECS)

Based on an Entity-component system, each game object is a unique entity, and has a number of components attached to it. The available component as of 0.3 are: Transform(fixed), Material, Renderer, Mesh, Camera. All inherit from Component base class.

Every game object has a parent, and a number n of childs. This turns into a tree structure (Unity).

Resource Manager

In charge of the resources, which are: Material, texture, shader, mesh, scene, prefab and folder.

Handles reference counting, every resource is only in memory once and can be used by any number of game object components.

Resource management flow:

The user does not have to handle any library file, everything is done by the engine. For a user all there is are the files he/she dropped in assets, in the original format provided.

Resource Hot-Reloading

All except model are reloaded if a change is detected in the original file, no need to reopen the engine! This is done through a Windows file system watch, that notifies the engine when a change is detected in the Assets folder. The engine then scans all folders inside assets and checks for new resources, overwrites, deletes. It eliminates any orphan metas automatically.

Gui

Courtesy of Dear Imgui, the gui has been worked on to be as modular and scalable as possible. All panels inherit from a base panel class and are handled by the GUI module. Adding/modifying panels is very straightforward.

Shader Subsystem

For the third assignment, the original OpenGL rendering pipeline was replaced by the shader pipeline. Also introducing the scene in a framebuffer meant that a lot of systems had to be adjusted. All rendering had to use shaders.

There is a Shader class, which is a resource and works the same way as other resources.

Shader management

  1. Create a shader in the panel project (Right Click - Create - Shader)

  2. Double click its icon (it will open the file with the default program assigned)

You have just created your own shader!

I recommend setting Visual Studio as default program, and downloading a glsl extension that provides syntax highlighting, autocompletion…

Uniform editing

You can edit all int, float, and vec up to vec4 uniforms through the inspector! Head to the material node, select a shader and edit the uniforms there. Changes are applied automatically. Note that these uniforms are held by the material, so all objects with the same material will share the uniforms.

Binary program

The engine will save the program in binary format. Once booting the engine again it will try to load the binary, if unsuccessful it will recompile the shaders.

Other Features

Time Management Octree and Frustum Culling Scene Serialization and de-Serialization Importers (Scene, Mesh, Texture(module), Material and Shader) Mouse Picking, Guizmo Scene is rendered to a framebuffer and displayed as texture in panelScene FileSystem through PhysFS (also using stl’s fstream)

How to use

There is no formal installation process, just look around and play with it

Mouse and Keyboard controls are enabled both on UI and Scene, working on focused window only.

Self-explainable, click on an object to select it, notice how inspector info changes, but if the object is hidden in the hierarchy you won’t notice it there, open parent to see how it is selected.

Editor camera only works when in AppState EDITOR mode.

Innovation (during engine’s subject)

Tools used