Cube (Simon Tatham's Puzzles)

Saved games stay in this browser only.

About the puzzle

Cube puts a single die-like block on a small grid with a few blue squares. Each move tips it over one of its edges onto the next square. Whenever the cube lands on a blue square it picks the colour up on its bottom face, and whenever a blue face lands on a plain square it leaves the colour behind. The aim is to end up with every face of the cube blue at the same time.

Simon Tatham based it on a Java web game by Paul Scott, and it was one of the very first puzzles in his collection. His version adds a twist the original lacked: once the cube is mastered, you can roll a tetrahedron, an octahedron or an icosahedron around a grid of triangles instead.

Rules

  • A move rolls the solid over one edge onto a neighbouring square (or triangle).
  • When it lands, the face touching the board and the square underneath swap colours. A blue square under a plain face turns plain and the face turns blue; a blue face on a plain square does the opposite. If both are blue, or both plain, nothing changes.
  • There are exactly as many blue squares as the solid has faces: six for the cube, four for the tetrahedron, eight for the octahedron and twenty for the icosahedron.
  • The puzzle is solved when every face is blue. The status bar counts your moves, so the real challenge is doing it in as few as possible.

Controls

Input Action
Left click roll the solid one step towards the mouse pointer
Arrow keys roll the solid in that direction
7, 9, 1, 3 on the numeric keypad roll diagonally on the triangular boards
N / U / R new game / undo / redo

How to solve it

Keep track of the bottom face. Everything depends on which face is underneath. Rolling four times in a straight line on the square grid brings the same face back to the bottom; rolling one step and back again does too.

Never put a blue face down on a plain square. That throws away work. If the next blue square is several steps away, plan a route that arrives with a plain face underneath, even if it is a step or two longer.

Use detours to change the face. A short loop, such as rolling around a 2x2 block of squares, comes back to the same place with a different face down. That is the main tool for getting a fresh face onto the next blue square.

Pick the order of the squares. Blue squares close together are easy to collect in a row, but the last one or two are usually the hardest, because most faces are already blue. Leave yourself a last square you can reach with the single plain face pointing down.

Then shave moves. Once you can solve it, use Restart and try the same grid again with fewer moves. The counter in the status bar shows how you are doing.

Sizes

The Type menu has the cube on a 4x4 grid, and the tetrahedron, octahedron and icosahedron on triangular grids. Custom lets you pick the solid and the size of the board: width and height on the square grid, or the number of triangles on the top and bottom rows on a triangular one.

Playing here

Click Play to open the puzzle. The menu above the board has New game, Restart, Undo and Redo (this puzzle has no Solve option), the Type menu with the solids, and the Game menu, where you can type in a game ID or a random seed, download the current game as a file, load a saved file and change the preferences. Your game in progress is kept in this browser and comes back with its whole undo history the next time you open the page.

On a touch screen, tap the board on the side you want the solid to roll towards.

Credits and licence

Cube is part of Simon Tatham's Portable Puzzle Collection, written by Simon Tatham with code contributed by several other authors, and distributed with its source code under the MIT licence. This page runs a WebAssembly build made by FredyGames from the author's official source snapshot, with no changes to the puzzle; the source and the build script are hosted with the game, and the licence text is linked from this page.