Copyright (c) 2019 Seth Traman as GPLv3.
Gengine is a software framework for making cross-platform video games in the C++ language. It's named after "Game Engine".
This project is proud of the following features:
- Adaptive GPU backend runs on Vulkan, OpenGL ES, and WebGL
- Automated the software lifecycle using CI/CD pipelines
- Performant virtual worlds powered by Bullet³ physics
- Supported platforms are desktop Linux and the Web.
Building gengine requires a sane Linux environment (git, zip, curl, etc.) in addition to the following system packages for building the application:
- cmake
- g++-13
-
Clone the git repository.
git clone https://github.com/stickyfingies/gengine.git
-
Setup the local dev-env and build dependencies from source code.
cd gengine chmod +x setup.sh sh setup.sh
Build the game engine application from source code.
cmake --workflow --preset $targetDesktop targets:
linux-vk-dev— desktop vulkan developmentlinux-gl-dev— desktop opengl developmentlinux-vk-app— desktop vulkan releaselinux-gl-app— desktop opengl release
Browser targets:
web-gl-dev— browser webgl developmentweb-gl-app— browser webgl release
-
On the desktop with:
./artifacts/${target}/gengine -
In the browser with:
cd ./artifacts/web-gl-app python3 -m http.serverVisit the printed URL on your favorite browser to play the game.
Compilation Strategy:
flowchart LR
subgraph GPU[GPU Library]
direction BT
gpu.h[GPU Interface]
gpu.vk.cpp[Vulkan Backend]
gpu.gl.cpp[OpenGL Backend]
gpu.webgl.cpp[WebGL Backend]
gpu.h -->|Platform Detect| gpu.vk.cpp
gpu.h -->|Platform Detect| gpu.gl.cpp
gpu.gl.cpp -->|Emscripten| gpu.webgl.cpp
end
subgraph World[World Library]
world.native.cpp[Game A]
world.wasm.cpp[Simulation X]
end
subgraph Engine[Engine Library]
direction LR
assets.cpp[Asset Processing]
physics.cpp[Physics Simulation]
glfw.h[Window Management]
end
Engine <-->|Static Link| World <-->|Static Link| GPU
Loading Objects from Asset Files:
Note: the figure below may be outdated.
flowchart TB
Asset --> Matrix & Geometry & Texture
Geometry --> Collidable & Renderable
Texture --> Descriptor[Material]
Matrix --> Collidable
Collidable & Renderable & Descriptor --> GameObject
Gengine uses the Asset Importer Library to pull geometry and texture data from static asset files.
The geometry is passed into the physics engine to create a physically simulable representation of that shape.
The geometry and the texture are passed into the rendering engine to create a structure that can be rendered on the GPU.
Finally, the culmination of these are used to create a cohesive "game object" that is both visible and tangible.
C++
- Modern C++ DevOps
- DevLog - Molecule Game Engine
- DevLog - Autodesk Stingray / BitSquid Engine
- DevLog - Our Machinery Engine
Rendering
- Learn OpenGL Start here — this tutorial taught me C++. It's that good.
- Vulkan Tutorial
- Vulkan Guide - Resources
- Writing an efficient Vulkan renderer
- Interleaved or Separate Vertex Buffers
All software dependencies are installed and managed by vcpkg.
- glfw3: cross-platform window creation and input
- bullet3: physics simulation for video games
- assimp: load and parse various 3d file formats
- glm: mathematics library for graphics software
- stb: image loading & decoding from files and memory
- imgui: bloat-free graphical user interface for C++
- Resizable windows
- Colors and Textures
- Texture mip-mapping
- Integrate a GUI
- Lighting
- Edit, save, and load scenes
- Benchmarks and performance stats
Copyright (c) 2019 Seth Traman.
GPLv3. See COPYING.
