About

Rolling Dice

The die moves one square at a time. It does not slide: it tips exactly 90 degrees over the bottom edge in the direction it travels, so it always comes to rest in the middle of a square. The square it leaves keeps the number that was facing down. On a computer use the arrow keys or WASD, or drag on the canvas; on a phone, swipe the way you want it to go. The view itself turns with a right-drag and zooms with the wheel; on a phone, pinch to zoom and move both fingers to turn it.

Opposite faces add up to 7. The face opposite 1 is 6, opposite 2 is 5, opposite 3 is 4, and rolling never changes that. So the face underneath tells you the face on top, and once the top and the bottom are known, the remaining four are standing around the sides.

Keep rolling in the same direction and the face underneath returns to the same number every four squares. The two faces on the axis of the turn stay on their sides and never come down; rolling left and right, those are the near and far faces. Four rolls bring the whole die back to its original orientation, so the numbers left on the floor repeat every four squares as well.

Change direction and a different pair of faces becomes the axis, so a different four faces take turns underneath. Working out which face is down after a given number of rolls is just these two cycles combined. Reading the numbers left behind shows where the direction changed and which face came down at each step.