AqwaborEngine

module
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2026 License: Apache-2.0

README

Aqwabor

A 2D game engine in Go, developed alongside the games built on it.

Pure Go, CGO_ENABLED=0, rendering through gogpu on WebGPU. macOS and Linux are the targets that have to be right; Windows is a "well, it works" tier.

w := ecs.NewWorld()
pos := ecs.MustRegister[Position](w)

e := w.Create()
pos.Set(e, Position{X: 1})
pos.Wake(e)

pos.Each(func(e ecs.Entity, p *Position) { p.X++ })

Three things a caller touches, and everything else is behind them:

Window  = a surface, a device, a frame callback
GPU     = Begin, SetCamera, Draw*, End
World   = entities, plain components, and what is awake

The idea the rest follows from is that storage and scheduling are separate. A component store says where a value lives; it does not decide who runs. What runs is the awake partition of a store, a timer coming due, or a set a system keeps for itself — so a world where nothing is happening costs close to nothing, rather than costing a scan to find that out.

Documentation

docs/INDEX.md says which file answers which kind of question. docs/ecs.md is the one to read first.

Building

go build ./...
go test ./...
go run ./cmd/aqwabor

Releasing

A pushed semver tag is the release; there is no publish step. See docs/releasing.md, and read it before cutting one.

Directories

Path Synopsis
cmd
aqwabor command
Package ecs provides an Entity Component System for the AqwaborEngine.
Package ecs provides an Entity Component System for the AqwaborEngine.
examples
celldemo command
Command celldemo draws the compact cell layer: a grid where a cell's colour is a palette index rather than an RGBA value.
Command celldemo draws the compact cell layer: a grid where a cell's colour is a palette index rather than an RGBA value.
mapdemo command
Command mapdemo loads a vector world map and renders it with camera pan/zoom.
Command mapdemo loads a vector world map and renders it with camera pan/zoom.
mapview
Package mapview provides a pannable/zoomable image widget for displaying large maps inside a viewport.
Package mapview provides a pannable/zoomable image widget for displaying large maps inside a viewport.
scenedemo command
Command scenedemo draws a world through the ECS and nothing else.
Command scenedemo draws a world through the ECS and nothing else.
Package input provides a high-level, ergonomic input system.
Package input provides a high-level, ergonomic input system.
backend/gogpu
Package gogpu adapts the gogpu application event model to the input system.
Package gogpu adapts the gogpu application event model to the input system.
backend/headless
Package headless provides an injectable Backend for the input system.
Package headless provides an injectable Backend for the input system.
Package logx is a very thin logging wrapper around zerolog.
Package logx is a very thin logging wrapper around zerolog.
Package render provides a GPU-driven render submission layer.
Package render provides a GPU-driven render submission layer.
Package sound provides a small, engine-style audio API with a custom mixer and pure-Go (no CGO) output backends.
Package sound provides a small, engine-style audio API with a custom mixer and pure-Go (no CGO) output backends.
Package triangulate provides ear-clipping triangulation for closed ring polygons.
Package triangulate provides ear-clipping triangulation for closed ring polygons.
Package ui is a thin façade over github.com/gogpu/ui (+ desktop, gg) that hides the bootstrap boilerplate (NewApp → ui/app.New → SetRoot → desktop.Run, plus the blank gg/gpu import) behind one small public surface.
Package ui is a thin façade over github.com/gogpu/ui (+ desktop, gg) that hides the bootstrap boilerplate (NewApp → ui/app.New → SetRoot → desktop.Run, plus the blank gg/gpu import) behind one small public surface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL