Skip to content

k0t9i/SimpleEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

173 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleEngine 🎮

image

A modern C++20 software engine and development environment. Instead of relying on GPU pipelines, it features a custom CPU-based software renderer that rasterizes graphics directly into a frame buffer, utilizing OpenGL strictly for final texture presentation. Designed with a modular architecture, it compiles all dependencies from source, ensuring a seamless setup process on any machine.


🏗️ Architecture Overview

The workspace is divided into separate, decoupled targets managed seamlessly via CMake:

  • Engine — The core framework (static library), handling CPU software rendering, input, and subsystem management.
  • Game — The dynamic gameplay module (game.dll), containing application logic and serializable gameplay code.
  • Host — The standalone launcher (.exe) that bootstraps the Engine and dynamically loads the Game module.
  • Editor — The development suite (.exe) embedded with tools to manage engine entities, scenes, and assets.

✨ Features

  • CPU Software Renderer: Custom rasterization pipeline running entirely on the CPU before copying the final pixels to the screen.
  • C++20 Pipeline: Leverages modern language features for performance and clean code design.
  • Gameplay Hot Reloading: Modify your game logic, recompile just the Game module, and watch the Editor instantly reload game.dll at runtime without restarting the application.
  • Integrated UI Suite: ImGui-powered Editor workspace featuring a custom viewport and transform gizmos.

🛠️ Build Instructions

The project is fully autonomous. Anyone with a compatible compiler and CMake can generate and build the entire ecosystem using a single routine.

📋 Prerequisites

Before compiling, ensure you have the following installed:

  • CMake 3.20 or higher.
  • A compiler supporting C++20 (Visual Studio 2022/2026, GCC 11+, or Clang 13+).
  • Graphics drivers with native OpenGL support (used for final window blitting).

🚀 Building via Command Line (Terminal)

The most reliable way to compile the entire solution is via the terminal execution inside the project's root folder.

1. Generate Build Configurations

Configure the solution caching layers for your operating system (64-bit architecture):

cmake -B build -A x64

2. Compile Debug Target

Build the development workspace, providing symbols and assets:

cmake --build build --config Debug

Upon completion, the working ecosystem (Host.exe, Editor.exe, game.dll, and assets) will reside inside the ./Debug/bin/ root catalog.

3. Compile Release Target

Compile optimized distributions stripped of diagnostics:

cmake --build build --config Release

Production binaries will be safely mirrored inside the ./Release/bin/ root catalog.


💻 Development with Visual Studio

For native IDE diagnostics and deployment:

  1. Open Visual Studio (2022 / 2026).
  2. Navigate to File ➡️ Open ➡️ Folder...
  3. Select the root directory containing the master CMakeLists.txt.
  4. Wait a few seconds for Visual Studio to parse scripts and generate internal cache structures.
  5. In the top navigation pane, switch your active configuration context (e.g., x64-Debug or x64-Release).
  6. Toggle the "Select Startup Item" drop-down menu to point to your desired execution target (Host.exe or Editor.exe).
  7. Press F5 to start debugging.

⚡ Recompiling Just the Game Module (Hot Reload)

To make changes to the gameplay logic and hot-reload it in the Editor, you do not need to recompile the whole solution. You can trigger a fast compilation for the Game target only.

Via Command Line (Terminal):

Run this command from the project root to compile only the DLL and trigger the asset-copy pipeline:

cmake --build build --config Debug --target Game

Via Visual Studio:

  1. In the CMake Targets View or the top build menu, locate the Game target (or game.dll).
  2. Right-click on the Game target and select Build (or press Ctrl+B while having the Game project selected).
  3. The Editor will automatically detect the file change on disk and reload the module.

📦 Third-Party Attributions

All internal framework dependencies are nested inside the workspace hierarchy and honor their respective license mandates:

  • FreeType (Engine/third_party/freetype) — FreeType License (FTL) / GPLv2
  • Glad (Engine/third_party/glad) — MIT License
  • ImGui (Editor/third_party/imgui) — MIT License
  • Nlohmann JSON (Engine/third_party/nlohmann) — MIT License
  • STB Image (Engine/third_party/stb) — Public Domain / MIT License
  • WGL Extensions (wglext.h) (Engine/third_party/wgl) — Khronos Group License / Apache 2.0
  • IconFontCppHeaders (Editor/third_party/IconFontCppHeaders) — MIT License

📜 License

The core source code of SimpleEngine is licensed under the terms of the MIT License (see the accompanying LICENSE file for details).

About

Software-Rendered Game Engine with imgui editor

Topics

Resources

License

Stars

Watchers

Forks

Contributors