A fast, portable, low footprint, opinionated (but hackable), flecs native game engine.
The project is still WIP and currently only works on MacOS.
Build & run the engine:
cmake -S . -B build/debug
cmake --build build/debug
./build/debug/flecsThe project can also be built with bake3. bake fetches and builds
the external dependencies (glfw, cglm, wgpu-native, stb, tinyexr, cgltf, flecs)
automatically via its bundle feature. Build and run an executable (the flecs_app target produces the flecs binary):
bake run flecs_app --local-env
bake run traffic --local-envBuild an executable (and the flecs_engine library it depends on) without running:
bake build flecs_app --local-env
bake build traffic --local-envbake3 can also cross-compile to WebAssembly with --target em:
bake build flecs_app --target em --local-env
bake build traffic --target em --local-envThis produces flecs.html / flecs.wasm / flecs.js (and traffic.*) under
.bake/local_env/build/<app>/wasm32-Emscripten-debug/. bake automatically
locates and activates the Emscripten SDK; if emcc is not already on PATH it
sources emsdk_env.sh from $EMSDK, $EMSDK_DIR, or ~/GitHub/emsdk. On this
target bake builds the dependency bundles with emcmake, skips the native
GLFW/WebGPU dependencies, and uses Emscripten's -sUSE_GLFW=3 -sUSE_WEBGPU=1
ports instead.
You should probably not use this, unless:
- you want to quickly prototype ideas
- you want to build an engine but not start from 0
- you're OK with the limitations of the engine
- Primitive shapes:
- Quad
- Box
- Triangle
- TrianglePrism
- RightTriangle
- RightTrianglePrism
- Primitive meshes (parameterized mesh cache):
- Cone
- Cylinder
- Sphere
- IcoSphere
- HemiSphere
- NGon
- Meshes
- Instanced rendering
- glTF loader
- PNG loader
- DDS loader
- HDR / EXR loader (for HDRI)
- Metallic
- Roughness
- Cubemap based reflections
- Emissive
- Transmissive (rough/smooth objects)
- PBR textures
- Per-instance materials
- Shared materials
- Directional light
- Point lights
- Spot lights
- Clustered light rendering
- Cascading shadow maps
- Image based lighting
- Dynamic atmosphere
- Dynamic atmosphere IBL
- Distance fog
- Height based fog
- Sun disk
- Moon disk (w/phases)
- Starfield
- Time of day system
- Bloom
- SSAO
- Screen space sun shafts
- Auto exposure
- Tony McMapFace tone mapping
- Input handling
- Camera controller
- Movement systems
- Tracy profiling
- Image-based rendering regression testing
- MSAA
- GPU frustum culling
- Hi-Z occlusion culling
- Render to image
- cglm
- cgltf
- glfw
- stb_image
- tinyexr
- tracy






