Horizon Engine
A modern C++20 game engine built for FPS games, featuring an Entity-Component-System architecture, PBR rendering pipeline, and action-based input system.
Iโm learning OpenGL, so this is a work in progress. Planning to migrate (or from zero)to Vulkan in the future. Iโm using this project to learn and experiment with new technologies. Strictly keeping up with learnopengl.com
Features
Core Systems
- Entity-Component-System (ECS) - Data-oriented architecture for high performance
- Physics Integration - Rigid body dynamics using Jolt Physics
- Audio System - 3D spatial audio using miniaudio
- Action-Based Input - Abstract input mapping for keyboard, mouse, and gamepad
- Fixed-Timestep Game Loop - Deterministic physics at 60 Hz
- *โฆ
Horizon Engine
A modern C++20 game engine built for FPS games, featuring an Entity-Component-System architecture, PBR rendering pipeline, and action-based input system.
Iโm learning OpenGL, so this is a work in progress. Planning to migrate (or from zero)to Vulkan in the future. Iโm using this project to learn and experiment with new technologies. Strictly keeping up with learnopengl.com
Features
Core Systems
- Entity-Component-System (ECS) - Data-oriented architecture for high performance
- Physics Integration - Rigid body dynamics using Jolt Physics
- Audio System - 3D spatial audio using miniaudio
- Action-Based Input - Abstract input mapping for keyboard, mouse, and gamepad
- Fixed-Timestep Game Loop - Deterministic physics at 60 Hz
- Memory Arena Allocator - Efficient memory management with
std::pmr
Rendering
- OpenGL 4.1 PBR Renderer - Cross-platform graphics (macOS, Windows, Linux)
- Material System - First-class PBR materials with texture handles
- GLTF Model Loading - Full 3D model support via tinygltf
- HDR Pipeline - Bloom, tone mapping, exposure control
- SSAO - Screen-space ambient occlusion
- Shadow Mapping - Directional light shadows
- HDRI Skybox - Equirectangular environment maps
Tools & Editor
- Scene Serialization - JSON-based scene save/load (F5/F6)
- In-Game Editor - Entity hierarchy, material inspector, scene settings
- Debug Overlay - FPS, frame time, entity count (F3)
- ImGui Interface - Full debug tooling
Asset Management
- Handle-Based Registry - Textures, Models, Materials, Sounds
- Automatic Caching - Prevents duplicate asset loads
- Hot Reload Ready - Asset reloading infrastructure
Quick Start
Prerequisites
- CMake 3.21+
- C++20 compiler (Clang 14+, GCC 11+, MSVC 2022+)
- Git
Build
# Clone
git clone https://github.com/jackthepunished/horizon-engine.git
cd horizon-engine
# Configure & Build
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel
# Run
./build/bin/horizon_game
Controls
| Key | Action |
|---|---|
W/A/S/D | Move |
Mouse | Look around |
Shift | Sprint |
Space | Jump/Up |
Ctrl | Crouch/Down |
Tab | Toggle cursor |
F3 | Debug overlay |
F5 | Save scene |
F6 | Load scene |
Esc | Quit/Menu |
Architecture
horizon-engine/
โโโ engine/ # Core engine library
โ โโโ assets/ # Textures, Models, Materials, Cubemaps
โ โโโ audio/ # Spatial audio system
โ โโโ core/ # Logging, memory, game loop
โ โโโ ecs/ # Entity-Component-System
โ โโโ physics/ # Jolt Physics integration
โ โโโ platform/ # Window, input abstraction
โ โโโ renderer/ # OpenGL renderer, shaders, framebuffers
โ โโโ scene/ # Components, serialization
โ โโโ ui/ # ImGui integration
โโโ game/ # Sample FPS game
โ โโโ src/ # Main loop, editor UI
โโโ assets/ # Shaders, textures, models
โโโ tests/ # Unit tests (Catch2)
โโโ third_party/ # External dependencies
Dependencies
All dependencies are fetched automatically via CMake FetchContent:
| Library | Version | Purpose |
|---|---|---|
| GLFW | 3.4 | Windowing & Input |
| GLM | 1.0.1 | Math Library |
| spdlog | 1.14.1 | Logging |
| Catch2 | 3.5.2 | Testing |
| Jolt | 5.0.0 | Physics Engine |
| miniaudio | 0.11.21 | Audio Engine |
| Dear ImGui | 1.90.4 | UI Library |
| stb_image | master | Image Loading |
| tinyobjloader | 2.0.0 | OBJ Model Loading |
| tinygltf | 2.8.x | GLTF Model Loading |
| nlohmann/json | 3.11.x | JSON Parsing |
Testing
cd build && ctest --output-on-failure
100% tests passed, 0 tests failed out of 7
Roadmap
-
Milestone 0: Repository & Build System
-
Milestone 1: Core Systems (ECS, Input, Game Loop)
-
Milestone 2: OpenGL Rendering (Shaders, Meshes, Camera)
-
Milestone 3: Assets & Hot Reload
-
Milestone 4: Physics (Jolt Integration)
-
Milestone 5: Audio, AI, UI (Dear ImGui)
-
Milestone 6: PBR Rendering, Materials, GLTF Loading
-
Milestone 7: Skeletal Animation & Advanced Lighting
-
Bone hierarchy & animation clips
-
GPU skinning
-
IBL (irradiance, prefiltered environment maps)
-
Cascaded Shadow Maps
-
Milestone 8: Render Architecture & Optimization
-
Render pass system (Geometry, Shadow, Lighting, Post)
-
Frustum culling & instanced rendering
-
GLTF material extraction
-
Milestone 9: Networking & Multiplayer (optional)
License
MIT License - see LICENSE for details.