Towers (Simon Tatham's Puzzles)
Saved games stay in this browser only.
About the puzzle
Towers turns a Latin square into a little city. Every square of the grid gets a tower with a height from 1 to the size of the grid, and each row and column must contain every height exactly once. Around the outside are clues: each one says how many towers you would see if you stood at that point and looked along the row or column. Taller towers hide shorter ones behind them.
The puzzle circulates on the web under several names, Skyscrapers being the most common; Simon Tatham notes that he does not know who first invented it. He added it to his collection in January 2010, and the game draws the towers in 3D, so a finished grid really looks like a skyline.
Rules
- Each row contains every height from 1 to N exactly once.
- Each column contains every height from 1 to N exactly once.
- A clue is the number of towers visible from that side, looking into the grid: a tower is visible if no taller tower stands in front of it.
- On harder or larger grids some towers are given and some clues are missing.
Two examples in a 5x5 grid: a clue of 5 means the heights rise 1, 2, 3, 4, 5 from that side; a clue of 1 means the tallest tower, 5, stands right next to the clue.
Controls
| Input | Action |
|---|---|
| Left click, then a digit | build a tower of that height |
| Left click, then Space | clear the square |
| Right click, then digits | add or remove pencil marks |
| M | fill every empty square with all possible pencil marks |
| Left click on a clue | grey it out as done (click again to restore) |
| Arrow keys | move the cursor |
| Ctrl/Shift+arrow | grey out the clue in that direction |
| Enter | switch the cursor between towers and pencil marks |
| N / U / R | new game / undo / redo |
The game marks a height that repeats in a row or column, and a clue that the towers in its line contradict.
How to solve it
1 and N clues are instant. A 1 puts the tallest tower next to the clue. A clue equal to the grid size fixes the whole line in rising order.
The tallest tower and the clue. The tallest tower can never be closer to a clue than (clue - 1) squares, because at least that many shorter towers have to be visible in front of it. A 3 in a 5x5 grid keeps the 5 out of the first two squares of its line.
What a 2 means. The first tower and the tallest one are always visible, so a clue of 2 says that nothing else shows: every tower between the first square and the tallest must be shorter than the first one.
Opposite clues work together. A clue pair that adds up to N + 1 places the tallest tower exactly: with 2 on one side and 4 on the other in a 5x5 grid, the 5 is in the second square from the 2.
Then it is a Latin square. Once a few towers are fixed, use rows and columns: if a height has only one possible square left in a line, it goes there. Pencil marks (press M) make this easy to track.
Sizes and difficulty
The Type menu offers 4x4 Easy, 5x5 Easy and Hard, and 6x6 at Easy, Hard, Extreme and Unreasonable. Harder levels give fewer clues and need more advanced reasoning; at Unreasonable some backtracking is required, though the solution is unique. Custom sets any size from 3 to 9 and the difficulty. In Preferences you can switch from the 3D towers to a flat 2D display with just the numbers.
Playing here
Click Play to open the puzzle. The menu above the board has New game, Restart, Undo, Redo and Solve (which you can undo to keep going on your own), the Type menu with the sizes, 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 a square and use the number keys that appear below the board; turn on the Mark button to enter pencil marks instead.
Credits and licence
Towers 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.