Skip to content

AeonGames/AeonEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1,491 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AeonEngine

MS Visual C++ Build status MSYS Build status Linux Build status macOS Build status CodeFactor Patreon Ko-Fi

Aeon Games Flagship Game Engine

Aeon Games

Sponza Runtime Render on Vulkan

AeonEngine is a cross-platform, plugin-based 3D game engine written in C++. It supports multiple rendering backends, uses Protocol Buffers for asset serialization, and integrates with Blender for content creation workflows.

This is the 3rd iteration of the engine, the first one was started circa 1996 and was lost on a hard drive crash, the second one was started circa 2001 and still exists, but is a mess and a patchwork of collected ideas of 15 years of trying to keep up.

⚠️ THIS IS A WORK IN PROGRESS.


✨ Features

Rendering

  • Vulkan β€” Primary renderer with SPIR-V shader compilation via glslang. On macOS, Vulkan is provided through MoltenVK.
  • OpenGL 4.5 β€” Secondary renderer using core profile. Disabled on macOS (Apple does not support OpenGL 4.5).
  • Minimum common denominator design β€” All uniforms use Uniform Buffer Objects (UBOs) so the same shaders work identically across Vulkan, OpenGL, and potential future backends (DirectX, Metal).
  • Compute pipelines β€” A unified Pipeline asset can carry both graphics and multiple ordered compute stages. The Renderer interface exposes Dispatch and Barrier, and both backends support Shader Storage Buffer Objects (SSBOs) with SPIR-V reflection and transient storage-buffer memory pools. Skeletal meshes are skinned on the GPU in a compute pre-pass that writes posed vertices into a buffer the mesh is drawn from, removing skinning from the vertex shader.
  • Clustered Forward+ lighting β€” A compute-driven light culling pipeline bins lights into view-space clusters (cluster_build), culls them per cluster (light_cull, including a cone-vs-cluster test for spot lights), and packs a global light-index list via an atomic allocator. An optional depth pre-pass marks active clusters so only visible clusters are shaded. Per-frame lights are uploaded as an SSBO (cap 4096). A cluster light-count heatmap debug view is available.

Engine Subsystems

Subsystem Description
Scene Graph Hierarchical node-based scene management with component system
Math Vector2/3/4, Quaternion, Matrix3x3/4x4, Transform, AABB, Frustum, Plane
Lighting Point, spot, and directional lights with radius attenuation and cone falloff; per-pixel Blinn-Phong shading; clustered Forward+ light culling. Per-frame lights collected on the Scene and uploaded to the GPU.
Materials Phong material model (Kd, Ks, Shininess) with texture samplers; Ks/Shininess carried in the Material UBO
Skeletal Animation Bone hierarchies, keyframe animation, skeleton/animation resources; GPU compute skinning runs as a pre-pass that poses vertices into a buffer the mesh is then drawn from
Sound Audio via PortAudio with Ogg Vorbis decoding
Resource Cache Centralized resource loading with caching and factory pattern
GUI Overlay Optional in-engine GUI via AeonGUI (Cairo backend)

Components

  • Camera β€” First-person/third-person camera component
  • ModelComponent β€” Model rendering component (mesh + material + pipeline)
  • PointLight / SpotLight / DirectionalLight β€” Scene illumination with radius attenuation and spot-cone falloff
  • CharacterController β€” Movement/turn controller wired to the input system

Asset Pipeline

All game assets are serialized using Protocol Buffers, including meshes, materials, pipelines, skeletons, animations, scenes, and models.

Tools

  • aeontool β€” Command-line utility for asset conversion (binary ↔ text), packaging, base64 encoding, and pipeline compilation.
  • WorldEditor β€” Qt6-based GUI editor for scene and node hierarchy editing, component management, property inspection, and renderer selection.
  • Blender Addons β€” Export meshes, materials, skeletons, animations, models, collisions, images, and scenes directly from Blender to AeonEngine formats. The model exporter splits multi-material objects into one assembly per material slot, mapping each Blender Principled BSDF to the engine's Phong material.

Platforms

Platform Toolchains Notes
Windows MSVC (Visual Studio 2022+), MSYS2 (MinGW64, Clang64, UCRT64) Full support (Vulkan + OpenGL)
Linux GCC, Clang Full support (Vulkan + OpenGL)
macOS Apple Clang (via Homebrew) Vulkan only (via MoltenVK), no standalone application

πŸ“¦ Git LFS

This repository uses Git Large File Storage (LFS) to manage large binary asset files (meshes, base64-encoded resources, etc.). You must install and initialize Git LFS before cloning, otherwise these files will be checked out as small pointer files instead of actual data.

Quick Setup

  1. Install Git LFS (one-time per machine):

    • Windows (MSYS2): pacboy -S git-lfs:p
    • Arch Linux: pacman -S git-lfs
    • Ubuntu/Linux: sudo apt-get install git-lfs
    • macOS: brew install git-lfs
    • Windows (Git for Windows): Git LFS is bundled β€” no extra install needed.
  2. Initialize Git LFS (one-time per machine):

    git lfs install
  3. Clone the repository as usual β€” LFS files are downloaded automatically:

    git clone https://github.com/AeonGames/AeonEngine.git

If you already cloned without LFS, run git lfs pull inside the repository to download the LFS objects.

The tracked patterns are defined in .gitattributes and currently include *.msh and *.b64 files.


πŸš€ Building

The AeonEngine uses CMake and supports building on multiple platforms. Choose the method that best fits your environment.

πŸͺŸ Windows with MSYS2 MinGW

Visual Studio Code is not required to build, but is highly recommended for development. The project includes VS Code configuration templates for tasks, launch, and settings.

πŸ“¦ Install MSYS2

Go to MSYS2 and install MSYS2. Development targets 64-bit, so choose that if you are unsure.

πŸ“‹ Install Required Packages

Open an MSYS2 terminal and update all installed packages:

pacman -Syuu --noconfirm

You may need to close the terminal and run the command again until no more updates are reported.

Install general system tools:

pacman -S --needed --noconfirm git pactoys make

The pactoys package provides pacboy, which installs packages for specific toolchains. Pick a subplatform (mingw64, clang64, or ucrt64), open the corresponding terminal, and install the required packages:

pacboy -S --needed --noconfirm \
    toolchain:p \
    cmake:p \
    make:p \
    tools-git:p \
    vulkan:p \
    vulkan-devel:p \
    qt6:p \
    protobuf:p \
    zlib:p \
    libpng:p \
    glslang:p \
    portaudio:p \
    libogg:p \
    libvorbis:p \
    cairo:p \
    gtest:p

Repeat for each subplatform you want to target.

πŸ“₯ Clone and Build

git clone https://github.com/AeonGames/AeonEngine.git
cd AeonEngine
cmake -G "MSYS Makefiles" -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build

πŸ§ͺ Run Tests

cd build
ctest --output-on-failure

Edit with Visual Studio Code

Open the repository root folder in VS Code (File β†’ Open Folder). Go to View β†’ Terminal to get an integrated bash terminal where you can run build commands directly. Running executables from the debug environment uses GDB, supporting breakpoints and the Debug Console.

🐧 Ubuntu/Linux

πŸ“¦ Install Dependencies

sudo apt-get update
sudo apt-get install -y \
    build-essential \
    software-properties-common \
    gcc \
    g++ \
    llvm \
    clang \
    sed \
    python3 \
    tar \
    wget \
    cmake \
    autoconf \
    automake \
    libtool \
    curl \
    make \
    unzip \
    zlib1g-dev \
    libpng-dev \
    vim-common \
    git \
    portaudio19-dev \
    libogg-dev \
    libvorbis-dev \
    googletest \
    libglu1-mesa-dev \
    freeglut3-dev \
    mesa-common-dev \
    libcairo2-dev \
    libprotobuf-dev \
    protobuf-compiler \
    mesa-vulkan-drivers \
    libvulkan1 \
    libvulkan-dev \
    qt6-base-dev \
    qt6-tools-dev \
    qt6-tools-dev-tools \
    qt6-l10n-tools \
    libxkbcommon-dev \
    glslang-dev \
    glslang-tools \
    libglx-mesa0 \
    vulkan-validationlayers

πŸ“₯ Clone and Build

With GCC:

git clone https://github.com/AeonGames/AeonEngine.git
cd AeonEngine
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build

With Clang:

cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=cmake/clang-toolchain.cmake
cmake --build build

πŸ§ͺ Run Tests

cd build
ctest --output-on-failure

πŸͺŸ Windows with Visual Studio

Dependency management uses Microsoft's vcpkg. Requires Visual Studio 2022 or later.

Prerequisites

  1. vcpkg β€” Install via the Visual Studio Installer. The project includes a vcpkg.json manifest that automatically downloads and builds required packagesβ€”you just need to point CMake at the vcpkg.cmake toolchain file.
  2. Vulkan SDK β€” Download and install from LunarG.
  3. Git for Windows β€” Download and install from git-scm.com.

πŸ“₯ Clone and Build

Open a VS Developer Command Prompt or Developer PowerShell:

git clone https://github.com/AeonGames/AeonEngine.git
cd AeonEngine
cmake -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake -B build
cmake --build build --config Release

Or open the generated .sln file in Visual Studio and build from the IDE.

🍎 macOS

Note: OpenGL 4.5 is not supported on macOS. Only the Vulkan renderer (via MoltenVK) is available. The standalone application is also disabled on macOS.

🍺 Install Dependencies with Homebrew

Make sure Homebrew is installed, then:

brew update
brew install \
    cmake \
    make \
    protobuf \
    zlib \
    libpng \
    glslang \
    portaudio \
    libogg \
    libvorbis \
    cairo \
    googletest \
    qt6 \
    pkg-config \
    molten-vk

πŸ“₯ Clone and Build

git clone https://github.com/AeonGames/AeonEngine.git
cd AeonEngine
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build

πŸ§ͺ Run Tests

cd build
ctest --output-on-failure

βš™οΈ CMake Options

Option Default Description
BUILD_VULKAN_RENDERER ON Build the Vulkan renderer plugin
BUILD_OPENGL_RENDERER ON Build the OpenGL 4.5 renderer plugin (forced OFF on macOS)
BUILD_STANDALONE_APPLICATION ON Build the standalone application/viewer (forced OFF on macOS)
USE_AEONGUI OFF Enable AeonGUI library for in-engine GUI overlays
USE_CLANG_TIDY OFF Run clang-tidy static analysis during build (requires clang-tidy)
PROXY (empty) Proxy server URL for network downloads during build

Example β€” build with only the Vulkan renderer:

cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_OPENGL_RENDERER=OFF
cmake --build build

πŸ”§ Contributing

The CMake configuration installs a git pre-commit hook that formats code using astyle (C++), autopep8 (Python/Blender scripts), and cmake-format (CMake files). Install the formatters before creating commits:

python3 -m pip install autopep8 cmake-format

πŸ“ Project Structure

AeonEngine/
β”œβ”€β”€ application/     # Standalone game launcher/viewer
β”œβ”€β”€ assets/          # Bundled demo assets (Aerin model, Sponza scene)
β”œβ”€β”€ cmake/           # CMake modules, toolchain files, and templates
β”œβ”€β”€ engine/          # Core engine library
β”‚   β”œβ”€β”€ components/  #   Camera, ModelComponent, PointLight
β”‚   β”œβ”€β”€ core/        #   Scene, Node, Renderer, Pipeline, Material, Mesh, etc.
β”‚   β”œβ”€β”€ gui/         #   AeonGUI integration (optional)
β”‚   β”œβ”€β”€ images/      #   Image loaders (PNG)
β”‚   β”œβ”€β”€ math/        #   Vector, Matrix, Quaternion, Transform, AABB, Frustum
β”‚   β”œβ”€β”€ renderers/   #   Vulkan and OpenGL renderer plugins
β”‚   └── sound/       #   PortAudio + Ogg Vorbis audio
β”œβ”€β”€ game/            # Game data (scenes, shaders, materials, meshes, models)
β”œβ”€β”€ include/         # Public engine headers (aeongames/)
β”œβ”€β”€ proto/           # Protocol Buffer definitions for all asset types
β”œβ”€β”€ tests/           # GTest unit tests
β”œβ”€β”€ tools/
β”‚   β”œβ”€β”€ aeontool/    #   CLI asset conversion and packaging tool
β”‚   β”œβ”€β”€ blender/     #   Blender exporter addons
β”‚   └── worldeditor/ #   Qt6 scene editor GUI
└── vcpkg-port/      # Custom vcpkg port overlays

πŸ“œ License

Licensed under the Apache License, Version 2.0.

About

Aeon Games Flagship Game Engine

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors