A modern, cross-platform 3D game engine built with OpenGL, designed for Windows platform development. Lava provides a comprehensive set of tools and systems for creating interactive applications and games.
- Application Framework: Robust application lifecycle management with layer-based architecture
- Event System: Comprehensive event handling for window, input, and custom events
- Layer Stack: Flexible layer management system for organizing game logic and rendering
- Logging System: Integrated logging with multiple levels using spdlog
- Profiling Support: Built-in performance profiling capabilities
- OpenGL Renderer: Modern OpenGL-based rendering system
- 2D/3D Rendering: Support for both 2D sprites and 3D meshes
- Shader System: Flexible shader management and compilation
- Material System: Advanced material system with uniform data management
- Texture Support: Comprehensive texture loading and management
- Framebuffer System: Custom framebuffer support for post-processing effects
- Post-Processing: Built-in post-processing pipeline
- Entity Component System (ECS): Modern ECS architecture using EnTT
- Scene Graph: Hierarchical scene management
- Component System: Rich set of built-in components:
- Transform Component
- Renderable Component
- Camera Component
- Light Source Component
- Material Component
- Static Mesh Component
- Spring Arm Component
- And more...
- Multiple Camera Types: Orthographic and perspective cameras
- Camera Controllers: Built-in camera controllers for easy navigation
- Scene Camera: Specialized camera system for scene editing
- Cross-platform Input: Unified input handling across platforms
- Keyboard & Mouse: Complete keyboard and mouse input support
- Custom Key Codes: Engine-specific key code definitions
- Volcano Editor: Built-in scene editor application
- Scene Hierarchy Panel: Visual scene management interface
- ImGui Integration: Immediate mode GUI for debug interfaces and tools
- Texture Loading: Support for various image formats via stb_image
- 3D Model Loading: 3D model support through Assimp integration
- Shader Loading: Dynamic shader compilation and hot-reloading
Lava follows a modular architecture with clear separation of concerns:
Lava/
├── Core/ # Application framework, events, layers
├── Renderer/ # Rendering pipeline and graphics API
├── Scene/ # Scene management and ECS
├── Component/ # ECS components
├── ImGui/ # GUI integration
├── Events/ # Event system
├── Material/ # Material and shader system
├── Mesh/ # 3D mesh handling
└── Platform/ # Platform-specific implementations
- Visual Studio 2019 or later
- Windows 10/11
- Python (for build scripts)
-
Clone the repository:
git clone <repository-url> cd Lava
-
Generate project files:
GenerateProject.bat
-
Open
Lava.slnin Visual Studio -
Build the solution (Ctrl+Shift+B)
- Create a new class that inherits from
Lava::Application:
#include <Lava.h>
#include <LavaEntryPoint.h>
class MyGameApp : public Lava::Application
{
public:
MyGameApp() = default;
~MyGameApp() override = default;
private:
void OnBegin() override
{
Application::OnBegin();
// Initialize your game layers here
Push(new MyGameLayer());
}
};
namespace Lava
{
void RegisterApplication()
{
Application::Register<MyGameApp>();
}
}- Create game layers by inheriting from
Lava::Layer:
class MyGameLayer : public Lava::Layer
{
public:
MyGameLayer() : Layer("MyGame") {}
void OnAttach() override
{
// Initialize resources
}
void OnUpdate(Lava::Timestep ts) override
{
// Update game logic
}
void OnEvent(Lava::Event* event) override
{
// Handle events
}
void OnGuiRender() override
{
// Render GUI
}
};// Initialize renderer
Lava::RenderCommand::Init();
// Create and bind vertex array
auto vertexArray = Lava::VertexArray::Create();
// Create shader
auto shader = Lava::Shader::Create("assets/shaders/Basic.vert",
"assets/shaders/Basic.frag");
// Render
Lava::RenderCommand::Clear();
Lava::Renderer::BeginScene(camera);
Lava::Renderer::Submit(shader, vertexArray);
Lava::Renderer::EndScene();// Create a new scene
auto scene = Lava::Scene::Create();
// Create an entity
auto entity = scene->CreateEntity("MyEntity");
// Add components
entity.AddComponent<Lava::TransformComponent>();
entity.AddComponent<Lava::RenderableComponent>();
entity.AddComponent<Lava::MaterialComponent>();
// Get components
auto& transform = entity.GetComponent<Lava::TransformComponent>();
transform.Translation = { 1.0f, 2.0f, 3.0f };- Lava/: Core engine library
- src/Lava/: Engine source code
- Core/: Application framework and utilities
- Renderer/: Rendering system and OpenGL abstraction
- Scene/: Scene management and ECS
- Component/: Built-in component types
- Events/: Event system implementation
- ImGui/: Dear ImGui integration
- src/Lava/: Engine source code
- Sandbox/: Example sandbox application for testing
- Volcano/: Scene editor application
- vendor/: Third-party dependencies
- assets/: Shaders, textures, and other resources
- GLFW: Window management and input handling
- GLAD: OpenGL function loader
- ImGui: Immediate mode GUI framework
- GLM: OpenGL Mathematics library
- spdlog: Fast C++ logging library
- stb_image: Image loading library
- EnTT: Entity Component System library
- Assimp: 3D model loading library
The built-in scene editor provides:
- Scene hierarchy management
- Component editing interface
- Real-time rendering preview
- Asset management tools
- Material and shader editing
Run the editor:
# After building
cd bin/Debug-windows-x86_64/Volcano
./Volcano.exeA playground application for testing engine features and experimenting with new functionality.
# After building
cd bin/Debug-windows-x86_64/Sandbox
./Sandbox.exeLava includes a sophisticated material system that allows you to:
- Define custom shaders with uniform parameters
- Create reusable material templates
- Balance flexibility and performance
- Hot-reload shaders during development
See docs/Material System.md for detailed documentation.
- Debug: Full debugging symbols, assertions enabled
- Release: Optimized build with some debugging info
- Dist: Distribution build, fully optimized
Lava includes built-in profiling support. Profile data is saved to:
Debug/Profile/
├── StartUp.json
├── Running.json
└── Shutdown.json
Additional documentation can be found in the docs/ folder:
- Material System overview and usage
- Component system guides
- Rendering pipeline documentation
- Performance optimization tips
Create your own components by following the ECS pattern:
struct MyCustomComponent
{
float value = 0.0f;
std::string name;
MyCustomComponent() = default;
MyCustomComponent(float v, const std::string& n)
: value(v), name(n) {}
};Place your shaders in the assets directory:
assets/
└── shaders/
├── MyShader.vert
└── MyShader.frag
Implement custom post-processing effects using the framebuffer system.
- ✅ Similar: Component-based architecture, Scene management
- ❌ Missing: Visual scripting, Asset pipeline, Cross-platform deployment, Physics engine, Audio system
- ❌ Missing: Advanced lighting (Global Illumination, Light probes), Animation system, Particle systems
- ✅ Similar: C++ foundation, Material system concept
- ❌ Missing: Blueprint visual scripting, Advanced rendering (PBR, Ray tracing), Physics (Chaos), Networking
- ❌ Missing: World composition, Landscape tools, AI framework, VR/AR support
- ✅ Similar: Open source, Scene system, Node-based architecture
- ❌ Missing: GDScript/C# scripting, Built-in physics, Animation tools, Cross-platform export
- ❌ Missing: Mobile deployment, Web deployment, Console support
- ✅ Educational value: Clear, readable codebase
- ✅ Lightweight: Minimal dependencies, fast compilation
- ✅ Customizable: Full source control, no licensing restrictions
- ✅ Modern C++: Good architecture patterns, smart pointers
- ✅ AI/ML Focus: Cutting-edge experimental animation and AIGC integration
-
Custom ECS System
- Replace EnTT with custom ECS implementation
- Component serialization/deserialization
- ECS performance optimization for AI workloads
- Multi-threaded component updates
-
Rendering Engine Integration
- OGRE 3D integration as rendering backend
- OGRE scene graph adaptation to Lava ECS
- Material system bridge between Lava and OGRE
- Performance profiling and optimization
-
Asset Pipeline Integration
- Enhanced Assimp integration for complex models
- Animation data import from FBX, GLTF
- Texture and material import optimization
- Asset hot-reloading system
-
UI System Integration
- RayGUI integration for game UI
- ImGui enhancement for editor tools
- UI component system for ECS
- Cross-platform UI rendering
-
Neural Network Infrastructure
- TensorFlow Lite C++ integration
- ONNX Runtime integration for model inference
- GPU acceleration with CUDA/OpenCL
- Memory-efficient neural network execution
-
PFNN (Phase-Functioned Neural Network) Implementation
- PFNN architecture implementation
- Locomotion synthesis system
- Real-time character control integration
- Terrain adaptation algorithms
- Performance optimization for real-time usage
-
DeepMimic Integration
- Motion capture data processing pipeline
- Physics-based character simulation
- Reinforcement learning integration
- Real-time motion synthesis
- Character behavior adaptation system
-
Animation Data Management
- Motion capture data format support (BVH, FBX)
- Animation compression algorithms
- Temporal data interpolation
- Animation blending with neural networks
-
Procedural Content Generation
- Neural terrain generation
- AI-driven texture synthesis
- Procedural animation generation
- Level design assistance tools
-
Language Model Integration
- LLM integration for dialogue generation
- Code generation assistance in editor
- Natural language to animation conversion
- AI-assisted asset creation
-
Computer Vision Integration
- Motion capture from video input
- Real-time pose estimation
- Facial animation from video
- Style transfer for textures and materials
-
Generative Models
- GAN integration for texture generation
- Variational autoencoders for animation
- Diffusion models for asset creation
- Neural style transfer
-
Advanced Character AI
- Behavior tree integration with neural networks
- Emotional state modeling
- Adaptive character personalities
- Multi-agent coordination systems
-
Performance Optimization
- Neural network quantization
- Model pruning and compression
- GPU memory optimization
- Real-time inference optimization
-
AI Training Pipeline
- In-engine training data collection
- Distributed training system
- Transfer learning frameworks
- Automated hyperparameter tuning
-
Research Integration
- Latest ML research paper implementations
- Experimental animation techniques
- Novel neural architectures
- Academic collaboration tools
- Month 1: Custom ECS system + OGRE integration planning
- Month 2: OGRE rendering backend + Assimp enhancement
- Month 3: RayGUI integration + Asset pipeline completion
- Month 4: Neural network infrastructure + TensorFlow Lite setup
- Month 5: PFNN implementation + locomotion synthesis
- Month 6: DeepMimic integration + physics-based animation
- Month 7: Procedural content generation + LLM integration
- Month 8: Computer vision features + motion capture
- Month 9: Generative models + style transfer
- Month 10: Advanced character AI + behavior modeling
- Month 11: Performance optimization + model compression
- Month 12: Research integration + academic features
- TensorFlow Lite: Lightweight inference engine
- ONNX Runtime: Cross-platform ML inference
- PyTorch C++: Research and experimentation
- OpenCV: Computer vision tasks
- Eigen: Linear algebra operations
- Bullet Physics: Physics simulation for DeepMimic
- Motion capture libraries: BVH, FBX parsing
- Interpolation algorithms: Spline, neural interpolation
- Character rigging: Bone hierarchy management
- OGRE 3D: Primary rendering engine
- OGRE Terrain: Procedural terrain rendering
- OGRE Particles: Particle system integration
- Custom shaders: Neural network-driven effects
- Real-time PFNN inference at 60fps for 10+ characters
- DeepMimic training convergence within 24 hours
- Neural texture generation in under 5 seconds
- Motion capture to animation pipeline under 1 second latency
- Complete PFNN locomotion system
- Working DeepMimic implementation
- AI content generation tools
- Academic research integration framework
- Publish research papers on novel techniques
- Open-source AI animation datasets
- Collaboration with academic institutions
- Industry partnerships for validation
- ML Framework: TensorFlow Lite vs ONNX Runtime vs PyTorch C++
- Physics Engine: Bullet Physics vs custom implementation for DeepMimic
- ECS Architecture: Performance vs flexibility trade-offs
- GPU Acceleration: CUDA vs OpenCL vs vendor-agnostic
- Motion Capture Data: Acquisition and licensing
- Training Datasets: Character animation, terrain, textures
- Computational Resources: GPU clusters for training
- Academic Partnerships: Research collaboration agreements
- 1 ML Engineer: Neural network architecture and training
- 1 Animation Researcher: PFNN and DeepMimic expertise
- 1 Computer Vision Specialist: Motion capture and CV integration
- 1 Core Engine Developer: ECS and third-party integration
- 1 Graphics Programmer: OGRE integration and optimization
- High-end GPUs: RTX 4090 or similar for training
- Motion capture equipment: Cameras, suits, markers
- Compute cluster access: For large-scale training
- Large storage: Animation datasets and trained models
- Neural Motion Fields: Continuous motion representation
- Adversarial Motion Generation: GAN-based animation
- Physics-Informed Neural Networks: Realistic motion synthesis
- Transformer-based Animation: Attention mechanisms for motion
- Procedural Narrative Generation: AI storytelling
- Dynamic Difficulty Adjustment: ML-based game balancing
- Player Behavior Prediction: Adaptive game experiences
- Real-time Asset Generation: On-demand content creation
- Universities: Animation and ML research labs
- Game Studios: Industrial validation and feedback
- ML Conferences: SIGGRAPH, NeurIPS, ICML presentations
- Open Source Community: Collaborative development
- Technical Blog: Development progress and insights
- Research Papers: Novel techniques and results
- Open Datasets: Community-contributed animation data
- Educational Content: Tutorials and workshops
Note: This engine is primarily designed for educational purposes and Windows development. While the architecture supports cross-platform development, additional work may be required for full cross-platform compatibility.