OpenWare is a minimal open-source 3D engine prototype in a retro low-poly style inspired by RenderWare.
- C++17 modular architecture
- OpenGL rendering with SDL2 window/input backend
- Core math (
Vec2,Vec3,Mat4,Transform) - Gameplay foundation:
- game state machine (
Playing/Paused) - fixed timestep simulation loop (
60 Hz)
- game state machine (
- Scene system (
Entity,Scene,Camera,DirectionalLight) - Renderer system (
Shader,Mesh,Material,Renderer) - Physics module with rigid bodies, gravity, impulses, and sphere collision response
- Resource loading:
- OBJ mesh loader (
.obj) - PPM texture loader (
.ppm) - material loader (
.mat)
- OBJ mesh loader (
- Optional Lua scripting callbacks (enabled when Lua is installed)
- Optional audio SFX via SDL2_mixer (enabled when installed)
- Debug UI overlay:
- FPS and frame time
- Settings menu on
Esc
include/Engine/Core- math and transforminclude/Engine/Renderer- rendering interfaces and OpenGL glueinclude/Engine/Scene- scene, entity, camera, lightinclude/Engine/Physics- simple collision systeminclude/Engine/Audio- audio wrapper (SDL2_mixer)include/Engine/Script- Lua scripting wrapperinclude/Engine/Input- SDL2 input wrapperinclude/Engine/Resource- OBJ/PPM loadersinclude/Engine/UI- debug HUD/settings UIsrc/...- module implementationsapi/- C shared library API and Python HTTP API examplesassets/- demo resources (cube.obj,checker.ppm,.mat, scripts)docs/- engine system and integration docs
sudo dnf install gcc-c++ cmake ninja-build SDL2-devel mesa-libGL-devel pkgconf-pkg-configOptional packages:
sudo dnf install SDL2_mixer-devel lua-develAll builds are expected to use the build_ninja directory.
cmake -S . -B build_ninja -G Ninja
cmake --build build_ninja -j4./build_ninja/OpenWareEngineThe project also includes API examples in api/:
- C API in
api/c(shared libraryopenware_api) - Python HTTP API in
api/python(uses C API throughctypes)
Run the Python API server:
python3 api/python/server.pyIf you are building your own game on top of this engine, start here:
src/main.cpp- main game entry point and loop.
Recommended places inside src/main.cpp:
- Scene setup block: create your entities, materials, lights, and initial transforms.
- Per-frame update block (inside
while (running)): implement gameplay logic, AI, custom controls, and game rules.
Typical workflow:
- Keep engine modules inside
include/Engineandsrc/...reusable. - Put game-specific logic in
src/main.cppfirst. - When your game grows, move game code into your own files (for example
src/Game/...) and call them frommain.cpp.
W/A/S/D- moveQ/E- down/up- Mouse - look around
Space- apply upward impulse to the dynamic test objectP- togglePlaying/Paused
Esc- open/close settings menuF1- show/hide debug HUDF2- open/close About panelF10- exit
1- toggle wireframe2- toggle VSync3- cycle shading steps (2/4/8) for stylized low-poly lighting4- toggle background music on/off (ifassets/audio/music.wavexists)5- toggle PS2 aesthetic mode6- cycle PS2 color quantization levels (8/12/20)7- cycle vertex jitter amount8- cycle fog strength
- The engine is intentionally minimal and designed to be extended with animation, audio, richer physics, ECS, and tooling.
- In headless environments, runtime may fail with
No available video deviceeven though compilation succeeds. - Detailed docs are in
docs/README.md.