The #definition of COMBINED was done very badly: it was a piece of
[sgt/puzzles] / puzzles.but
CommitLineData
e91825f8 1\title Simon Tatham's Portable Puzzle Collection
2
3\cfg{winhelp-filename}{puzzles.hlp}
4\cfg{winhelp-contents-titlepage}{Contents}
5
6\cfg{text-filename}{puzzles.txt}
7
fccfd04d 8\#
9\cfg{html-contents-filename}{index.html}
10\cfg{html-leaf-level}{1}
11\cfg{html-contents-depth-0}{1}
12\cfg{html-contents-depth-1}{2}
13\cfg{html-leaf-contains-contents}{true}
14
15\cfg{html-single-filename}{index.html}
16\cfg{html-head-end}{<meta name="AppleTitle" content="Puzzles Help">}
17\cfg{html-leaf-level}{0}
e91825f8 18
19\cfg{info-filename}{puzzles.info}
20
21\cfg{ps-filename}{puzzles.ps}
22\cfg{pdf-filename}{puzzles.pdf}
23
24This is a collection of small one-player puzzle games.
25
26\copyright This manual is copyright 2004 Simon Tatham. All rights
27reserved. You may distribute this documentation under the MIT licence.
28See \k{licence} for the licence text in full.
29
b6b0369e 30\versionid $Id$
e91825f8 31
32
33\C{intro} Introduction
34
35I wrote this collection because I thought there should be more small
36desktop toys available: little games you can pop up in a window and
37play for two or three minutes while you take a break from whatever
38else you were doing. And I was also annoyed that every time I found a
39good game on (say) \i{Unix}, it wasn't available the next time I was
40sitting at a \i{Windows} machine, or vice versa; so I arranged that
41everything in my personal puzzle collection will happily run on both.
42When I find (or perhaps invent) further puzzle games that I like,
43they'll be added to this collection and will immediately be available
44on both platforms. And if anyone feels like writing any other front
45ends - Mac OS, PocketPC, or whatever it might be - then all the games
46in this framework will immediately become available on another
47platform as well.
48
49The actual games in this collection were mostly not my invention; I
50saw them elsewhere, and rewrote them in a form that was more
51convenient for me. I do not claim credit, in general, for inventing
52the rules of any of these puzzles; all I claim is authorship of the
53code (or at least those parts of the code that weren't contributed
54by other people!).
55
56This collection is distributed under the \i{MIT licence} (see
57\k{licence}). This means that you can do pretty much anything you like
58with the game binaries or the code, except pretending you wrote them
59yourself, or suing me if anything goes wrong.
60
61The most recent versions, and \i{source code}, can be found at
62\I{website}\W{http://www.chiark.greenend.org.uk/~sgtatham/puzzles/}\cw{http://www.chiark.greenend.org.uk/~sgtatham/puzzles/}.
63
64Please report \I{feedback}\i{bugs} to
65\W{mailto:anakin@pobox.com}\cw{anakin@pobox.com}.
66You might find it helpful to read this article before reporting a bug:
67
68\W{http://www.chiark.greenend.org.uk/~sgtatham/bugs.html}\cw{http://www.chiark.greenend.org.uk/~sgtatham/bugs.html}
69
70\ii{Patches} are welcome. Especially if they provide a new front end
71(to make all these games run on another platform), or a new game.
72
73
74\C{common} \ii{Common features}
75
76This chapter describes features that are common to all the games.
77
78\H{common-actions} \I{controls}Common actions
79
80These actions are all available from the \I{Game menu}\q{Game} menu
81and via \I{keys}keyboard shortcuts, in addition to any game-specific
82actions.
83
84\dt \ii\e{New game} (\q{N}, Ctrl+\q{N})
85
86\dd Starts a new game, with a random initial state.
87
88\dt \ii\e{Restart game} (\q{R})
89
90\dd Resets the current game to its initial state. Undo is lost.
91
92\dt \ii\e{Undo} (\q{U}, Ctrl+\q{Z}, Ctrl+\q{_})
93
94\dd Undoes a single move. (You can undo moves back to the start of the
95game.)
96
97\dt \ii\e{Redo} (Ctrl+\q{R})
98
99\dd Redoes a previous undone move.
100
101\dt \I{exit}\ii\e{Quit} (\q{Q}, Ctrl+\q{Q})
102
103\dd Closes the application entirely.
104
105\H{common-id} Recreating games with the \ii{game ID}
106
107The \q{\i{Specific...}} option from the \I{Game menu}\q{Game} menu
108lets you see a short string (the \q{game ID}) that captures the
109initial state of the current game.
110
111The precise \I{ID format}format of the ID is specific to each game.
112It consists of two parts delimited by a colon (e.g., \c{c4x4:4F01,0});
113the first part encodes \i\e{parameters} (such as grid size), while the
114second part encodes a \i\e{seed}, which determines the \i{initial
115state} of the game within those parameters.
116
117You can specify a new ID (or just a seed) here. Pressing \q{OK} starts
118a new game with the specified ID (whether you changed it or not).
119Pressing \q{Cancel} returns to the current game.
120
121You can also use the game ID (or just the encoded parameters) as a
122\i{command line} argument; see \k{common-cmdline} for more detail.
123
124Game IDs are portable across platforms; you can use a game ID
125generated by the Windows version of a game on the Unix version, etc.
126
127\H{common-type} The \q{Type} menu
128
129The \I{Type menu}\q{Type} menu, if present, may contain a list of
130\i{preset} game settings. Selecting one of these will start a new
131random game with the parameters specified.
132
133The \q{Type} menu may also contain a \q{\i{Custom...}} option which
134allows you to fine-tune game \i{parameters}. The parameters available
135are specific to each game and are described in the following sections.
136
137\H{common-cmdline} Specifying game parameters on the \i{command line}
138
139The games in this collection deliberately do not ever save
140information on to the computer they run on: they have no high score
141tables and no saved preferences. (This is because I expect at least
142some people to play them at work, and those people will probably
143appreciate leaving as little evidence as possible!)
144
145However, if you do want to arrange for one of these games to default
146to a particular set of parameters, you can specify them on the
147command line.
148
149The easiest way to do this is to set up the parameters you want
150using the \q{Type} menu (see \k{common-type}), and then to select
151\q{Specific} from the \q{Game} menu (see \k{common-id}). The text in
152the \q{Game ID} box will be composed of two parts, separated by a
153colon. The first of these parts represents the game parameters (the
154size of the playing area, for example, and anything else you set
155using the \q{Type} menu).
156
157If you run the game with just that parameter text on the command
158line, it will start up with the settings you specified.
159
160For example: if you run Cube (see \k{cube}), select \q{Octahedron}
161from the \q{Type} menu, and then go to the game ID selection, you
162will see a string of the form \cq{o2x2:911A81,10}. Take only the
163part before the colon (\cq{o2x2}), and start Cube with that text on
164the command line: \cq{cube o2x2}.
165
166If you copy the \e{entire} game ID on to the command line, the game
167will start up in the specific game that was described. This is
168occasionally a more convenient way to start a particular game ID
169than by pasting it into the game ID selection box.
170
171\C{net} \i{Net}
172
173\cfg{winhelp-topic}{games.net}
174
175(\e{Note:} the \i{Windows} version of this game is called
176\i\cw{NETGAME.EXE} to avoid clashing with Windows's own \cw{NET.EXE}.)
177
178I originally saw this in the form of a Flash game called \i{FreeNet}
179\k{FreeNet}, written by Pavils Jurjans. The computer prepares a
180network by connecting up the centres of squares in a grid, and then
181shuffles the network by rotating every tile randomly. Your job is to
182rotate it all back into place. The successful solution will be an
183entirely connected network, with no closed loops. \#{Is it also true
184that a correct solution will not contain any cycles?} As a visual aid,
185all tiles which are connected to the one in the middle are
186highlighted.
187
188\B{FreeNet} \W{http://www.jurjans.lv/stuff/net/FreeNet.htm}\cw{http://www.jurjans.lv/stuff/net/FreeNet.htm}
189
190\H{net-controls} \i{Net controls}
191
192\IM{Net controls} controls, for Net
193\IM{Net controls} keys, for Net
194\IM{Net controls} shortcuts (keyboard), for Net
195
196This game can be played with either the keyboard or the mouse. The
197controls are:
198
199\dt \e{Select tile}: mouse pointer, arrow keys
200
201\dt \e{Rotate tile anticlockwise}: left mouse button, \q{A} key
202
203\dt \e{Rotate tile clockwise}: right mouse button, \q{D} key
204
205\dt \e{Lock (or unlock) tile}: middle mouse button, shift-click, \q{S} key
206
207\dd You can lock a tile once you're sure of its orientation. You can
208also unlock it again, but while it's locked you can't accidentally
209turn it.
210
cbb5549e 211\dt \e{Jumble tiles}: \q{J} key
212
213\dd This key turns all tiles that are not locked to random
214orientations.
215
e91825f8 216(All the actions described in \k{common-actions} are also available.)
217
218\H{net-params} \I{parameters, for Net}Net parameters
219
220These parameters are available from the \q{Custom...} option on the
221\q{Type} menu.
222
223\dt \e{Width}, \e{Height}
224
225\dd Size of grid in tiles.
226
227\dt \e{Walls wrap around}
228
229\dd If checked, flow can pass from the left edge to the right edge,
230and from top to bottom, and vice versa.
231
232\dt \e{Barrier probability}
233
234\dd A number between 0.0 and 1.0 controlling whether an immovable
235barrier is placed between two tiles to prevent flow between them (a
236higher number gives more barriers). Since barriers are immovable, they
237act as constraints on the solution (i.e., hints).
238
239\lcont{
240
241The grid generation in Net has been carefully arranged so that the
242barriers are independent of the rest of the grid. This means that if
243you change the \e{Barrier probability} parameter, and then re-enter
244the same game ID you were playing before (see \k{common-id}), you
245should see exactly the same starting grid, with the only change
246being the number of barriers. So if you're stuck on a particular
247grid and need a hint, you could start up another instance of Net,
248set up the same parameters but a higher barrier probability, and
249enter the game seed from the original Net window.
250
251}
252
253\C{cube} \i{Cube}
254
255\cfg{winhelp-topic}{games.cube}
256
257This is another one I originally saw as a web game. This one was a
258Java game \k{cube-java-game}, by Paul Scott. You have a grid of 16
259squares, six of which are blue; on one square rests a cube. Your move
260is to use the arrow keys to roll the cube through 90 degrees so that
261it moves to an adjacent square. If you roll the cube on to a blue
262square, the blue square is picked up on one face of the cube; if you
263roll a blue face of the cube on to a non-blue square, the blueness is
264put down again. (In general, whenever you roll the cube, the two faces
265that come into contact swap colours.) Your job is to get all six blue
266squares on to the six faces of the cube at the same time. Count your
267moves and try to do it in as few as possible.
268
269Unlike the original Java game, my version has an additional feature:
270once you've mastered the game with a cube rolling on a square grid,
271you can change to a triangular grid and roll any of a tetrahedron, an
272octahedron or an icosahedron.
273
274\B{cube-java-game} \W{http://www3.sympatico.ca/paulscott/cube/cube.htm}\cw{http://www3.sympatico.ca/paulscott/cube/cube.htm}
275
276\H{cube-controls} \i{Cube controls}
277
278\IM{Cube controls} controls, for Cube
279\IM{Cube controls} keys, for Cube
280\IM{Cube controls} shortcuts (keyboard), for Cube
281
282This game is played with the keyboard. The arrow keys are used to roll the
283cube (or other solid).
284
285On the triangular grids, the mapping of arrow keys to directions is
286more approximate. Vertical movement is disallowed where it doesn't
287make sense. The four keys surrounding the arrow keys on the numeric
288keypad (\q{7}, \q{9}, \q{1}, \q{3}) can be used for diagonal movement.
289
290(All the actions described in \k{common-actions} are also available.)
291
292\H{cube-params} \I{parameters, for Cube}Cube parameters
293
294These parameters are available from the \q{Custom...} option on the
295\q{Type} menu.
296
297\dt \e{Type of solid}
298
299\dd Selects the solid to roll (and hence the shape of the grid):
300tetrahedron, cube, octahedron, or icosahedron.
301
302\dt \e{Width / top}, \e{Height / bottom}
303
304\dd On a square grid, horizontal and vertical dimensions. On a
305triangular grid, the number of triangles on the top and bottom rows
306respectively.
307
308
309\C{fifteen} \i{Fifteen}
310
311\cfg{winhelp-topic}{games.fifteen}
312
313The old ones are the best: this is the good old \q{\i{15-puzzle}} with
314sliding tiles. You have a 4x4 square grid; 15 squares contain numbered
315tiles, and the sixteenth is empty. Your move is to choose a tile next
316to the empty space, and slide it into the space. The aim is to end up
317with the tiles in numerical order, with the space in the bottom right
318(so that the top row reads 1,2,3,4 and the bottom row reads
31913,14,15,\e{space}).
320
321\H{fifteen-controls} \i{Fifteen controls}
322
323\IM{Fifteen controls} controls, for Fifteen
324\IM{Fifteen controls} keys, for Fifteen
325\IM{Fifteen controls} shortcuts (keyboard), for Fifteen
326
327This game can be controlled with the mouse or the keyboard.
328
329A left-click with the mouse in the row or column containing the empty
330space will move as many tiles as necessary to move the space to the
331mouse pointer.
332
333The arrow keys will move a tile adjacent to the space in the direction
334indicated (moving the space in the \e{opposite} direction).
335
336(All the actions described in \k{common-actions} are also available.)
337
338\H{fifteen-params} \I{parameters, for Fifteen}Fifteen parameters
339
340The only options available from the \q{Custom...} option on the \q{Type}
341menu are \e{Width} and \e{Height}, which are self-explanatory. (Once
342you've changed these, it's not a \q{15-puzzle} any more, of course!)
343
344
345\C{sixteen} \i{Sixteen}
346
347\cfg{winhelp-topic}{games.sixteen}
348
349Another sliding tile puzzle, visually similar to Fifteen (see
350\k{fifteen}) but with a different type of move. This time, there is no
351hole: all 16 squares on the grid contain numbered squares. Your move
352is to shift an entire row left or right, or shift an entire column up
353or down; every time you do that, the tile you shift off the grid
354re-appears at the other end of the same row, in the space you just
355vacated. To win, arrange the tiles into numerical order (1,2,3,4 on
356the top row, 13,14,15,16 on the bottom). When you've done that, try
357playing on different sizes of grid.
358
359I \e{might} have invented this game myself, though only by accident if
360so (and I'm sure other people have independently invented it). I
361thought I was imitating a screensaver I'd seen, but I have a feeling
362that the screensaver might actually have been a Fifteen-type puzzle
363rather than this slightly different kind. So this might be the one
364thing in my puzzle collection which represents creativity on my part
365rather than just engineering.
366
367\H{sixteen-controls} \I{controls, for Sixteen}Sixteen controls
368
369This game is played with the mouse. Left-clicking on an arrow will
370move the appropriate row or column in the direction indicated.
371Right-clicking will move it in the opposite direction.
372
373(All the actions described in \k{common-actions} are also available.)
374
375\H{sixteen-params} \I{parameters, for Sixteen}Sixteen parameters
376
377The only parameters available from the \q{Custom...} option on the
378\q{Type} menu are \e{Width} and \e{Height}, which are
379self-explanatory.
380
381
382\C{rectangles} \i{Rectangles}
383
384\cfg{winhelp-topic}{games.rectangles}
385
386You have a grid of squares, with numbers written in some (but not all)
387of the squares. Your task is to subdivide the grid into rectangles of
388various sizes, such that (a) every rectangle contains exactly one
389numbered square, and (b) the area of each rectangle is equal to the
390number written in its numbered square.
391
392Credit for this game goes to the Japanese puzzle magazine \i{Nikoli}
393\k{nikoli}; I've also seen a Palm implementation at \i{Puzzle Palace}
394\k{puzzle-palace}. Unlike Puzzle Palace's implementation, my version
395automatically generates random grids of any size you like. The quality
396of puzzle design is therefore not quite as good as hand-crafted
397puzzles would be (in particular, a unique solution cannot be
398guaranteed), but on the plus side you get an inexhaustible supply of
399puzzles tailored to your own specification.
400
401\B{nikoli} \W{http://www.nikoli.co.jp/puzzles/7/index_text-e.htm}\cw{http://www.nikoli.co.jp/puzzles/7/index_text-e.htm}
402
403\B{puzzle-palace} \W{http://www.puzzle.gr.jp/puzzle/sikaku/palm/index.html.en}\cw{http://www.puzzle.gr.jp/puzzle/sikaku/palm/index.html.en}
404
405\H{rectangles-controls} \I{controls, for Rectangles}Rectangles controls
406
407This game is played with the mouse.
408
409Left-click any edge to toggle it on or off, or click and drag to draw
410an entire rectangle (or line) on the grid in one go (removing any
411existing edges within that rectangle).
412
413When a rectangle of the correct size is completed, it will be shaded.
414
415(All the actions described in \k{common-actions} are also available.)
416
417\H{rectangles-params} \I{parameters, for Rectangles}Rectangles parameters
418
aea3ed9a 419The \q{Custom...} option on the \q{Type} menu offers you \e{Width}
420and \e{Height} parameters, which are self-explanatory.
421
422\q{Expansion factor} is a mechanism for changing the type of grids
423generated by the program. Some people prefer a grid containing a few
424large rectangles to one containing many small ones. So you can ask
425Rectangles to essentially generate a \e{smaller} grid than the size
426you specified, and then to expand it by adding rows and columns.
427
428The default expansion factor of zero means that Rectangles will
429simply generate a grid of the size you ask for, and do nothing
430further. If you set an expansion factor of (say) 0.5, it means that
431each dimension of the grid will be expanded to half again as big
432after generation. In other words, the initial grid will be 2/3 the
433size in each dimension, and will be expanded to its full size
434without adding any more rectangles.
435
4a03dbb4 436Setting an expansion factor of around 0.5 tends to make the game
437more difficult, and also (in my experience) rewards a less deductive
438and more intuitive playing style. If you set it \e{too} high,
439though, the game simply cannot generate more than a few rectangles
440to cover the entire grid, and the game becomes trivial.
aea3ed9a 441
442\H{rectangles-cmdline} \I{command line, for Rectangles}Additional
443command-line configuration
444
445The expansion factor parameter, described in \k{rectangles-params},
446is not mentioned by default in the game ID (see \k{common-id}). So
447if you set your expansion factor to (say) 0.75, and then you
448generate an 11x11 grid, then the game ID will simply say
449\c{11x11:}\e{numbers}. This means that if you send the game ID to
450another player and they paste it into their copy of Rectangles,
451their game will not be automatically configured to use the same
452expansion factor in any subsequent grids it generates. (I don't
453think the average person examining a single grid sent to them by
454another player would want their configuration modified to that
455extent.)
456
457If you are specifying a game ID or game parameters on the command
458line (see \k{common-cmdline}) and you do want to configure the
459expansion factor, you can do it by suffixing the letter \cq{e} to
460the parameters, followed by the expansion factor as a decimal
461number. For example:
462
463\b \cq{rect 11x11e0.75} starts Rectangles with a grid size of
46411\u00d7{x}11 and an expansion factor of 0.75.
465
466\b \cq{rect 11x11e0.75:g11c6e5e4a2_4e9c3b3d3b5g2b6c4k4g30a8n3j1g6a2}
467starts Rectangles with a grid size of 11\u00d7{x}11, an expansion
468factor of 0.75, \e{and} a specific game selected.
e91825f8 469
470\C{netslide} \i{Netslide}
471
472\cfg{winhelp-topic}{games.netslide}
473
474This game was submitted by Richard Boulton. It combines the grid
475generation of Net (see \k{net}) with the movement of Sixteen (see
476\k{sixteen}): you have a Net grid, but instead of rotating tiles back
477into place you have to slide them into place by moving a whole row at
478a time.
479
e91825f8 480As in Sixteen, \I{controls, for Netslide}control is with the mouse.
481See \k{sixteen-controls}.
482
483\I{parameters, for Netslide}Game parameters are the same as for Net
484(see \k{net-params}).
485
b6b0369e 486\C{pattern} \i{Pattern}
487
488\cfg{winhelp-topic}{games.pattern}
489
490You have a grid of squares, which must all be filled in either black
491or white. Beside each row of the grid are listed the lengths of the
492runs of black squares on that row; above each column are listed the
493lengths of the runs of black squares in that column. Your aim is to
494fill in the entire grid black or white.
495
496I first saw this puzzle form around 1995, under the name
2e1e03ff 497\q{\i{nonograms}}. I've seen it in various places since then, under
b6b0369e 498different names.
499
500Normally, puzzles of this type turn out to be a meaningful picture
501of something once you've solved them. However, since this version
502generates the puzzles automatically, they will just look like random
503groupings of squares. (One user has suggested that this is actually
504a \e{good} thing, since it prevents you from guessing the colour of
505squares based on the picture, and forces you to use logic instead.)
506The advantage, though, is that you never run out of them.
507
2e1e03ff 508\H{pattern-controls} \I{controls, for Pattern}Pattern controls
b6b0369e 509
510This game is played with the mouse.
511
512Left-click in a square to colour it black. Right-click to colour it
513white. If you make a mistake, you can middle-click, or hold down
514Shift while clicking with any button, to colour the square in the
515default grey (meaning \q{undecided}) again.
516
517You can click and drag with the left or right mouse button to colour
518a vertical or horizontal line of squares black or white at a time
519(respectively). If you click and drag with the middle button, or
520with Shift held down, you can colour a whole rectangle of squares
521grey.
522
2e1e03ff 523(All the actions described in \k{common-actions} are also available.)
524
b6b0369e 525\H{pattern-parameters} \I{parameters, for Pattern}Pattern parameters
526
527The only options available from the \q{Custom...} option on the \q{Type}
528menu are \e{Width} and \e{Height}, which are self-explanatory.
e91825f8 529
530\A{licence} \I{MIT licence}\ii{Licence}
531
532This software is \i{copyright} 2004 Simon Tatham.
533
534Portions copyright Richard Boulton.
535
536Permission is hereby granted, free of charge, to any person
537obtaining a copy of this software and associated documentation files
538(the "Software"), to deal in the Software without restriction,
539including without limitation the rights to use, copy, modify, merge,
540publish, distribute, sublicense, and/or sell copies of the Software,
541and to permit persons to whom the Software is furnished to do so,
542subject to the following conditions:
543
544The above copyright notice and this permission notice shall be
545included in all copies or substantial portions of the Software.
546
547THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
548EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
549MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
550NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
551BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
552ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
553CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
554SOFTWARE.
555
556\IM{specific...} Specific..., menu option
557\IM{custom...} Custom..., menu option
558
559\IM{game ID} game ID
560\IM{game ID} ID, game
561\IM{ID format} ID format
562\IM{ID format} format, ID
563\IM{ID format} game ID, format
564
565\IM{keys} keys
566\IM{keys} shortcuts (keyboard)
567
568\IM{initial state} initial state
569\IM{initial state} state, initial
570
571\IM{MIT licence} MIT licence
572\IM{MIT licence} licence, MIT