Click a brush color then click grid cells. Right-click to erase. Auto Layout places R5 center, R4 inner ring, R3 next, farmers outer.

What the grid is for

The Hive Layout Planner is a 13×13 sandbox for planning your alliance's city placement before migration day. Twelve cell types cover the real decisions: R5 and R4 leadership cities, R3 members, farmers, flags, traps, hospitals, barracks, walls, towers and resource buildings. Click a cell to cycle types, sketch the hive, and screenshot the result for your alliance chat — the layout lives entirely in the page, so you can iterate freely without touching the game.

Layout principles worth arguing about

  • Compactness is defense: every empty ring between member cities is marching time defenders lose during a rally on your core.
  • Place leadership where reinforcement travel is shortest — geometrically that is the center, which is also why flags radiate outward from it.
  • Farmers on the rim, fighters in the middle keeps your loot piñatas out of the first wave's path.
  • Coordinate the plan with an actual member list using the Alliance Roster tracker, then time the move with the Kingdom Transfer Calculator if you are changing kingdoms entirely.

How the hive layout calculator works

Draws a 13x13 alliance hive with the ranks arranged in rings around a centre, so members know where to relocate.

Grid size
var GRID_SIZE = 13; — Thirteen tiles square, which is what the layout is designed around.
The centre
var center = Math.floor(GRID_SIZE / 2); — Tile 6,6 — the middle of a 13-wide grid.
R5 in the middle
grid[center][center] = 1; — The leader's tile.
R4 in the first ring
if (dr === 0 && dc === 0) continue; — Every tile adjacent to the centre, skipping the centre itself.
R3 in the second ring
if (Math.abs(dr2) <= 1 && Math.abs(dc2) <= 1) continue; — Two tiles out, skipping everything already filled by the first ring.

This is a layout convention, not a game rule — the game does not enforce where a rank sits. It exists so an alliance can agree on one arrangement instead of negotiating every relocation.

Every expression shown in code above is quoted from js/calc-hive.js, which is the file this page actually runs.