Skip to content

Repository files navigation

BulletEngine Logo

powered by

BulletPhysics Logo BulletRender Logo

Small but complete C/C++ 3D/2D game engine with Lua scripting. It combines a graphics engine module and a physics engine module under an ECS-based architecture, with an editor and its own project and scene workflow. The engine follows one core principle: provide a small, solid foundation for common needs, and leave the game-specific architecture to the programmer.

Demo Editor

Features

  • 2D/3D modes do not limit you to one format, you can mix them freely in one game
  • Entities live in a flat world and hold their components, transforms form parent-child hierarchy
  • Components are pieces of behavior an entity is made of, attached and detached while world runs
  • Reflection is C++26 static reflection, editor and scene format read a component off its own declaration
  • Editor shows the whole project, world is built and played without leaving it
  • Scripting in Lua, small language that embeds into engine, this is where game itself is written
  • UI is drawn by scripts over the game, text and images placed in pixels
  • Events carry what happened by name, so one script answers another without knowing it
  • Scenes save as readable text, so they can be read and fixed by hand as well as by editor
  • Prefabs keep an entity with everything below it, place it back anywhere
  • Assets of any kind are handled the same way, and reload on the fly when file changes

Demos

Demo Model

Textured model under a skybox, moved by a script


Demo UI

Small game showing physics interactions and score drawing


Demo Sprites

2D character controller driven by a sprite sheet animator

Dependencies

Requires C++26 and GCC 16 for static reflection support.

Modules come as submodules, everything they need applies here too:

Bundled in external/:

  • Lua and sol2 for scripting

Structure

src/
├── app/          app and scheduler
├── ecs/          entities, components, systems
├── script/       lua runtime and script api
├── scene/        reading and writing scenes and prefabs
├── assets/       registry and loaders
├── project/      project, its tree and settings
├── reflect/      type description
├── interface/    editor panels
└── io/           logging

Future Work

What comes next:

  • Audio
  • Build
  • Animations

About

Game Engine in C/C++ with Lua Scripting

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages