The game Sokoban, which in Japanese means warehouse keeper, was invented by Hiroyuki Imabayashi in 1980. The warehouse keeper must push boxes to designated positions. The area in which he operates is effectively a maze, and is viewed from above. He can only push a single box at a time. He cannot pull. He cannot climb over boxes. He can only move up, down, left, right. Players control the movement of the man using the arrow keys and mouse. A puzzle is completed when all boxes are in the designated locations. In the pzl version, using the default skin, the boxes are represented by blue stars and the designated positions by concentric circles.
The object of the game is to push all the stars onto the targets marked by concentric circles. The program contains 600 built-in puzzles (maps) divided into 10 sets. When the program is started it will load a map. Use the keyboard arrows to move the man and hence push the stars onto the targets. Pulling does not work. If a clear path exists the man can also be moved to a square by clicking it with the left mouse button. Moves can be undone using the Backspace key. To restart a map hit the Enter key.
At the top of the display is a Toolbar with 4 buttons and, to their right, three numbers. The puzzle icon at the left of the Toolbar is a menu which contains options for configuring the game, selecting maps sets and loading external map sets from files. The little man icon next to the menu button loads the next map. The meaning of "next map" depends on the choice set for the "Map selection Mode" option in the puzzle menu. It will either load the next map in the set, the next map the player has not yet solved, or a randomly chosen map. Next to the little man is a sad smiley which, when clicked, will display a built-in animation of a solution for the puzzle. The happy smiley only becomes active when the player has solved a puzzle. When active it will display an animation of the players best (ie fewest moves) solution for the puzzle. Players best solutions are automatically saved to disk so the program always knows what they are. The puzzle menu also has an option to set the animation speed, to display information about the current map, to set the skin, and to save the current settings.
To the right of the happy smiley is a box containing the current map number. This box can also be used to enter the number of a puzzle for the game to load. Hitting "Enter" will load the puzzle. This also serves as a way of restarting the current puzzle: just hit "Enter". To the right of the puzzle number is a value which counts the number of moves made for the current puzzle. Right again is a clock which ticks every 5 seconds.
Sokoban Worked Example
A video from sokoban. The user chooses puzzle 0. She then places the cursor where she wants the man to move to and clicks. The man finds his way there and she clicks the arrow key to move the man and he shoves the case one square. She continues to do this until the case is in the designated position. Next she selects another puzzle and clicks on the lefthand "Show solution". This solution is built into the program for all its 600 standard puzzles. The program shows an animation of the built in solution. The other "Show solution" button is for the solutions found by the player:once they have solved a puzzle the program remembers their best solution and will replay it when this button is clicked.
Using External Map Sets
Very large numbers of maps sets are available for download from various web sites. The 600 maps built into the game could be regarded as an introduction and players will find their own favourite map set authors and download their work. The symbols used to encode the maps are standard, though there is some variation in how their titles are written. The program can read in map sets written in the format shown here. The map set will be added to the list of internal maps (for the current session only) and will appear at the bottom of the cascading menu in the map set selection menu. Any number of map sets can be added and will simply be appended to the end of the list.
Skin Example 1
A screenshot from sokoban showing a retro skin. Sokoban maps contain seven symbols to define the seven possible states of the grid: passages (" "), walls ("#"), the man("@"), the boxes to move("$"), their destination ("."), the man above the destinations ("+") and the boxes above the destinations ("*"). The program has to represent these symbols as images and here we see a skin example in which the images chosen match the symbols used in the map definitions
The figures shown above all use the pzl sokoban default images for the seven states that need to be represented in the grid. The adjacent figure uses a "custom skin". The term "skin" applies to the graphical appearance of the game. A skinnable game, like pzl sokoban, allows the use of customizable components to create the way it looks.
As installed, sokoban has 2 "skins", the one shown in the majority of figures on this page, and named "large" in the skins menu, and another named "small" which uses the same iconography but scaled down by a factor of 2. In addition, sokoban also allows players to define their own skins.
However, those wanting such superficial gratification have to work for it:
these users are required to provide the program with seven image files in
one for each of the seven states; and the files must contain images of identical size; and they must be placed in a separate directory:
For example, for user pzl_support, the retro skins are in directory
In the program the skins menu will name the skin after the directory, so in this case "retro". And, as a further complication, corresponding to the traditional map symbols, the files must have specific names: space.gif, hash.gif, at.gif, dollar.gif, dot.gif, plus.gif, star.gif.
In the accompanying video we show the program providing a solution of a puzzle with an ugly user-chosen skin.