Skip to content

[Secondary] Refactor Grid System from Quad/Square to Hexagonal Tiles #11

Description

@MeriAlguero

[Secondary] Refactor Grid System from Quad/Square to Hexagonal Tiles

Priority: Secondary / Refactor
Labels: refactor, grid, gameplay, secondary

Summary

Refactor the current square/quad 8x8 grid into a hexagonal grid system. Update tile spawning, spatial layout, neighbor detection, and distance calculations to use hex coordinates (axial or cube coordinates).

Tasks

  • Replace square cube tiles with 3D Hexagon primitive models or procedural hex meshes.
  • Update grid generation logic (GridManager) to offset odd/even rows (or columns) using point-top or flat-top hexagon layout spacing.
  • Update tile coordinate tracking from standard Cartesian $(X, Y)$ to Hexagonal Axial $(q, r)$ or Cube $(q, r, s)$ coordinates.
  • Replace Manhattan distance calculation with Hexagonal distance formula:
    Distance = (Abs(q1 - q2) + Abs(r1 - r2) + Abs(s1 - s2)) / 2
  • Update target tile highlighting and unit movement to validate paths across 6 adjacent hex directions instead of 4/8 quad directions.

Acceptance Criteria

  • Grid spawns as a seamlessly aligned hexagonal layout without overlapping or gaps.
  • Selecting a player highlights valid movement hexes based on 6-directional movement.
  • Hex distance math correctly restricts movement range according to character movement stats.
  • Unit positioning correctly snaps to the center of target hex tiles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions