Open Source 3D Game Engine

mirgoengine

A 3D game engine written in Go, built on raylib.
Entity-component system, real-time physics, shadow mapping, and a built-in scene editor.

terminal
$ git clone https://github.com/MironCo/mirgo_engine.git
$ cd mirgo_engine
$ make run

Features

Everything you need to build 3D games in Go

🧩

Entity-Component System

GameObjects with attachable components, generic GetComponent[T]() lookups, tags, and scene queries.

🎯

Real-Time Physics

Gravity, rigidbodies, box/sphere colliders, AABB collision resolution, spatial hashing, raycasting.

🌗

Shadow Mapping

2048×2048 depth map, directional light, PCF 5×5 soft shadows, slope-scaled bias.

Custom GLSL Shaders

Diffuse + wrap lighting, Blinn-Phong specular, fresnel, rim lighting, tone mapping, gamma correction.

🛠

Scene Editor

Unity-style editor with free-fly camera, object selection via raycast, transform gizmos, inspector panel.

📄

JSON Scene Files

Data-driven level layout. Load/save at runtime, hot-editable scene format.

📝

Script Registry

Register custom component factories by name, reference from scene JSON, auto-serialization, scaffolding tool.

🎮

FPS Controller

WASD movement, mouse look, gravity, jumping, and player collision resolution out of the box.

Quick Start

Up and running in under a minute

1

Requirements

Go 1.24+, a C compiler (GCC), and an OpenGL 3.3+ GPU.

2

Clone & Build

git clone https://github.com/MironCo/mirgo_engine.git
cd mirgo_engine
make run
3

Create a Script

# Build the Rust CLI utils (once)
cd utilities && make

# Scaffold a new script
./mirgo-utils newscript MyScript
4

Add It to a Scene

{
  "type": "Script",
  "name": "MyScript",
  "props": {
    "speed": 1
  }
}

Architecture

Clean, composable, no singletons

Game
 └── World
      ├── Scene
      │    └── GameObjects
      │         ├── Transform
      │         ├── Tags
      │         └── Components[]
      ├── PhysicsWorld
      │    ├── Spatial Hash
      │    ├── Collision Pipeline
      │    └── Raycasting
      └── Renderer
           ├── Shadow Map Pass
           └── Lighting Pass

WorldAccess Interface

Components access the world through GetGameObject().Scene.World — no singletons, no constructor injection. The interface prevents circular dependencies between packages.

Component Lifecycle

Every component implements Start(), Update(deltaTime), and gets automatic access to its parent GameObject, the Scene, and the World.

Scene Queries

Find objects by tag with FindByTag(), by name with FindByName(), or use generic GetComponent[T]() lookups on any GameObject.

Controls

Game Mode

WASDMove
MouseLook
SpaceJump
LMBShoot projectile
RMBDelete targeted object
F1Debug overlay
F2Toggle editor

Editor Mode

RMB + DragLook around
RMB + WASDFly
ScrollAdjust fly speed
LMBSelect object
Drag GizmoMove along axis
Ctrl+SSave scene
F2Back to game