C++ game engine combining opensource libraries & tools that I like
currently using:
- bgfx as the renderer
- CMake as the build system
- vcpkg as the package manager
- glm for 3d math
- EnTT as the entity component system
- assimp for generic asset loading (not in runtime)
- sol2 modern C++ bindings for lua
- nlohmann-json for parsing json
- pugixml for parsing xml
- imgui for editor UI
- RmlUI for ingame UI
- ozz for 3d skeletal animations
- cereal for serialization
- Jolt for 3D physics
- miniaudio for audio
- taskflow for multithreaded render & physics
- tiny-process-lib to run os processes
planned to use:
- tracy for frame profiling (blocked because of bgfx#3308 and the vcpkg bgfx build not having a profiler feature)
- recast navigation for pathfinding
- BehaviorTree.CPP for behavior trees
- need to decide 2D physics
- ldtk for 2D level editor
- spine for 2d skeletal animations
Trying to target the following platforms:
- desktop (windows, macos, linux)
- mobile (iOS, Android) (pending)
Some philosofical decisions (could be controversial)
- use modern C++ (20) patterns where possible
- no game editor, will use external tools (blender, ldtk, etc...)
- use as much stl as possible (need to look into memory management at some point)
- no naked pointers
- throw exceptions for error handling
- try to keep the API similar to Unity3D (where it makes sense) so that it's easy to port game logic
WARNING: currently in early stages of development
- Will it have feature X?
Depends on what I need. Anyone is welcome to fork and submit PRs.
I'm still learning CMake, so if you see something that should be fixed please let me know.
- bgfx window setup (GLFW on windows & linux)
- update logic methods with delta time
- renderer: threaded render graph that compiles passes inputs and outputs
- unlit
- forward with phong lighting (point, ambient)
- entity component scene using entt
- transform, camera
- sprites and spritesheets
- loading models using assimp (FBX, etc...)
- serializing models from assimp into binary using cereal
- lua scripting
- lua debugging
- multiple UI options
- imgui for tooling
- RmlUI for ingame (support for multiple canvases)
- skeletal animations using ozz (reading from binary)
- 3d physics using jolt
- rigidbodies
- character controller
- tool to export asset folders
- shaders & vertex layouts
- copy files
- assimp to custom binary model format
- ozz skeleton & animations
- dynamic font texture generation
- play sounds and music (wav & mp3)
- support for nested rmlui data models in lua
- move miniaudio to use taskflow tasks
- check memory leak when reloading darmok-lua
- luajit support (maybe compile using importer)
- camera frustrum culling
- more renderer features
- other types of lights
- deferred
- PBR
- SSAO
- text improvements
- finish all the TextRenderConfig options
- dynamic distance field rendering with border support
- clipboard text support (UTF8)
- asset loading progress
- possible refactors
- maybe replace Data for std::vector<uint8_t> and DataView for std::span<uint8_t>
- loaders should return unique_ptr
- move lua bindings to separate library?
- coroutines could be useful in some places
- more stuff serialization
- binary texture atlas
- material
- custom UI module (rmlui is nice but slow)
- more unit tests
- performance profiling
- 2d physics
- instancing
- 3d physics materials
- multithreaded updates (Ubisoft)
- support multiple imgui app components with different transforms
- spine animations
- unify use of allocators everywhere
- progressive asset loaders
- multithreaded rendering with taskflow
- lua debugging would be nice
- particle systems (maybe effekseer)
- more sound options (spatialization, effects)
- SuperNovaEngine a very similar engine but much more advanced
- FrameGraph renderer agnostic frame graph library
- dome engine - minimalist engine with wren as the scripting language
- RaZ engine - C++17 game engine
- cluster - PBR implementation for bgfx
local program = Program.new(StandardProgramType.Forward)
local camEntity = app.scene:create_entity()
local camTrans = camEntity:add_component(Transform, { 0, 2, -2 })
camTrans:look_at({ 0, 0, 0 })
local cam = camEntity:add_component(Camera)
cam:set_projection(60, { 0.3, 1000 })
local renderer = cam:add_renderer(ForwardRenderer)
renderer:add_component(PhongLightingComponent)
local lightEntity = app.scene:create_entity()
lightEntity:add_component(Transform, { 1, 1, -2 })
lightEntity:add_component(PointLight)
local cubeMesh = MeshData.new_cube().createMesh(program.vertex_layout)
local greenTex = app.assets:load_color_texture(Color.green)
app.scene:create_entity():add_component(Renderable, cubeMesh, program, greenTex)