Build your own engine in script.
A C++-oriented runtime for programmers who want to build systems, not just use them.
BuGL is not a closed game engine.
BuGL is a programmable runtime built around BuLang, a simple but powerful scripting language designed to stay close to C++ while enabling fast iteration.
The goal is not to hide systems behind a monolithic editor.
The goal is to give programmers a space to experiment with rendering, physics, AI/navigation, tooling, gameplay systems, and engine architecture directly from code.
With the current release, you can download BuGL, open the included .bu scripts, edit them, and run them immediately.
BuGL was created out of frustration with traditional scripting approaches.
I wanted a language that felt much closer to C++ than the usual embedded scripting solutions, while still being simple enough for rapid iteration.
With BuGL:
- native C++ systems can be exposed directly to script
- script classes can inherit from C++ classes
- native C++ code can call back into script-defined behavior
That makes BuGL less like a traditional engine and more like a programmable environment for building rendering systems, gameplay logic, tools and engine workflows from code.
BuGL is for curious programmers who enjoy writing code, understanding systems, and building things from the ground up.
The easiest way to start is with the latest release.
The release package already includes:
bugl/bugl.exe- tutorial and demo scripts
- required runtime and plugin files
Extract the release and run a script directly.
./bugl scripts/tutor_1.bubugl.exe scripts/tutor_1.buThen try:
scripts/tutor_3.buscripts/tutor_6.buscripts/demo_box2d_stack_chaos.buscripts/demo_jolt_tank_csm_particles.bu
The intended workflow is simple:
- download the release
- open a
.buscript - change it
- run it again
- BuLang = the language
- BuGL = the runtime and native systems exposed to script
- Plugins = larger systems loaded on demand
Typical script flow:
Init -> while (Running) -> update -> draw -> Flip
BuGL lets you prototype rendering and gameplay logic quickly, without writing C++ boilerplate for every experiment.
These demos are a good starting point to understand what BuGL can do.
Interactive 2D physics sandbox with spawning, impulses, debug draw and GIF capture.
- left click: spawn box
- right click: spawn ball
- space: blast impulse
R: reset
Script:
scripts/demo_box2d_stack_chaos.bu
A more advanced 3D showcase combining:
- tracked vehicle physics
- turret and barrel control
- shell firing and explosion force
- cascaded shadow maps
- procedural normal mapping
- batch-based spark effects
- shader reload and screenshot capture
Script:
scripts/demo_jolt_tank_csm_particles.bu
- Rendering: bloom, HDR, ray tracing, ray marching, terrain, portals
- Physics: Jolt, ODE, Box2D, Chipmunk
- AI / Navigation: Recast, Detour, OpenSteer, MicroPather
- Tooling / UI: ImGui, fonts, Batch drawing, widgets
BuGL uses plugins for larger feature groups.
At runtime, scripts load what they need:
require "Jolt";
import Jolt;
using Jolt;
Main plugin modules:
| Plugin | Module in script | Typical usage |
|---|---|---|
BuJolt |
Jolt |
3D vehicles, rigid bodies, constraints |
BuOde |
ODE |
3D rigid body simulation |
BuBox2d |
Box2D |
2D physics |
BuChipmunk |
Chipmunk |
Alternative 2D physics |
BuRecast |
Recast |
Navmesh + pathfinding + crowd |
BuOpenSteer |
OpenSteer |
Steering behaviors |
BuMicroPather |
MicroPather |
Grid/pathfinding |
BuAssimp |
Assimp |
3D model import |
BuImgui |
ImGui |
Tooling and UI |
Plugin binaries live in:
bin/plugins/
BuGL is especially strong as a playground for real-time agent behavior and movement systems.
Used for:
- navmesh generation
- path queries
- crowd movement
- large-scene navigation
Used for:
- flocking
- pursuit / evasion
- avoidance
- steering-based local motion
Used for:
- fast grid-based pathfinding
- RTS / tactics style routing
- deterministic fallback logic
A useful combined workflow is:
- Detour for high-level path
- OpenSteer for local movement
- MicroPather for deterministic grid logic
Relevant demos:
demo_recast_*demo_opensteer_*demo_steertest.budemo_micropather.bu
A suggested learning order:
scripts/tutor_1.bu— window, loop and basic drawingscripts/tutor_2.bu— arrays and buffersscripts/tutor_3.bu— shader and VBO flowscripts/tutor_4.bu— camera and matrix usagescripts/tutor_5.bu— FPS controls and capture workflowscripts/tutor_6.bu— text and font flow
Rendering
demo_phong.budemo_texture_quad.budemo_bloom_hdr.budemo_shadowmap_csm_v3.budemo_raymarching.budemo_raytrace.bu
Physics
demo_jolt_*demo_ode_*demo_box2d_*demo_chipmunk_*
AI / Navigation
demo_opensteer_*demo_steertest.budemo_recast_*demo_micropather.bu
UI / Tools
demo_imgui.butest_imgui_widgets_smoke.butest_font.bu
If you prefer to build from source:
git clone https://github.com/akadjoker/BuGL
cd BuGL
cmake -S . -B build
cmake --build build -j
./bin/bugl scripts/tutor_1.buRun scripts:
./bin/bugl scripts/tutor_1.bu
./bin/bugl scripts/main.bu# run the first tutorial
./bin/bugl scripts/tutor_1.bu
# run a larger release-style showcase
./bin/bugl scripts/demo_jolt_tank_csm_particles.bu
# run the Box2D chaos demo
./bin/bugl scripts/demo_box2d_stack_chaos.bu
# run ImGui smoke test
./bin/bugl scripts/test_imgui_widgets_smoke.buOn Windows:
bugl.exe scripts/tutor_1.bu
bugl.exe scripts/demo_jolt_tank_csm_particles.bu| Ray Tracer | Bloom + HDR | Particles |
|---|---|---|
![]() |
![]() |
![]() |
| Reflections · refraction · Fresnel | Multi-pass HDR + bloom | High-count particle rendering |
| Ray Marching | Terrain | Box2D |
|---|---|---|
![]() |
![]() |
![]() |
| SDF + lighting | Procedural terrain | 2D physics interaction |
| ODE Car | ODE Fall 3D | Box2D Stack |
|---|---|---|
![]() |
![]() |
![]() |
| Car physics | 3D rigid body collisions | Stack stability |
| Jolt Vehicle | Jolt Motorcycle | Jolt Tank |
|---|---|---|
![]() |
![]() |
![]() |
| Wheeled vehicle controller | Bike controller | Tracked tank + turret |
| Portal Showcase | ImGui Components | Batch Lines |
|---|---|---|
![]() |
![]() |
![]() |
| Render-to-texture portal | ImGui widgets/bindings | 2D Batch primitives |
| Batch 3D Primitives | Tank CSM + Sparks | Tutor 5 Capture |
|---|---|---|
![]() |
![]() |
![]() |
| 3D primitives with Batch | Jolt + cascaded shadows + particles | FPS camera tutorial |
| OpenSteer Boids | OpenSteer Path | Steering Test |
|---|---|---|
![]() |
![]() |
![]() |
| Flocking behaviors | Path following | Steering sandbox |
| MicroPather Pathfinding | OpenSteer Showcase | Assimp Import |
|---|---|---|
![]() |
![]() |
![]() |
| Grid pathfinding | Steering behaviors | Model import pipeline |
| B3D Collision | Water Shader | Q3 BSP Map |
|---|---|---|
![]() |
![]() |
![]() |
| Blitz3D models with ellipsoid slide | Refletion/Refraction | Quake 3 levels with collision trace |
| MD3 Animation | MD2 Animation | IQM Animation |
|---|---|---|
![]() |
![]() |
iqm animation |
| Quake 3 character animation | Quake 2 character animation | CPU skinning and Animation |
Current public release highlights:
- plugin-based runtime architecture
- 3D physics with
JoltandODE - 2D physics with
ChipmunkandBox2D - navigation and agents with
Recast/Detour,OpenSteer, andMicroPather - tooling UI with
ImGui - 3D model import with
Assimp
Next target in the physics stack:
Bulletintegration
Start here:
- API.md — central API reference
scripts/— runnable examples for each subsystemscripts/demo_jolt_tank_csm_particles.bu— full release-style scene
- GIF capture hotkey in runtime is
F10 - many demo scripts include their controls in header comments
- the release is intended for direct experimentation: edit scripts and run again
- BuLang VM: https://github.com/akadjoker/BuLangVM
- API reference: API.md
- Contributing: CONTRIBUTING.md
- License: MIT




























