Board games have flat objects that can sit atop other flat objects. (The height of things like wooden cubes is basically never relevant in game terms—you can consider them to be flat.)
The arrangement of pieces in pretty much every board game forms a tree, rooted at some game object like a map or a display. Usually these trees are broad and not very deep. (For games which have multiple maps, displays, or whatever, there are multiple trees, so we have a forest, not a single tree.)
When you move pieces, you’re doing surgery on the tree they’re in (and possibly on the tree they’re moving into, if that’s a different one). On the source side of a move, you’re making one or two cuts to a branch of the tree, which bracket what portion of the tree you’re moving. One cut is between a piece and its parent; the other, optional, cut, is between a piece on the branch reachable from the piece after the first cut. On the destination side of a move, you’re making a single cut, where the top and bottom of of the moving fragment will be inserted.
E.g., here is a tree with source cuts marked in red between pieces 0 and 2, and 4 and 6:
and here is the same tree with a destination cut marked in green between pieces 0 and 3:
Finally, here is the tree with the fragment from 2 to 4 moved from where it started, between 0 and 6, to between 0 and 3 instead.
This way of formalizing moves is sufficiently general to capture the moves one typically sees in board games, such as moving a single unstacked piece, moving a piece from one stack to another, moving an entire stack, moving a portion of a stack possibly combining with another stack at the destination, moving a display that has other pieces atop it but not stacked with it.
Notice that this is my first mention of stacking since the post title. The stacking tree maps onto what games tend to consider stacks, but uncomfortably so.
Semantically, in many games, stacks are not the same as a sequence of pieces which are atop one another. Referring back to the first diagram in the example, piece 2 would generally not be considered to be part of a stack. Why? The reason is that stacks are linear, but piece 2 has two children. If you think of piece 2 as a moveable display which has pieces on it, it would be unusual to describe 2, 4, 6 as a stack—though it might be common to describe 4 and 6 as a stack on 2.
For practical reasons, stacks in physical games tend strongly to be of pieces which are the same dimensions, or if not, then declining dimensions from bottom to top. Stacks with small pieces below larger pieces tend to topple over, so physical games are designed to avoid this.
Generally the meaning of a stack in a physical game is that all of the pieces in the stack are in the same location, namely the one below the piece on the bottom of the stack. For these games, that the pieces in the stack are not physically all in the same location is a concession to the fact that two physical objects cannot occupy the same space, so piling them up in the spot they’re intended to be is the nearest option. For some games, the stack order matters, as does the fact that each piece in a stack obscures the face of the piece below it.
This brings me to a question: Is it useful to explicitly represent stacks, in addition to stacking?
V3 has stacks in the save format. Unfortunately they were poorly designed, in that it was possible to get empty stacks on maps in some circumstances. (I believe we fixed this long ago, and it’s something that a properly designed stack type would never allow to begin with.) I had been hoping to represent as game objects in V4 only things which are real objects—which stacks are not. I haven’t worked out to my satisfaction yet how to approach this.


