gokebiten
August 27, 2026 · View on GitHub
Description
gokebiten is a modular game engine for Go: a small Game core wraps
goke — a type-safe, archetype-based Entity Component System —
into Ebitengine's Update/Draw/Layout loop. The standard, and only,
way to add functionality is a Plugin: everything beyond the tick loop and a typed Resources
registry — spatial indexing, physics, camera handling, your own game logic — is installed as a
Plugin, wired through the same Require/Provide mechanism regardless of install order.
The library ships three built-in plugins:
world.Plugin— owns the game's spatial index (via GOKg) and entity population/spawn bookkeeping.physics.Plugin— kinematics and collision detection/resolution (broad + narrow phase, pluggableCollisionHandlerstrategies) built onworld's spatial index.camera.Plugin— a sharedrender.Camera, sized from the world (wrap-aware) or the screen, that every renderer draws through.
Note: this is an evolving, pre-1.0 API
Installation
go get github.com/kjkrol/gokebiten
Example
examples/collision-demo — a real-time simulation of thousands of moving, colliding AABBs at a fixed 120 TPS, built entirely on this package plus goke's archetype-based storage and parallel systems.
|
Stats: 2306 colliding AABBs | 120 TPS | 50 collisions/tick |
Stats: 524 colliding AABBs | 120 TPS | 15 collisions/tick |
|---|
Run it locally:
make run
Prerequisites
- Go 1.27+
- Ebitengine dependencies (C compiler and system libraries — Ebitengine uses cgo on most platforms)
Relationship to goke
This package used to live inside goke's examples/ebiten-demo; it has been extracted into its
own repository so goke's core stays free of GUI dependencies while this integration can evolve
(and version) independently. See goke for the ECS engine itself.
License
MIT — see LICENSE.