Skip to content

Burned-Games/Coffee-Engine

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coffee Engine

Publish Documentation

Coffee Engine is a Beautiful and Cross-platform 3D Game Engine written in C++ using OpenGL and SDL3.

Important

This is a university project for learning how to make a 3D game engine.

Screenshots

Documentation

📚 Read the full documentation - Complete API reference, tutorials, and guides

he documentation includes:

  • Getting Started: Setup guides for different IDEs (CLion, Visual Studio, VS Code)
  • API Reference: Complete class documentation generated with Doxygen
  • Architecture: Core systems, rendering pipeline, and engine modules
  • Contributing: Code style guidelines and development setup

Getting Started

Any IDE or Text Editor that supports CMake Projects (and vcpkg) should work for developing the project.

Building

1. Clone the repository

git clone --recursive https://github.com/Brewing-Team/Coffee-Engine.git
cd Coffee-Engine

2. Compilation

Windows There are a lot of ways to do it. From installing all the necessary packages for building it (cmake, vcpkg, a compiler...), to using a IDE environment. My recomendation is to use an IDE environment if what you want is an straightforward way to compile the project.

Instructions to compile the project using an IDE

Visual Studio 2022
  1. Open the folder with Visual Studio 2022
  2. Enable vcpkg integration. More info at https://devblogs.microsoft.com/cppblog/vcpkg-is-now-included-with-visual-studio.
  3. Reconfigure the cmake project. If the output panel display something like running vcpkg install then you are ready to go to the next stage.
  4. Wait until all the dependencies are installed by vcpkg. Then select on the top play button the Coffee-Editor.exe and run it.
  5. Go to the "bin/Coffee-Engine/" folder
  6. Congratulations! You have built Coffee-Engine for the first time!
CLion
  1. Open the folder with CLion
  2. ...
Linux

1. Install vcpkg

Clone vcpkg
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
Run the bootstrap
./bootstrap-vcpkg.sh
Enable the vcpkg instance
./vcpkg integrate install

Sometimes this will not automatically add the VCPKG_ROOT environment variable!

2. Build

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j $(nproc) CoffeeEditor

3. Enjoy!

cd ../bin/CoffeeEditor/Release
./CoffeeEditor

Features

Architecture

  • CoffeeEngine Core Library: Modular engine architecture
  • CoffeeEditor: Full-featured game editor
  • Cross-Platform Support: Windows and Linux compatibility

Rendering

3D Rendering

  • Forward Rendering Pipeline: Modern Renderer3D implementation
  • PBR Materials: Physically-based rendering workflow
  • Shader Materials: Custom shader support
  • Textures: Complete texture loading and management
  • Skybox: HDR environment mapping
  • HDR Rendering: High dynamic range pipeline

Post-Processing

  • FXAA: Fast approximate anti-aliasing
  • Bloom: Physically Based Bloom
  • Fog: Atmospheric depth rendering
  • Tone Mapping: AgX tone mapping for cinematic color

Lighting & Shadows

  • Directional Lights: Sun-like lighting with shadows
  • Point Lights (Omni): 360-degree light sources
  • Spot Lights: Cone-based directional lighting
  • Directional Shadows: Real-time shadow mapping
  • Image-Based Lighting (IBL): Environment lighting
  • Frustum Culling: Octree-based optimization

2D Rendering

  • Renderer2D: Optimized 2D sprite rendering
  • 2D Batching: Automatic draw call optimization

Game Systems

Entity Component System (ECS)

  • EnTT Integration: High-performance entity management
  • Scene Tree: Hierarchical scene organization
  • Component System: Modular game object composition
  • Model Loading: 3D asset import and management

Animation System

  • 3D Skeletal Animation: Bone-based character animation
  • Animation Blending: Smooth state transitions
  • Partial Animation Blending: Layer-based body part animation

Prefab System

  • Reusable Templates: Component-based game object templates
  • Hierarchy Preservation: Parent-child relationships
  • Cross-Component References: Automatic reference integrity
  • Human-Readable Serialization: .prefab format with version control
  • Runtime Instantiation: Dynamic prefab spawning

Audio

  • Wwise Integration: Professional audio middleware
  • 3D Spatial Audio: Positional audio with distance attenuation
  • RTPCs: Real-time parameter controls
  • Audio Banks & Events: Organized audio asset management
  • Auxiliary Sends: Game-defined audio routing

Navigation

  • Pathfinding System: AI navigation with obstacle avoidance
  • Navmesh Generation: Automatic navigation mesh creation

Physics

  • Bullet Physics Integration: Industry-standard physics simulation
  • Rigid Body System: Static, dynamic, and kinematic bodies
  • Collision Detection: Enter/stay/exit events with manifolds
  • Multiple Collider Types: Box, Sphere, Capsule, Cylinder, Cone
  • Raycasting API: Single/multiple hit detection
  • Physics Debugging: Visual collision shapes and raycast debug

Scripting

  • Lua Integration: Sol2-powered C++/Lua interoperability
  • Advanced Bindings: Automatic type conversions and error handling
  • IntelliSense Support: Auto-generated stub files
  • Language-Agnostic Design: Extensible for additional languages
  • Entity Integration: Direct script binding to game objects

Development Tools

Resource Management

  • Asset Pipeline: Automatic import and processing
  • Resource Caching: Intelligent asset loading
  • Hot Reloading: Real-time asset updates

Editor Features

  • Scene Hierarchy: Visual scene graph management
  • Component Inspectors: Real-time property editing
  • Asset Browser: Resource management interface
  • Viewport: 3D scene visualization

Profiling & Debugging

  • Tracy Integration: Real-time performance profiling
  • Debug Rendering: Visual debugging systems
  • Console & Logging: Integrated debugging tools

Serialization & Persistence

  • Scene Serialization: Complete scene save/load system
  • Cereal Library: Robust versioned serialization

Acknowledgements

This project makes use of several open-source libraries and resources that have greatly contributed to its development. Special thanks to the creators and maintainers of the following:

  • spdlog: Fast C++ logging library.
  • SDL3: Cross-platform development library made by libsdl.org.
  • GLM: OpenGL Mathematics library for graphics software.
  • GLAD: Multi-language OpenGL loader-generator.
  • ImGui: Immediate Mode Graphical User Interface for C++.
  • stb_image: Image loading library.
  • assimp: Library to import various well-known 3D model formats.
  • EnTT: Fast and reliable entity-component system (ECS).
  • Tracy: Real-time, nanosecond resolution, remote telemetry, hybrid frame and sampling profiler.
  • LearnOpenGL: Comprehensive OpenGL tutorial and resource site.
  • Hazel: A small game engine developed by TheCherno as part of his game engine series.
  • Godot: An advanced, feature-packed, multi-platform 2D and 3D open-source game engine.
  • skypjack on software: Blog and resources on software development by skypjack.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A little game engine brewed for learning how to brew a game engine!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 95.7%
  • GLSL 2.7%
  • Lua 1.1%
  • Other 0.5%