Explore a tactical hex board
What this teaches
Hex Tactics combines three tanks, a 126-cell authored battlefield, occupancy, Cell Metadata, action previews, and committed revisions. Terrain queries use public read models such as IGridCellBlockerReadModel.
Open and run
Menu path: Tools > Lost Lily > Grid Toolkit > Samples > Open > Hex Tactics.
Enter Play Mode. Use the mouse to select, move, and switch tanks. Use Reset to rebuild the authored battlefield.
Try it
- Select a tank and inspect its highlighted movement range.
- Point at forest, ridge, and blocked terrain and read the status.
- Switch to another tank and compare its available cells.
- Move to a valid open cell.
- Attempt an occupied, blocked, or out-of-range destination.
Checkpoint
A valid move changes the tank position and advances the board revision once. Rejected destinations show a diagnostic and do not advance it. Reset reconstructs all three tanks and the authored terrain state.
How it works
| Scene part | Public system | Responsibility |
|---|---|---|
| Battlefield asset | Hex topology and authored metadata | Defines 126 cells, terrain tags, and blockers. |
| Tank selection | Project gameplay code | Chooses the active structure and derives a movement range. |
| Terrain queries | Cell Metadata read models | Describe blocked, forest, ridge, and open cells. |
| Move transaction | GridActionRunner | Previews and atomically commits a legal move. |
| Board surface | GridBoardView | Resolves hits and renders visual intents. |
Try another variation
In a duplicated scene, change terrain tags, a tank start, or a movement-range rule.
Troubleshooting
| Symptom | Fix |
|---|---|
| All movement looks unavailable. | Select a tank and inspect the first rejection in the status panel. |
| Terrain is visible but not classified. | Check that the Cell Metadata module compiled with the Sample dependencies. |
Related
- Customize board data and rules
- Learn the extension pattern with Cell Metadata
- IGridCellBlockerReadModel
- GridActionRunner
- GridBoardView
Next sample
Continue with Use Inventory across three topologies.