Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ljedrz/hex-spiral

A single-coordinate concentric 2D hex grid.
https://github.com/ljedrz/hex-spiral

Last synced: 25 days ago
JSON representation

A single-coordinate concentric 2D hex grid.

Awesome Lists containing this project

README

        

# hex-spiral
[![crates.io](https://img.shields.io/crates/v/hex-spiral)](https://crates.io/crates/hex-spiral)
[![docs.rs](https://docs.rs/hex-spiral/badge.svg)](https://docs.rs/hex-spiral)
[![dependencies](https://deps.rs/repo/github/ljedrz/hex-spiral/status.svg)](https://deps.rs/repo/github/ljedrz/hex-spiral)

**hex-spiral** is library for working with 2D hexagonal maps using single-coordinate positions.

## Overview

While most hex-grid-based 2D games use multiple coordinates, **hex-spiral** uses a single-coordinate spiral,
where the central hex has the position `0`, and further hexes are placed within theoretical hexagonal rings
that surround it.

## TODO

- [ ] add conversion from hex position to window/screen coordinates
- [ ] add conversion from window/screen coordinates to hex position
- [ ] revise the APIs and data types