Hexa-tile game specs

There are several games on android all around one concept: Stack hexagonal tiles to the count 10 and do so before the board fills up. There are multiple names and board variations; hexa-tile, hexa-stack, hexa-crush etc. I want to recreate this game for C++ (later UNREAL). All of the games have levels of accolishment and levels of difficulty. I just want one board. Standard 24 place board. Look closely at the rules and explain in detail the specifications. DO NOT WRITE CODE YET. Just the spec sheet and task list

Excellent — we’re in “spec mode.” Here’s a detailed breakdown of the **Hexa-Tile (10-Stack) Game Specification** — drawn from analysis of the genre’s core mechanics and distilled into a clear technical plan for your C++ → Unreal implementation pipeline.

## 🎯 Game Overview

**Working Title:** *Hexa Stack 10*
**Core Loop:**
Drop or place numbered hexagonal tiles (1–9) onto a hex board. When the sum of adjacent or overlaid tiles equals **10**, those tiles clear. New tiles spawn and the board refills. The game ends when there are no valid moves left.
**Goal:**
Survive as long as possible and score by repeatedly forming sums of 10.

## 🧩 Board & Layout

| Parameter | Description |
|————|————–|
| Shape | Hexagonal honeycomb grid (flat-topped hexes) |
| Total Cells | 24 playable cells (arranged roughly in a 4-ring honeycomb around center) |
| Coordinates | Axial or cube coordinates recommended for math clarity (q, r or x,y,z) |
| Adjacency | Each cell has up to 6 neighbors |
| Board State | Array or map storing cell: `{position, value, occupied}` |

Visualized (conceptually):
“`
o o o
o o o o
o o o o o
o o o o
o o o
“`
(*centered 24-hex layout*)

## 🔢 Tile Properties

| Property | Description |
|———–|————–|
| Value | Integer 1 – 9 |
| Color | Optional hue gradient mapped to value (e.g., blue→red scale) |
| State | `static` (placed) or `falling/merging` during animation phase |
| Stack Behavior | New tile may land on existing tile — their values add |
| Limit | If sum > 10 → break rule (blocked) or auto-collapse depending on variant |

## ⚙️ Rules & Logic

### 1. **Placement**
– Player selects a location (tap or click) for the incoming tile.
– Tile can stack if cell already occupied **and total ≤ 10**.
– If total > 10 → invalid move or discard (depending on mode).

### 2. **Clearing**
– When any cell or *connected group* sums exactly to **10**, all involved tiles disappear.
– Example:
– Single tile reaches 10 from stack accumulation → clear.
– Chain of adjacent tiles (values adding to 10 collectively) → clear together.
– After clearing, all tiles above drop down or slide inward to fill gaps.

### 3. **Combo / Cascade**
– After a clear, re-evaluate board for any new 10-sums (cascade combo).
– Score multipliers apply for each sequential clear in one move.

### 4. **Game Over**
– Triggered when:
– No empty cells remain **and** no valid stack move exists (i.e., every stack > 10).
– Optionally: allow “discard tile” with penalty to prolong game.

## 🧮 Scoring System

| Action | Points |
|———|——–|
| Tile placed | +1 |
| 10-Clear (single) | +10 |
| Combo chain | + (10 × combo level) |
| Overflow discard | −5 |
| Bonus for board clear | +100 |

## 🔄 Game Flow

1. **Initialize board** → empty 24-hex grid.
2. **Spawn next tiles** (usually 1–3 visible in queue).
3. **Player places tile** → validate move.
4. **Resolve merges / clears / cascades.**
5. **Spawn new tile(s)**.
6. **Check for valid moves.**
7. **Repeat until game over.**
8. **Show score / restart option.**

## 🧠 Difficulty Parameters

| Parameter | Effect |
|————|——–|
| Tile spawn bias | Weight certain values (e.g., 1-9 uniform, or biased to mid-range) |
| Number of preview tiles | 1 – 3 |
| Allow stacking over 10? | Easy: capped; Hard: invalid move |
| Combo multiplier | Increasing per cascade |
| Random events | Occasionally spawn special tile (wild = set to any number, bomb = clear region, etc.) |

## 🎨 Visual / UX Concepts

– **Hex board** static mesh or drawn grid.
– **Tiles**: simple hex sprites or meshes with number overlay.
– **Animations**: popping or dissolving when clearing, gentle drop on placement.
– **HUD:**
– Current score
– Upcoming tiles
– Restart / quit

## 🧱 Technical Task Breakdown (C++ baseline)

| Task | Description |
|——|————–|
| 1 | Define board data structure (hex grid class) |
| 2 | Implement tile struct/class with `value`, `state`, `position` |
| 3 | Build tile placement validation logic |
| 4 | Implement “sum to 10” detection algorithm (local & group sums) |
| 5 | Add cascading resolve loop |
| 6 | Create score tracker & combo multiplier |
| 7 | Build random tile generator with spawn weighting |
| 8 | Implement game-over detection |
| 9 | Add input system for selecting cells (mouse/touch) |
| 10 | Add simple console or 2D render output for prototype |
| 11 | Prepare for Unreal port (USTRUCTs, UObjects, data-driven grid, Blueprint interface) |

## 🧩 Unreal Adaptation Notes (later phase)

– Use **UHexTileComponent** or **AHexTileActor** for tile units.
– Board managed by **AGridManager** with TArray of pointers or coordinate map.
– Interface via **UMG widget** for HUD and tile selection.
– Implement logic in C++ but expose tile spawn / animation to Blueprints.
– Could integrate **Niagara** for clear effects.
– Later: procedural difficulty scaling (DataTable-driven).

Would you like me to draft a *system diagram* next — something showing the class hierarchy and state flow (BoardManager → Tile → PlayerInput → GameState)? It’ll serve as the bridge between this spec and your first lines of C++.