glonk
A terminal rendering engine for Go. Draw 2D, 3D, or both in the same frame, using plain terminal cells.
Early and pre-1.0: the API may change.
What it does
- 2D: cells with colors and text attributes, lines, boxes, text and sprites.
- 3D: wireframe or shaded meshes through a perspective camera, lit by directional, ambient and point lights, faceted or smooth.
- Models: shapes, and OBJ files with the colors of their materials.
- Half blocks: a pixel canvas with twice the vertical detail, shaded by color.
- Input and testing: held keys and one-shot presses, and a whole game can be driven without a terminal.
Install
go get glonk.dev
Requires Go 1.26 or newer. glonk has no package at its root, so import glonk.dev/engine (and glonk.dev/mesh for 3D) and run go mod tidy once; without it go run stops with a missing go.sum entry.
Try it
git clone https://github.com/kyrokohan/glonk
cd glonk
make run EXAMPLE=./examples/viewer