Jeslas Pravin fbde75de72 Add Funding
2025-12-26 16:34:05 +01:00
2025-12-26 16:34:05 +01:00
2025-12-23 22:45:40 +01:00
2025-12-26 16:34:05 +01:00
2025-12-23 22:45:40 +01:00
2025-12-23 22:45:40 +01:00
2025-12-23 22:45:40 +01:00
2025-12-23 22:45:40 +01:00
2025-12-23 22:45:40 +01:00
2025-12-23 22:45:40 +01:00
2025-12-23 22:45:40 +01:00
2025-12-23 22:45:40 +01:00
2025-12-23 22:45:40 +01:00
2025-12-26 16:34:05 +01:00
2025-12-23 22:45:40 +01:00

Cranberry Game Engine

CranberryLogo

Cranberry Game Engine is my Personal hobby game engine. I work on this as best as I could during my holidays.

The goal of the engine is to have a set of tools required to develop a game without too much dependencies. In the renderer side I aim to be as efficient as possible given the little time I invest in the engine. Physics will be optional for any game so I intend to keep the module and its integration into game objects as decoupled as possible. Audio will always be needed so that will be tightly integrated with other objects.

Join the discord server at https://discord.gg/2xfVG4QPt8 if you want to make some meaningful impact.

All of the engine code is written without using AI, if that matters at all. I am a single person right now working on this engine with very little time to spend in it while spending time with my family, so there are few places AI is used like to comment code, generate build scripts. However all such usage was heavily reviewed/modified to keep the quality high.

Requirement

  • Vulkan 1.3 supported hardware is required. Last time I checked the engine runs even on Intel 7th Gen GPU device/driver, I would like to keep it that way as long as possible.
  • Windows platform

Instructions

Best practices

Can be found at Best Practices

Contribution

If you are looking to contribute, try to pick a task or issue from Cranberry Project Right now there is no contributor guideline. Regular workflow of forking the engine and creating a merge/pull request with description is good enough. I will add guidelines as nice people starts contributing.

There are some points I would like to highlight

  1. Project is in early stage so if you contribute you will get opportunity to be a maintainer or lead of certain module as project grows. So now is the best time to contribute.
  2. If you are a student you have so much to gain by working on this project.
  3. Some features are over engineered and I am fine with it. So if you want to contribute it is okay to over engineer as long as the changes itself is self contained.

Getting started with first build

  • Install CMake from CMake
  • Install Visual Studio 2022/2026 from VisualStudio
  • Install Vulkan SDK from VulkanSDK. Necessary because I am using dxc built for SPIR-V.
  • Run GenerateProject.ps1 to generate Visual Studio solution. This will by default generate solution for Editor-DynamicLinked-VS2026 preset under Build_VS2026 folder

(or)

  • You can also run GenerateProject.ps1 with one of following presets(eg., GenerateProject.ps1 or GenerateProject.ps1 <preset> [Some Cmake arguments]..) Note that if using preset and not going to change library dependencies run SetupDeps.ps1 first(It will download archive with necessary libraries)
    • Editor-DynamicLinked-VS2026 preset creates command cmake -B Build_VS2026 -G "Visual Studio 18 2026" -A x64 -Thost=x64 -DCMAKE_INSTALL_PREFIX:STRING=${sourceDir}/Installed -DCranberry_STATIC_MODULES:BOOL=OFF
    • Runtime-DynamicLinked-VS2026 preset creates command cmake -B RuntimeBuild_VS2026 -G "Visual Studio 18 2026" -A x64 -Thost=x64 -DCMAKE_INSTALL_PREFIX:STRING=${sourceDir}/Installed -DCranberry_STATIC_MODULES:BOOL=OFF -DCranberry_EDITOR_BUILD:BOOL=OFF

Optional

  • In order to make use of precommit you have to install pre-commit from pre-commit webpage
pip install pre-commit

Graphics debugging

  • Validation layers in vulkan can be enabled in any build mode. However in non dev build the error messages get ignored. Use Development build if you need release matching performance and validations.

Features

Many features listed below are supported but tooling still needs to be developed. Some features are in branches waiting to be ported to latest rendering backend.

  • Reflection generator for C++
  • Reflection supports metadata classes and flags
  • Shaders are reflected and Parameters can be addressed with names
  • PBR Materials
  • Image base lighting
  • Point, Spot, Directional lights
  • Shadows, Cube mapped shadows and Cascaded shadows
  • Prototype garbage collector
  • Object tree actions like deep copy, traversal etc.,
  • Multiwindow widgets and Input handling
  • Supported inputs mouse and keyboard
  • World/Actor/Components
  • Unity style prefabs
  • Job system using CoPaT

Third parties

Licenses for third party packages used is placed under Licenses folder

Current dependencies

Dependency Description
Vulkan Headers only. SDK is required
Libraries provided as part of external download
glm
tinyObjloader
stb
doctest. Optional testing framework.
SPIRV-Tools Custom fork to use as dll and used with FindDxc
LLVM(CLang). CMake configs generated required some manual tweaking to support Debug,Development and Release config
mimalloc. CMake configs generated required some manual tweaking to support Debug,Development and Release config
tracy profiler. CMake configs generated required some manual tweaking to support Debug,Development and Release config
JoltPhysics. CMake configs generated required some manual tweaking to support Debug,Development and Release config
Assimp CMake configs generated required some manual tweaking to support Debug,Development and Release config
Libraries embedded as part of source
xxHash Embedded into the project
CoPaT Embedded into the project
SPIRVCross Embedded into the project, Few necessary files are copied directly rather than using as include
ImGui and ImPlot Embedded into the project
miniaudio Embedded into the project

Some screen shots

TestEngine

TestEngineSS

CranberryEditor

CranberryEdSS

CranberryActorPrefabEdSS

❤️ Support this project

If you found any piece of this software helpful or used it yourself, please feel free to share it with your circle or support me. I had invested substantial amount of my personal time in this project.

Description
Cranberry Game Engine is MIT Licensed open source engine. It has high code quality and has all the potential to be one of the most advanced open source game engines available.
Readme 3.4 MiB
Languages
C++ 89.4%
C 8.8%
CMake 0.8%
HLSL 0.7%
Mustache 0.2%