Phaser AE

Hex stack sorting

Pro packv3.0.0-0GridNew

The rules of the hex stack sorting puzzle, with the mechanics found in games like Hexa Sort and Hexa Stack. You draw the board and the stacks; the pack decides every merge, every clear and every chain, and hands you the events in order.

This is a Pro pack. Upgrade to Phaser Pro to use it in your games.See Phaser Pro →

Released October 24, 2026

Hex stack sorting: a screenshot of its demo
A note about these graphics

Expansion packs don't come with graphics. This screenshot is one way of drawing what the pack does, made for its demo: none of the sprites, tiles or backgrounds in it are in the pack.

That's by design. A pack is a game's logic, mechanics and effects, and it works with whatever art you give it. Some packs draw effects, backdrops or 3D scenes of their own, but none carries a game's sprites.

So the look is yours. Make the art on phaser.io, bring your own, or let your agent draw it in code: the same pack can look like anything.

What it does

You are dealt a hand of stacks of coloured hex tiles and place each one on an empty cell. Stacks that touch and share a top colour gather those tiles onto one stack, and the colour each one uncovers is checked against its own neighbours, so a single placement can set off a chain. When a stack's top run of one colour reaches the clear length, ten by default, it clears and scores its tiles times its place in the chain. The level is lost when the next stack has nowhere to go.

A placement resolves at once into a list of events: the stack placed, each run of tiles moving from one cell to another, each clear with its chain and points, cells unlocking, a new hand dealt, a win or a loss. Your presenter plays them back at whatever pace suits it, and a preview of any placement costs nothing, which is how hints and drop previews work.

Features

  • Hex boards — hexagonal and rectangular shapes or any list of cells, with helpers from cell to point and back.
  • Chains — merges and clears run on until nothing touching matches, with points that multiply down the chain.
  • Two ways to gather — onto the longest run, or always onto the stack just placed.
  • Locked cells and starting stacks — cells that open after so many tiles cleared, and stacks already in place.
  • A widening deal — colours join the deal as tiles are cleared, with seeded stack heights and colour runs.
  • Hands — one to five stacks, refilled when all are placed or one at a time.
  • Boosters and a continue — take a stack off, deal a new hand, and clear the tallest stacks after a loss.
  • Hints and a level ladder — the best placement now, a player that finishes levels, and graded levels by number.

Good for

  • A Hexa Sort style puzzle — the defaults are a hand of three and a clear at ten.
  • Endless high-score play — no goal, a widening palette and chains to chase.
  • A level campaign — goals, locked cells and starting stacks, with level-saga for the map and lives.
  • Relaxed and tense variants — a short clear length and a big board, or a long one and a small board.

Make it yours

The board, locked cells, starting stacks, colours and their schedule, stack heights and runs, clear length, which stack gathers, hand size, refill rule and goal are all configuration. A round board of 37 cells with four colours, a clear at ten and a hand of three is one game; a rectangle with locked cells, six colours, a clear at six, two-stack hands refilled one at a time and every merge onto the placed stack is another.

A quick look

Make the fifth level of the ladder and place the first stack.

const level = hexaSort.hexaSortLevel(5, { colors: ['#ff4d6d', '#ffd23f', '#3ec1ff', '#6bdb5a', '#b06cff'] });
const play = hexaSort.createHexaSort(level);
const result = play.place(0, 1, -1);
for (const e of result.events) if (e.type === 'cleared') burst(e.cell, e.color, e.chain);

Works with

Good to know

  • It is headless: your presenter draws the stacks and animates each move.
  • Deals are seeded but not solved, so a level can be lost however well it is played, as in the games it follows.
  • Which stack gathers the tiles differs between published games, so it is a setting.

More Grid packs

Show all →