Cranberry
Cranberry Game Engine is my Personal hobby game engine
Install / Use
/learn @jeslaspravin/CranberryREADME
Cranberry Game Engine
NOTE This repository is no longer updated. Latest open source version of this engine can be found at https://git.jeslaspravin.com/jeslaspravin/Cranberry
Cranberry Game Engine is my Personal hobby game engine, This is my first from scratch game engine. I work on this as best as I could during my holidays.
Why is Cranberry the name? I was eating cranberry and checking Twitter for my daily dose of imposter syndrome. Then suddenly 💡 why not write my engine? I created the project while still eating the berries!
Requirement
- Vulkan 1.3 supported hardware is required
- Windows platform
Instructions
- Install CMake from CMake
- Install Visual Studio 2022 from VisualStudio
- Install Vulkan SDK from VulkanSDK. Necessary because I am using
glslangValidator - Run GenerateProject.bat to generate Visual Studio solution. This will by default generate solution for
Editor-DynamicLinkedpreset underBuildfolder
<p align="center">(or)</p>
- You can also run GenerateProject.bat with one of following presets(eg.,
GenerateProject.batorGenerateProject.bat <preset> [Some Cmake arguments]..) Note that if using preset and not going to change library dependencies run Setup.bat first(It will download archive with necessary libraries)Editor-DynamicLinkedpreset creates commandcmake -B Build -G "Visual Studio 17 2022" -A x64 -Thost=x64 -DCMAKE_INSTALL_PREFIX:STRING=${sourceDir}/Installed -DCranberry_STATIC_MODULES:BOOL=OFFRuntime-DynamicLinkedpreset creates commandcmake -B RuntimeBuild -G "Visual Studio 17 2022" -A x64 -Thost=x64 -DCMAKE_INSTALL_PREFIX:STRING=${sourceDir}/Installed -DCranberry_STATIC_MODULES:BOOL=OFF -DCranberry_EDITOR_BUILD:BOOL=OFF
Code lookups
Right now I have two runtime applications Cranberry and TestEngine
- For
Cranberrystart from Cranberry-Main- Right now the scenes can be manually loaded using this line of code CranberryAppLoadScene at startup of the engine
- If engine cannot find any valid
objfile then it auto creates a default scene with bunch of cubes like in the Screen Shot. It is done here CranberryAppCubeScene
- For
TestEnginestart from TestEngine-Main. In order to runTestEngineadditional Assets directory with raw assets are necessary. If you want to runTestEngine.exedownload and extract Assets.zip in Runtime folder
Best practises
- Whenever adding sources to Modules. If the header needs to be public place its source file together in Public folder, This makes source browsing easier. Source files will any way be considered private by module builder.
Features
Many features listed below are supported but tooling still needs to be developed
- 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:
VulkanheadersglmtinyObjloaderstbLLVM(CLang). CMake configs generated required some manual tweaking to support Debug,Development and Release configmimalloc. CMake configs generated required some manual tweaking to support Debug,Development and Release configtracyprofiler. CMake configs generated required some manual tweaking to support Debug,Development and Release configxxHash(Embedded into the project)CoPaT(Embedded into the project)SPIRVCross(Few necessary files are copied directly rather than using as include)ImGuiandImPlot(Embedded into the project)
Some screen shots
TestEngine
.jpg)
CranberryEditor
.jpg)
Project boards
- Cranberry Board-Trello - This board will used for new features and research.
- Cranberry Board-Github - This board is for issues and bug fixes.
PS
If you found any piece of this software helpful or used it yourself, Please feel free to share it with your circle. I had invested substantial amount of my personal time in this project and would love some feedback in return😄
