Skip to content

Sigmarik/graphics-engine

Repository files navigation

Yet Another GameDev Framework

screenshot.png

Description

This project is a robust game development framework built with modularity and modifiability in mind.

Its features include, but not limited to:

Work-in-progress features:

An overview of the project's systems with links to relevant pieces of documentation can be found here.

Detailed code documentation of the project's systems can be generated with the $ make doxy command (make sure you have doxygen installed). Examining the code of the template project can also help.

Many features were documented in the corresponding pull requests, so it is a good idea to look at one of these if you want to learn more about certain features of the project.

I am a recruiter. What should I see?

Here is a list of the most interesting parts of the project:

  • The asset system (code). It streamlines the process of asset loading and provides tools for defining custom asset formats.
<material>
    <shader path="assets/shaders/colored_albedo.shader.xml"/>

    <texture var="albedo" path="assets/textures/noisy.png"/>
    <vec3 var="color" r="1.0" g="0.5" b="0.1"/>
</material>
@Door::state <- @Lever.pushed and (@Thermometer.temperature > 15.7 or [@Button.pusher.name] == "Garry")

A list of curious code examples:

auto constructor = Match<lexemes::Or, lexemes::And>::
                   To<Script::Node, nodes::LogicalOr, nodes::LogicalAnd>::
                   From<NodePtr, NodePtr>::constructor(ptr);

if (!constructor) return;

Script::Node* node = constructor->operator()(alpha, beta);
  • SceneComponent - the root class for all components, which handles abstract event interfaces, component hierarchy and scene registration and synchronization,
  • TickManager - an overcomplicated solution to refresh rate management and frame-independent physics,
  • WindowManager - a comprehensive singleton encapsulation of all window management logics (author: Nerfiti).

Requirements

The project was tested on Linux Mint 21.2 OS, yet it should be able to work on any other common linux distribution.

GNU Make

  1. Install GNU Make version 4.3 or above,
  2. Install assimp version 5.2 or above,
  3. Install the GLFW library (manually or by running $ make install-glfw),
  4. Run $ make.

After the build is complete, the executable and all the assets should be located in the build folder. The program can be ran either manually or with the $ make run command.

Screenshots and snippets

asset_preview

Preview of the table asset in Blender, ready to be either directly imported into the program, or used in a bigger scene. Blue boxes represent exportable colliders.

scene_preview

Preview of the entire pool table.

<material>
    <shader path="assets/shaders/basic.shader.xml"></shader>

    <texture uniform="albedo" path="assets/textures/green_field.png"></texture>
    <texture uniform="ao_map" path="assets/textures/field_ao.texture.xml"></texture>
</material>

Example of a material asset in the XML format. This particular material can be found here.

message = "Hello from the scripting world! See the level script to learn where this message came from!"

@SomeShouterComponent::shout <- message
@SomeShouterComponent::shout <- [@PlayerBall.knocked_down] ? "RESET!" : IMPOSSIBLE

Example of a high-level event routing script, written in a custom programming language. This particular script can be found here.