github.com/x-hgg-x/goecsengine ↗
A simple game engine using Ebitengine with ECS.
Open this visualization on its own page →
Contributors
1
Lines of Code
194
From
2020-03-09
To
2020-06-18
About x-hgg-x/goecsengine
GoEcsEngine is a lightweight game engine built on top of Ebitengine that implements the Entity Component System (ECS) architecture pattern. The engine provides a structured framework for building 2D games in Go by organizing game logic around reusable components, systems, and resources rather than deep inheritance hierarchies.
The engine includes several core packages: Components for sprites, text, animations, and UI; a Loader for deserializing game entities and their configurations from TOML files; Resources for managing screen dimensions, fonts, spritesheets, and input controls; a state machine system for handling game states like pausing and level transitions; and Systems that automatically execute each frame to render graphics and manage game logic. All of these are coordinated through a World object that serves as the central container for game data and is passed to system and state functions.
The project includes built-in TOML deserialization support using the BurntSushi/toml parser, allowing developers to define entities and their properties declaratively in configuration files. Several example games demonstrate the engine's capabilities, including Arkanoid, Space Invaders, and Sokoban clones, making it suitable for developers learning ECS patterns or building indie 2D games with Go.