Skip to content

nurakmaljalil91/Cbit-Game-Engine

Repository files navigation

Cbit Game Engine

Overview

Cbit Game Engine is a project aimed at learning more about computer graphics and creating a game from scratch. This engine leverages several libraries to provide a robust framework for game development.

Screenshot of Cbit Game Engine

Screenshot on 2025-06-29

Features

  • Cross-platform support
  • Uses SDL2 for window management and input handling
  • Supports OpenGL for rendering
  • JSON support for configuration and data management
  • imgui for GUI development

Getting Started

To get started with Cbit Game Engine, clone the repository and follow the instructions below to set up your development environment.

git clone --recursive https://github.com/nurakmaljalil91/Cbit-Game-Engine

Tools Used

  1. CMake

  2. CLion


Libraries Used

Note: if you are using linux (Debian-like) use this command:

sudo apt update && sudo apt install -y \
build-essential cmake ninja-build \
libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsdl2-mixer-dev \
libgl1-mesa-dev libglu1-mesa-dev \
libspdlog-dev libsimdjson-dev \
libx11-dev libxrandr-dev libxi-dev libxxf86vm-dev libxinerama-dev libxcursor-dev \
pkg-config git
  1. SDL 2 Version 2.0.10
  2. SDL 2 Image 2.0.5
  3. SDL 2 TTF version 2.0.15
  4. jsoncpp
  5. OpenGL
  6. GLEW (The OpenGL Extension Wrangler Library)
  7. SOIL (Simple OpenGL Image Loader)
  8. Dear ImGui
  9. STB Image

SDL 2 Libraries that may be needed

  • -lmingw32
  • -lopengl32 -lSDL2
  • -luser32 -lgdi32
  • -lwinm -limm32
  • -lole32 -loleaut32 -lversion
  • -lsetupapi -lhid

References

  1. Game Programming in C++
  2. ECS from BirchEngine
  3. SFML RPG from HeadTurna
  4. That Game Guy
  5. SDL 2 Tutorial
  6. Learn OpenGL
  7. The Cherno

How to build

Build for debug mode:

cmake -DCMAKE_BUILD_TYPE=Debug "-DCMAKE_MAKE_PROGRAM=C:/Users/User/AppData/Local/Programs/CLion Nova/bin/ninja/win/x64/ninja.exe" -G Ninja -S C:\Users\User\Developments\Cbit-Game-Engine -B build-debug
cd build-debug
ninja

Build for release mode:

cmake -DCMAKE_BUILD_TYPE=Release "-DCMAKE_MAKE_PROGRAM=C:/Users/User/AppData/Local/Programs/CLion Nova/bin/ninja/win/x64/ninja.exe" DENABLE_EDITOR:BOOL=OFF -G Ninja -S C:\Users\User\Developments\Cbit-Game-Engine -B build-release
cd build-release
ninja

Author

  • Nur Akmal bin Jalil

License

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

About

C++ Game Engine using SDL2 and OpenGL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages