What it does
The player drags through neighbouring pieces and lets go. In colours mode, two or more pieces of one colour clear, and if the path closes into a loop every piece of that colour on the board clears with them. In numbers mode the path starts with two equal numbers and goes on through numbers equal to the last or double it, and the chain becomes one number where it ends, the sum rounded up to a power of two.
Pieces above fall straight into the gaps and new ones are dealt into the top from the seed. In colours mode a level has goals to collect and a move limit, and a board with no link left shuffles itself. In numbers mode the game is endless: as your best number grows, the smallest numbers stop being dealt and leave the board, and the game ends when no two neighbours match.
Features
- Path checking — adjacency, matching, revisits and loops, with a reason for every refusal while the player drags.
- Loops — a closed path clears every piece of its colour, and the refill after it skips that colour.
- Number chains — equal or doubled steps, merged by sum rounded up, rounded down, or the biggest doubled.
- Gravity and refill — falls and spawns as events with their cells, ready to animate.
- A rising deal — numbers mode raises the smallest number dealt as the best grows.
- Goals and moves — collect so many of each colour within a move limit, or play unlimited.
- Hints and shuffles — the best link by a bounded search, and a shuffle that keeps a link possible.
- Presets — a dot level ladder by number and a standard numbers board.
Good for
- A Two Dots style level game — colours, loops, goals and a move limit.
- A 2248 style endless climb — diagonal links, rounded merges and a rising deal.
- A daily puzzle — a fixed seed gives everyone the same board and the same refills.
- A minigame inside something bigger — a few moves of linking to charge a power or open a door.
Make it yours
Board size, adjacency, colours, loops and the loop refill, goals, moves, the merge rule, the range of numbers dealt and when it rises, a starting board and what a stuck board does are all configuration. A 6 × 6 board of four colours with loops, two goals and twenty moves is one game; a 5 × 8 board of numbers with diagonal links, rounded-up merges and no move limit is another.
A quick look
Make the fourth dot level and link a path the player traced.
const play = chainLink.createChainLink(chainLink.dotLevel(4, ['#ff4d6d', '#ffd23f', '#3ec1ff', '#6bdb5a']));
const path = [{ x: 0, y: 5 }, { x: 1, y: 5 }, { x: 1, y: 4 }];
if (play.check(path).ok) for (const e of play.link(path).events) animate(e);
Works with
level-saga— a level map, lives and boosters around the dot levels.match3— for swapping pieces to make lines instead.slide— for sliding numbers to merge instead.
Good to know
- It is headless: your presenter draws the board, the line the player drags and the falls.
- There are no obstacles or special pieces yet; pieces only fall straight down.
- The hint search is bounded, so on a big board it can miss the very longest path.






