C# / OpenGLSilk.NETPublic source

Lunar Engine

Engine & Systems Programmer · Custom 2D engine · Started in 2024

I built a 2D engine in C# and OpenGL, with command-buffer rendering, physics, and an ImGui scene editor.

18-second excerpt, without audio. Editing scene properties in the ImGui editor.
Watch the full recording (1:53)

The project

Lunar is where I worked on the parts that Unity usually provides: rendering, scene data, physics, and editor tools. It’s written in C# with Silk.NET and OpenGL.

My contributions

  • Rendering: Built a command buffer and wrappers for shaders, vertex buffers, and vertex arrays.
  • Entities & components: Built the entity and component system used by gameplay, rendering, and physics.
  • Editor: Added an ImGui scene hierarchy, Inspector, scene-view gizmos, and project browser.
  • Physics & assets: Implemented 2D rigid-body and collision systems, asynchronous asset loading, and scene serialization.

The render command buffer

Game systems add drawing commands to a buffer rather than calling OpenGL directly. The renderer can then order and execute that work separately from simulation.

Source

The code is on the Refactor branch. The demo above shows the editor in use, not a performance benchmark.