Skip to content

miguelibero/darmok

Repository files navigation

darmok

Dathon trying to explain the importance of Darmok

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 to replace CEGUI
  • ozz for 3d skeletal animations
  • cereal for serialization
  • tweeny for tweening and easings
  • Jolt for 3D physics

planned to use:

Trying to use modern C++ patterns where possible.

Trying to target the following platforms:

  • desktop (windows, macos, linux)
  • mobile (iOS, Android) (pending)

Some philosofical decisions (could be controversial)

  • 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

Frequently Asked Questions

  • Will it have feature X?

Depends on what I need. Anyone is welcome to fork and submit PRs.

Current State

I'm still learning CMake, so if you see something that should be fixed please let me know.

Working features

  • bgfx window setup (GLFW on windows & linux)
  • scene using entt
  • update logic methods with delta time
  • sprites and spritesheets
  • loading models using assimp (FBX, etc...)
  • serializing models from assimp into binary using cereal
  • renderer
    • unlit
    • forward with phong lighting (point, ambient)
  • lua scripting
  • 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

Upcoming (I need them)

  • export asset folders in C++
  • lua camera render
  • sound

Upcoming

  • replace input bindings functions with interfaces
  • window modes with different resolutions
  • frustrum culling
  • modernize renderer (probably needs frame graph or similar)
    • deferred
    • other types of lights
    • physically based renderer
    • SSAO

In the future

  • unit tests, I know
  • performance profiling
  • 2d physics
  • separate shaders for skinning?
  • instancing meshes
  • support multiple imgui app components with different transforms
  • spine animations loading
  • unify use of allocators everywhere
  • progressive asset loaders
  • async task management
  • lua debugging would be nice

Interesting Related Projects

Example code

program = app.assets:load_standard_program(StandardProgramType.ForwardPhong)

camEntity = app.scene:create_entity()
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 })
cam:set_renderer(ForwardRenderer)
cam:add_component(PhongLightingComponent)

lightEntity = app.scene:create_entity()
lightEntity:add_component(Transform, { 1, 1, -2 })
lightEntity:add_component(PointLight)

cubeMesh = MeshCreator.new(program.vertex_layout):create_cuboid()
greenTex = app.assets:load_color_texture(Color.green)
app.scene:create_entity():add_component(Renderable, cubeMesh, greenTex)