Difference between revisions of "Gruid"

From RogueBasin
Jump to navigation Jump to search
(update gruid version)
(update gruid version to latest)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
|developer = [[user:anaseto|anaseto]]
|developer = [[user:anaseto|anaseto]]
|released = Dec 24 2020 (Alpha)
|released = Dec 24 2020 (Alpha)
|updated = Feb 22 2021 (Beta)
|updated = Aug 23 2023 (Beta v0.23.0)
|dependencies = tcell or SDL or browser (none)
|dependencies = tcell or SDL or browser (none)
|status = Beta
|status = Beta
Line 8: Line 8:
|language = [[Go]]
|language = [[Go]]
|platforms = [[Linux]], [[OpenBSD]], [[Windows]], [[Mac OS X]], [[Browser]]
|platforms = [[Linux]], [[OpenBSD]], [[Windows]], [[Mac OS X]], [[Browser]]
|site = https://github.com/anaseto/gruid
|site = https://codeberg.org/anaseto/gruid
}}
}}


Line 28: Line 28:
== Use in Roguelikes ==
== Use in Roguelikes ==


The stealth roguelike [[Harmonist]] uses gruid.
The stealth roguelike [[Harmonist]] uses gruid. Recent [[Boohu]] versions were updated to use gruid for pathfinding and FOV.

Latest revision as of 07:18, 22 May 2024

gruid
Library project
Developer anaseto
Released Dec 24 2020 (Alpha)
Updated Aug 23 2023 (Beta v0.23.0)
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. Recent Boohu versions were updated to use gruid for pathfinding and FOV.