Skip to main content

A 2D game framework for Go

Castrum

Castrum is an ECS framework for building 2D games in Go. Its built on Ebitengine which provides rendering, input, audio and window management.

A samurai stands beneath clouds and a crescent moon in a pixel-art mountain landscape

What Castrum brings

Tooling for building 2D games

ECS framework in Go

Represent game objects with entities and Go struct components. Typed queries give systems direct access to the data they need.

Reusable, data-driven scenes

Build scenes in Go or describe them as data. Spawn them with different properties, compose hierarchies, and preload their assets.

Animation states

Give characters reusable animation sets with states like idle, run, and attack. Layer tracks, blend transitions, and respond to playback signals.

Sound with space to play

Play music and sound effects, mix them on separate buses, and place sounds in the world with distance-based attenuation.

And more

Bring your game together with cameras, collision detection, input bindings, timers, and more.

Documentation

Recent posts