Jeff Godfrey - tkSokoban is a tcl/tk version of the Sokoban puzzle game. It contains several advanced features including keyboard and mouse control, automatic path finding, unlimited undo, level statistics, and "skinable" levels. It includes 250 levels and some pretty decent graphics.Download it as a starkit here:http://tcl.tk/starkits/tksokoban.kit

tkSokoban 0.71 ReadMe
LicenseCopyright (c) 2001, Jeff Godfrey (jeff_godfrey _at_ pobox _dot_ com)This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.Requirementstcl/tk 8.3 or newerGeneraltkSokoban is a quick and dirty hack of a game better known as Sokoban. There are numerous incarnations of this game available on the net along with history, background, hints, and strategies. Because of this, this document will not go into these areas. It was written using tcl/tk 8.3.2 under Win98.InstallationJust unwrap the archive into the directory of your choice ensuring that the original directory structure is maintained.ObjectiveThe objective of the game is to place all objects (green balls) on top of their storage locations (recessed cells) by pushing them with the player (blue ball). The objects cannot be pulled - they can only be pushed and only one object can be moved at a time. Once all the objects are in a valid storage location, the level is complete.Note: The above "character" descriptions are only valid when using the default skin.Player ControlsThe player can be moved with the keyboard or the mouse. The following keyboard input is accepted:
- Up Arrow - Move up 1 cell
- Down Arrow - Move down 1 cell
- Left Arrow - Move left 1 cell
- Right Arrow - Move right 1 cell
- Ctrl-Z - Undo last move
- Ctrl-R - Restart current level
- Ctrl-A - Load "A"ny level
- Ctrl-P - Load "P"revious level (if available)
- Ctrl-N - Load "N"ext level (if available)
- Ctrl-C - Insert checkpoint into undo stack (see Ctrl-B for use)
- Ctrl-B - Undo all moves back to last checkpoint
- Left Click - Move player or object to the selected cell (if possible)
- Right Click - Undo last move (same as Ctrl-Z)
- Middle Click - Insert checkpoint into undo stack (same as Ctrl-C)
- Ctrl-Right Click - Undo all moves back to last checkpoint (same as Ctrl-B)
- Is the target cell orthogonal to the player's current position?
- Is the target cell empty?
- Is there exactly 1 object between the player and the target cell?
- Are all other cells between the player and the target cell empty?
The owner of the site graciously granted me permission to include these levels. If you are interested, there are over 1000 more on his site.The original author of each level (if included in the file) should be displayed on the left end of the status bar.The "Next Level" and "Previous Level" logic is based on the next and previous level name as it would be found in an alphabetical list.The maximum level dimensions are 24 wide x 20 high.SkinsThe graphics used in tkSokoban are just small GIF images found in sub-folders beneath the "skins" folder. Feel free to replace them with your own. Creating the provided skins actually took me longer than writing the game! I am apparently somewhat less talented with PhotoImpact than tcl/tk (?). There are 7 images in all and the only requirement is that you do not change the filenames. The default images are 30x30 pixels, although you can change this to suit your preferences (although ALL images are assumed to be the same size...).The image definitions are as follows:- none_normal - empty normal cell
- none_storage - empty storage cell
- player_normal - player on normal cell
- player_storage - player on storage cell
- object_normal - object on normal cell
- object_storage - object on storage cell
- wall_normal - wall cell
(try [1])Things To Do (in no particular order)1. Clean up and reorganize the code. tkSokoban was written in haste just "to see if I could". Toward the end of the development, when I wanted to add some of the "nifty" features, I realized that the design (or lack there of) didn't lend itself well to what I wanted. Due to this, some of the code is kind of kludgy and needs to be reworked.2. Speed up the "findShortestPath" routine. This routine is called recursively and can get somewhat slow if a level contains large empty spaces (although in practice, most levels do not).3. Add a level editor - this shouldn't be too difficult...4. Flood fill the interior of the map before rendering it. Some of the available levels are created somewhat strangely (IMHO). That is, a SPACE is supposed to represent an EMPTY cell in the map, but many of the maps also use a SPACE as padding outside the map walls. See "level108" as an example. This causes the renderer to draw empty cells OUTSIDE the map walls. Although this doesn't really cause any problems, I think it looks bad. Flood filling the empty cells of the map's interior with a different character prior to rendering would avoid the problem altogether.5. Maintain some solved level information - what levels have been solved, the move and push counts, etc...(Partially completed in this version by Keith Vetter)6. Maintain some "state" information between invocations (current level, current skin, etc...)(Partially completed in this version)Known ProblemsNone that I know of, but I'm sure some exist...MRS I tried it and it gave me errors like Tk wasn't present. Then I started tclkit manualy, made apackage require Tk source tksokoban.kitand it worked. Seems that the package require is missing in the file.
VK It appears that when images are reduced this game runs on PocketPC perfectly. (with a minor menu trick). I am very fond of this fact, and thanks for good implementation.
arjen - 2016-04-11 14:36:12I downloaded the kit, was puzzled by the first level, but finally was able to solve it (I am not much of a gamer ;)) and then asked for the next level. This led to I/O errors though:
I/O error during commit
I/O error during commit
while executing
"mk::file commit $db"
(procedure "::mk4vfs::periodicCommit" line 4)
invoked from within
"::mk4vfs::periodicCommit mk4vfs1"
("after" script)Any idea what is going wrong?
