MLGE — Mechanical Lich Game Engine

A simple 2D game engine library built on top of Ebitengine.

Overview

MLGE is a Go library that provides a collection of game development systems built on top of Ebitengine. Rather than being a standalone engine, it offers reusable packages for common game development needs — entity management, input handling, audio, UI, pathfinding, task scheduling, and more.

Key Features

  • Entity Component System – Blueprint-based ECS with component factory and system manager
  • Event System – Publish/subscribe with immediate and queued dispatch modes
  • Input Management – Mouse and keyboard input translated into events
  • Audio Playback – Background music player supporting MP3 and OGG formats
  • A* Pathfinding – Allocation-efficient pathfinding with reusable pathfinder instances
  • World System – Generic tile-based levels with custom data, pathfinding integration, and save/load
  • UI Framework – Comprehensive widget library with theming and sprite-based rendering
  • Task Scheduling – Priority-based task system with proximity assignment and escalation
  • State Machine – Stack-based game state management
  • Sensory Simulation – Grid-based stimulus propagation for sound, scent, and pheromones
  • Resource Management – Asset loading and caching for textures, fonts, and sounds
  • Text Rendering – Text drawing, measurement, and word wrapping
  • Dice Rolling – Tabletop-style dice expression parser
  • Utility Functions – Math, geometry, and drawing helpers
  • Client/Server Architecture – Quake-style simulation/render split with transport abstraction

Packages

Package Description
ecs Entity Component System with blueprints and system manager
event Publish/subscribe event system
input Mouse and keyboard input management
audio Background music playback (MP3/OGG)
path A* pathfinding
resource Asset loading and caching
state Stack-based state machine
task Priority-based task scheduling
sense Grid-based sensory simulation
ui/minui Immediate UI framework with widgets and theming
text Text rendering and wrapping
dice Dice expression parser
message In-game message log
world Generic tile-based world system with pathfinding and save/load
utility Math, geometry, and drawing helpers
transport Client/server transport abstraction (commands and snapshots)
simulation Server-side authoritative game loop at fixed tick rate
client Client-side presentation layer (Ebitengine integration)

Installation

go get github.com/mechanical-lich/mlge

Dependencies

MLGE is built on top of Ebitengine v2, a simple 2D game engine for Go. Ebitengine handles the low-level rendering, audio context, and input polling, while MLGE provides higher-level game systems on top of it.

License

See LICENSE for details.


Back to top

Copyright © 2026. Distributed under the MIT License.

This site uses Just the Docs, a documentation theme for Jekyll.