# YSokoban

YSokoban is an implementation of Sokoban game. It has resizeable skins, Multi-language support, unlimited undo and redo, full mouse support (plus lot of hot-keys(short-cuts)) which are configurable, Ruler, configurable user toolbar remembers best solution for every level and later replays it on demand and many more features.

## Installation

No special actions required. Unzip downloaded zip to some folder (for example YSokoban) and start program from there.

- YSokoban.exe - unicode version use it on windows 2000+ (XP, Vista, 7)
- YSokobanA.exe - use it on Win95/98, 2000+ is also supported but better use unicode versions there.

## Portable mode

YSokoban will preserve some data in registry for later starts. Data contains things like: where is window on screen, what size is it, which player you select ... If you want to store it not in registry, but in file which is in a same folder as YSokoban, so that you can keep everything on USB and plug it everywhere without changing registry, then: create an empty file: YSokoban.ini (or YSokobanA.ini depending on version you use) YSokoban will use this file instead of registry.

If YSokoban was started without ini file and ini file was created while YSokoban is still running, then on exit YSokoban will copy all registry setting to ini file.

## Uninstalling

YSokoban program writes some data into registry (see explanation above):

    HKEY_CURRENT_USER\Software\YGP\YSokoban

To uninstall the program - select uninstall from system menu and click OK in a dialog box which informs you that it will clear registry. Program will clear registry settings and will exit. Remove executable and all related level and player files. If you change your mind you can start program again, but you should make again all settings from options dialog.

## Menu

YSokoban does not have a menu bar. Menu is located inside system menu. To activate it click on the YSokoban icon on top-left corner of the window or press Alt-Space (while YSokoban is focused). There is a menu button in Transform dialog (which simply brings up menu). It is possible to activate menu with F10 too. And you can activate menu by clicking on "Label:" (just before level edit box, and just below system icon). I know, it is not obvious, but think for it as that system menu (although it is not exactly system menu) is activated even if clicking just below system icon too. All this alternatives to activate menu are used in full screen mode or if you run YSokoban with Wine under Linux.

Menu has following items:

- Skins - activates skin options dialog
- Options - activates options dialog
- Push path optimize - activates dialog to set push path optimization options
- Set number of preserved solutions
- Stay on top - if selected YSokoban will stay on top of all (normal) windows
- Export options - export (as a ini file of all YSokoban settings)
- Import options - import ini file with settings
- Uninstall - will remove all data stored in registry (for the current user only), then one can remove entire YSokoban folder
- Import solutions - import solutions (lurd format) from a file
- Export all solutions - export all solutions from YSokoban data (in normalized form)
- Export collection: levels only - export in a text file only levels from current collection
- Export collection: solved levels - export in a text file only solved levels (with solutions)
- Export collection: nonsloved levels - export in a text file only levels without solutions
- Export collection: all - export all levels from current collection (with solutions where available)
- Import unsolvable - import text file with unsolvable levels
- Export unsolvable - export text file with unsolvable levels
- Add current level to unsolvable
- Remove current level from unsolvable
- BMP/PNG mode - switch recording BMP/PNG mode

## Command line parameters

YSokoban supports following command line parameters:

- -bmp - starts YSokoban in recording mode with BMP format of recorded images
- -png - starts YSokoban in recording mode with PNG format of recorded images
- -norec - starts YSokoban in non recording mode
- -w - switch YSokoban to full window mode (but does not activate recording mode)
- -l - switch YSokoban to level mode (but does not activate recording mode)
- filename filename of a level or collection which will be loaded

Parameters has to be specified before filename (which may have spaces inside its name), for example:

- YSokoban ClassicQuest.xsb
- YSokoban -png ClassicQuest.xsb
- YSokoban -w ClassicQuest.xsb
- YSokoban -png -w

So command line syntax is: YSokoban [-png|-bmp|-norec] [-w|-l] [filename]

## Features

- YSokoban has many hot-keys(short-cuts) to quickly do some actions
- Skin support
- Multi-language support Use YSokoban in your own language (if translation is available).
- Mouse and keyboard support, mouse buttons and mouse wheel are configurable.
- Can disable/enable showing hints as option or toggle with F9
- Unlimited undo/redo
- Practically unlimited solution size support:
  many programs have a limitation on the maximum of moves a level can have. YSokoban has no such limit. However, it's limited by the amount of available memory in the system. YSokoban is 32 bit application and it can access maximum 2GByte of memory even under 64 bit OS with multi gigabytes physical memory. This means that number of moves is limited to several hundred million moves, but this means it is practically unlimited. At least for a human is not possible to make more than 100 moves per second, so a million seconds means to play more than 10 days without stopping.
- Practically unlimited level size support
  YSokoban supports level of any reasonable size (for example 65000x65000 level is not supported, 10000x10000 is not tested and perhaps will have some problems).
  When a level is larger than YSokoban's window can display then scroll-bar(s) will be available to allow the level to be panned. When scrollbars are visible you can move visible part of level by using scrollbars or by pressing down mouse button on any cell without man or box and then drag with mouse.
- Auto-follow player / Auto-Pan:
  When a level is larger than the YSokoban window can be displayed, scroll-bar(s) will be shown. During solution replay, the user can enable auto-pan so that the level scrolls automatically following the player.
  At the bottom-right corner, where the two scroll-bar ends meet, there's a "square box" with a dot on it. You can click it to toggle auto-pan. When the button is depressed, auto-pan is enabled.
- When there's scroll-bar(s) in the YSokoban window, the user can press Shift or Alt + mouse wheel to scroll.
- YSokoban can make screen shots to aid animated GIF creation.
- Ruler - ruler shows coordinate of a board (chess like) to support discussing with someone man/box positions and cells.
- Save/Load during play: you can save/load your current position at any time (with Ctrl-S/Ctrl-D or Ctrl-O).
- Solution replay: one can replay any preserved solution, change replay speed, pause and continue.
- Partial solution copy/paste support: use copy/paste to copy/paste moves/level to/from clipboard.
- Supports loading levels from a file or clipboard.
  To load from a file: click on the "Collection" button.
  To load from the clipboard simply paste it
- Automatically remembers any solved levels
- Solution handling: YSokoban can be configured to save any number of solutions (per level) you prefer.
- Import solutions: You can import solutions from a text file. This function is mostly for helping the player to "merge" different player profiles.
- Export solutions
- Orientation support: level can be rotated or mirrored during play.
- Instant-Move support do not show intermediate moves/pushes
- Path-finding support find path to push box (and more).
- Go-Through boxes feature find path to push even if other boxes has to be touched
- Push path optimization During play when using mouse to point and click to move boxes, you can tell YSokoban on how to choose/optimize the path to push the boxes. It can be based on Pushes, Moves, or Number of Inlines.
- Show what's reachable (and not reachable) by the player
- Supports levels that started with all boxes on targets.
- Automatically identify trivial levels
- Auto-save feature: If you exit YSokoban in the middle of play, when you start YSokoban the next time, it will automatically load the same level and replay the moves you have played the last time you've exited. This functionality is configurable.
- Auto Enlarge/Shrink window: When loading a level, you can tell YSokoban (configurable) to automatically shrink or enlarge the viewing window so that it fits for viewing the level.
- browse or jump to any level in the current collection.
- Bookmark levels: Ctrl-<1>..<9> to bookmark, <1>..<9> to jump to it.
- Underscores (_) and hyphens (-) are supported in XSB format level to replace blanks (" ").
  This is useful for levels copied from e-mails for forums.
  Also, YSokoban treats the often use ">" (greater than sign) symbol as blank as well. This is usually coming from the e-mails reply.
  The line continuation symbol "\" (aka backslash) is also ignored.
- Support for packed solutions & levels.
- Multi-user support: YSokoban supports multiple players (users of YSokoban), not to be confused with Multiban, YSokoban does not support more than one man in a level.
  Each player has his own profile.
  Click on the player pull down to select a player or create a new player.
- Calculate number of targets boxes in some area. Ctrl-click and select rectangular area inside level. YSokoban will calculate number of boxes and targets inside this area and will display result in a title bar. If you release mouse button, but still keep ctrl pressed you can select another area and will see both results in title bar. Several areas could be selected in such a way (up to 10).
- Macro support: sometimes you need to play some repeating actions several times. In such a case most of the text editors provide so called macros.
- Display solution statistic counters in a status line

Created with Ywiki