Gruid

From RogueBasin
Jump to: navigation, search
gruid
Library project
Developer anaseto
Released Dec 24 2020 (Alpha)
Updated Feb 22 2021 (Beta)
Status Beta
Licensing ISC (BSD-like)
P. Language Go
Platforms Linux, OpenBSD, Windows, Mac OS X, Browser
Dependencies tcell or SDL or browser (none)
Official site of gruid


The gruid module provides packages for easily building grid-based applications in Go. The library abstracts rendering and input for different platforms, and provides packages for common roguelike development needs.

The core gruid package uses a convenient and flexible architecture of updating a model in response to messages strongly inspired from the bubbletea module for building terminal apps, which in turn is based on the functional Elm Architecture. The architecture has been adapted to be more idiomatic in Go in the context of grid-based applications: less functional and more efficient.

Features

  • Three drivers: terminal (using tcell), SDL2 and browser (using wasm). Fast rendering.
  • Support for both ASCII and Tiles.
  • Update on message then draw architecture based on the Elm architecture.
  • A convenient grid slice type for manipulating the screen contents.
  • Pathfinding algorithms: A*, JPS, Breadth first, Dijkstra and connected components.
  • Two complementary field of view algorithms: symmetric shadow casting and a custom algorithm allowing for non-binary vision.
  • Configurable cellular automata cave and randow walk map generation algorithms.
  • An event priority queue.

Use in Roguelikes

The stealth roguelike Harmonist uses gruid.

Personal tools