Building a game's rules before its graphics
We've started building our first game in earnest: Stacked! 2048, a one-handed puzzle where you drop numbered tiles into a column, merge matching ones, and set off chains. It's the first of the fifty to go from a finished design into real, running code.
We didn't start with art or animation. We started with the rules — and with a way to prove they're right. The heart of the game is a small, plain piece of logic with no graphics attached at all: a board, the act of dropping a tile, the way tiles merge. Because it carries no graphics, we can run it thousands of times a second and check every rule automatically, in well under a second.
That's deliberate. The rules are the part that has to be exactly right — fair, predictable, the same for everyone. Graphics can change late in the day; a subtly wrong rule quietly poisons everything built on top of it. So the first step was the unglamorous one: the project bookkeeping, and a small test harness that runs the rules and tells us, every time, whether they still hold.
This is the first in a short series on building that engine. The next entries walk through the board, the chains, and why the same starting point always produces the same game.