hexgrid-algorithms

Solve hex grid coordinate conversions, distance, neighbors, rings, and A* pathfinding.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ccalebcarter/purria-skills --skill hexgrid-algorithms
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hexgrid-algorithms
Source: https://github.com/ccalebcarter/purria-skills/tree/main/skills/hexgrid-algorithms
Command: npx skills add https://github.com/ccalebcarter/purria-skills --skill hexgrid-algorithms

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hex grid mathematics and pathfinding for hex-based game maps.

Core Features & Use Cases

  • Coordinate systems support (axial, cube, offset)
  • Distance, neighbors, rings, pathfinding (A*)
  • Hex map utilities (ring generation, area effects, conversions)
  • Rendering helpers and coordinate conversions for hex grids Use cases include building hex-based strategy maps, calculating movement ranges, and implementing hex-based spells or effects.

Quick Start

Implement a hex distance function and an A* pathfinding call to navigate a hex grid.

Frequently Asked Questions about hexgrid-algorithms

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate distance and find neighbors on a hex grid?

Hex grid distance and neighbor lookups require axial or cube coordinate systems to measure spatial relationships. This skill computes hex distance metrics and neighbor queries, enabling accurate movement range and area effect calculations on hex-based maps.

What is the best way to convert between axial, cube, and offset hex coordinates?

Converting between axial, cube, and offset hex coordinates is necessary for rendering and interoperability across different hex map systems. This skill provides robust coordinate conversions to translate hex positions accurately between these mathematical representations.

Can I implement A* pathfinding for a hex-based strategy game map?

A* pathfinding for a hex-based strategy game map navigates hex grids using coordinate distance heuristics and neighbor lookups. This skill applies A* pathfinding logic to calculate optimal movement paths across valid hex tiles.

How do I generate rings and area effects on a hex map?

Generating rings and area effects on a hex map uses coordinate distance and neighbor expansion from a center hex tile. This skill performs ring generation to define spatial radii for hex-based spells, effects, and visual range calculations.

Does this hex grid math approach support rendering helpers for game development?

Hex grid math for game development includes rendering helpers that translate axial, cube, or offset coordinates into visual pixel positions. This skill provides coordinate conversions to assist with rendering hex maps during game implementation.