-
Notifications
You must be signed in to change notification settings - Fork 0
Home
A high-performance Vulkan-based game engine featuring a sophisticated Entity-Component-System (ECS) architecture, physically-based rendering (PBR), deferred shading, and advanced post-processing effects.
- Custom ECS Implementation - Cache-coherent entity management with template metaprogramming
- Slotmap Data Structure - Generational indices for safe, efficient component storage
- Compile-time Type Safety - Template-driven component system with zero runtime overhead
- Vulkan Renderer - Modern graphics API with deferred rendering and SSAO
- Modular Architecture - Clean separation between engine systems and game logic
- Usage Guide - Practical examples and best practices for using the ECS
- Entity-Component-System - Architecture overview and entity management
- Component System - Component storage, registration, and lifecycle
- Slotmap Implementation - Deep dive into the generational index data structure
- Template Metaprogramming - Typelist utilities and compile-time type manipulation
graph TB
subgraph "Game Layer"
Game[Game Code]
Systems[Game Systems]
end
subgraph "ECS Core"
EM[EntityManager]
Entity[Entity]
CS[ComponentStorage]
end
subgraph "Data Structures"
SM1[Slotmap<PhysicsComponent>]
SM2[Slotmap<RenderComponent>]
SM3[Slotmap<LightComponent>]
Singleton[Singleton Components]
end
subgraph "Template Layer"
TL[Typelist]
Traits[Component Traits]
Meta[Metaprogramming Utils]
end
Game --> EM
Systems --> EM
EM --> Entity
EM --> CS
Entity --> CS
CS --> SM1
CS --> SM2
CS --> SM3
CS --> Singleton
CS -.compile-time.-> TL
CS -.compile-time.-> Traits
Traits -.compile-time.-> Meta
TL -.compile-time.-> Meta
style Game fill:#e1f5ff
style Systems fill:#e1f5ff
style EM fill:#ffe1e1
style Entity fill:#ffe1e1
style CS fill:#ffe1e1
style TL fill:#fff4e1
style Traits fill:#fff4e1
style Meta fill:#fff4e1
An architectural pattern that separates data (Components) from behavior (Systems) and identity (Entities). This engine uses a custom implementation optimized for cache coherency and type safety.
A cache-friendly container that provides stable handles (generational indices) to stored data. It combines the benefits of sparse sets and packed arrays for O(1) insertion, deletion, and lookup.
Compile-time code generation using C++ templates. The engine leverages typelists, type traits, and template transformations to build type-safe, zero-overhead abstractions.
// Define your component types
using Components = ADE::META_TYPES::Typelist<
PhysicsComponent,
RenderComponent,
LightComponent
>;
using SingletonComponents = ADE::META_TYPES::Typelist<
CameraComponent
>;
// Create entity manager
using EntityManager = ADE::EntityManager<Components, SingletonComponents, Tags, 1024>;
EntityManager entity_manager;
// Create entity with components
auto& entity = entity_manager.create_entity();
entity_manager.add_component<PhysicsComponent>(entity, 0.0f, 0.0f, 0.0f);
entity_manager.add_component<RenderComponent>(entity, /* ... */);
// Iterate over entities with specific components
entity_manager.foreach<
META_TYPES::Typelist<PhysicsComponent, RenderComponent>,
META_TYPES::Typelist<>
>([](Entity& entity, PhysicsComponent& physics, RenderComponent& render) {
// Process entities with both physics and render components
});- Start with Entity-Component-System to understand the overall architecture
- Read Slotmap Implementation to learn how components are stored efficiently
- Explore Template Metaprogramming to understand the compile-time magic
- Review Component System for component management details
- Reference Usage Guide for practical patterns and examples
- C++20 compiler (GCC 10+, Clang 11+, MSVC 2019+)
- CMake 3.10 or later
- Vulkan SDK 1.4.328.1 or later
| Operation | Time Complexity | Cache Performance |
|---|---|---|
| Entity Creation | O(1) | Excellent |
| Component Addition | O(1) | Excellent |
| Component Lookup | O(1) | Excellent |
| Component Iteration | O(n) | Excellent (packed array) |
| Entity Deletion | O(1) | Good |
When extending the engine:
- Add new components to the appropriate typelist in
game/types.hpp - Follow the existing component structure patterns
- Ensure components are POD-like for optimal performance
- Update this documentation for any architectural changes
GNU GPLv3
Next Steps: Begin with the Entity-Component-System documentation to understand the core architecture.