Skip to content

Repository files navigation

MGEngine

A small raylib-style 2D/3D rendering engine in C11, split into a shared library and an editor app:

source/    the engine  -> build/libmgengine.(dll|so)   (build/release/ for `make release`)
editor/    a project / scene editor that links the library (Dear ImGui docked panels)
runtime/   the standalone player  -> build/mgeplayer (what "Build Bundle" ships)
examples/  one focused demo per feature
test/      unit tests (stubbed GL backend -- no window needed)
vendor/    glad, stb, mlib, GLFW, Assimp, Dear ImGui

An editor project is a folder (project.mgproject + scenes/<name>/ + res/); each scene has editor-authored data (.mgscene) plus .c code compiled into a hot-reloadable module (the compile runs as a separate process, so the editor never freezes). A scene has an Environment (sun + skybox) and a main camera object the built game views the world through. Build Bundle compiles every scene, packs all project data (including project.mgproject) into dist/packs/data.pak.NNN, and stages a runnable dist/ around the player — scene modules as unnamed dist/scenes/scene.N.dll — against the Debug or Release engine per the top-bar toggle.

Build

make vendor      # once: builds GLFW + Assimp from vendored source (needs cmake + ninja)
make             # debug build -> build/{libmgengine,editor,mgeplayer}
make release     # production build (-O2 -DNDEBUG, stripped) -> build/release/{...}
                 #   separate object cache; run both to keep a debug + a release set
make test        # unit tests (stubbed GL, no window)
make -C test render   # headless render smoke test: screenshots + GL-error check (needs a GPU)

On Windows use mingw32-make.

Docs

  • docs/ — the engine, split by area: building, rendering, HDR & bloom, lighting & materials, meshes, the scene/component/physics model, text & GUI, and how to link the library from your own app.
  • editor/USAGE.md — the editor: projects & scenes, the panels, scene code / Play / hot reload, Build Bundle + the player.
  • todo/ — what's done and what's next, split by area (engine, editor, GUI).

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages