XSOKOBAN

Section: Games and Demos (6)
Updated: 3 January 1994
Index Return to Main Contents
 

NAME

xsokoban - Pushing objects around...  

SYNOPSIS

xsokoban [ -s -r -c -nn -display <disp> {-w | -walls} {-rv | -reverse} {-f | -font} <fn> {-b | -bitdir} <path> {-fg | -foregound} <color> {-bg | -backgound} <color> {-bd | -border} <color> {-pr | -pointer} <color> -xrm <arg> ]  

DESCRIPTION

The goal of xsokoban is to push all the round objects into the score area of each level using the mouse or the arrow keys. The arrow keys move the player in the corresponding direction, pushing an object if it is in the way and there is a clear space on the other side. The mouse buttons each have a distinct function.

If the left mouse button is pressed on a clear square, the player will move to that location via the optimal path if such a path exists; otherwise, the game will beep.

If the middle button is pressed on an object that is adjacent to the player, the object will be pushed one step. If the middle mouse button is pressed on an empty space, the player will move the closest object that is on a straight line with the destination, such that the object can be pushed in that direction, and the player is not directly between the destination and the object. Before pushing the object, the player is moved optimally to start the push.

Either the left or middle mouse buttons may be used to "drag" an object from an initial to a final position. If a straightforward way exists for the man to push the object without moving any other objects, the man will execute appropriate moves and pushes to get the object to the desired destination.

The right button mouse undoes the last user action, and may be used any number of times.

The rest of the functions are bound to the keyboard:

?
Display a help screen.
q
Quit the game.
s
Save and quit.
u
Undo the last action. Same as right mouse button.
U
Restart a level.
^R
Redraw the screen.
h,j,k,l
Move the man just like the arrow keys, as in vi(1).
S
View the score file.

Scores in xsokoban are saved in the score file if they are of high enough rank. A score is ranked according to how many scores are better than it; there are no scores superior to a rank 1 score, only one score superior to a rank 2 score, and so on. If two scores are identical, the first one entered is ranked higher.

 

OPTIONS

-s [level]
Print the scores on standard output. The optional level will restrict the printout to scores on just that level.
-c
Create a new score file (can be ran only by the owner of the game).
-r
Restore a saved game.
-nn
Start at level nn, provided that levels below it are completed.
-display <display>
Run the game on the named display.
{-w | -walls}
Use fancy walls. (This is the default unless an option bitmap set is used)
{-rv | -reverse}
Use reverse video.
{-f | -font} <fontname>
Use the named font instead of the default 9x15 font.
{-b | -bitdir} <path>
Use the bitmaps found in <path> instead of the defaults.
{-fg | -foreground} <color>
Use the named color as the foreground color. (default is BlackPixel())
{-bg | -background} <color>
Use the named color as the background color. (default is WhitePixel())
{-bd | -border} <color>
Use the named color as the border color. (default is foreground color)
{-pr | -pointer} <color>
Use the named color as the mouse pointer foreground. (default is foreground)
-xrm <arg>
<arg> is an X Resource specification.
 

AUTHORS

Unknown Hacker - Original curses(1) implementation.
Joseph L. Traub - X windows interface.
Kevin Solie - simultaneously developed X implementation (merged in).
Mark Linderman, Christos Zoulas - Mouse code (added to Solie's version).
Andrew Myers - Improved mouse UI, score ranking, and color support

Code has also been donated by many xsokoban users. Thanks for all your contributions and suggestions!  

RESOURCES

xsokoban understands the following resources.
fancyWalls : boolean
Use fancy walls.
fontName : font
Use named font.
reverseVideo : boolean
Reverse foreground and background pixels.
foreground : color
Use color as foreground color.
background : color
Use color as background color.
borderColor : color
Use color as border color.
pointerColor : color
Use color as pointer color.
bitmapDir : string
Look for bitmaps in path specified by string.
border.color: color
Color of borders in the score display
text.font: font
Font of text in the score display
text.color: color
Color of text in the score display
text.highlight: color
Color of highlighted text in the score display
text.indent: int
Indenting of text in the score display
scrollbar.width: int
Width of the scrollbar in the score display
scrollbar.background: color
Color of the scrollbar background
scrollbar.thumb.height: int, scrollbar.thumb.width: int
Size of the scrollbar thumb
scrollbar.thumb.color: color
Color of the scrollbar thumb
panel.height: int
Height of the help panel in the score display
panel.font: font
Font of the help panel in the score display
bevel.width
Width of the Motif-like bevels
sep.color: color
Color of the lines separating different score levels

 

SPECIAL BITMAPS

In order to define your own bitmaps for xsokoban you only need to know the names of which files it is looking for. The standard bitmap files are:
man.xbm
-- The player bitmap.
goal.xbm
-- The goal area bitmap.
wall.xbm
-- The standard wall bitmap.
object.xbm
-- The object that gets pushed.
treasure.xbm
-- The bitmap for the object when it is on the goal.
saveman.xbm
-- The bitmap for the player when it is on the goal.
To use the fancy walls option, you need the following additional files.
lonewall.xbm
-- a wall with connections on no sides.
southwall.xbm
-- a wall with only northern connections
northwall.xbm
-- a wall with only southern connections
eastwall.xbm
-- a wall with only western connections
westwall.xbm
-- a wall with only eastern connections
llcornerwall.xbm
-- a wall with northern and eastern connections
ulcornerwall.xbm
-- a wall with southern and eastern connections
lrcornerwall.xbm
-- a wall with northern and western connections
urcornerwall.xbm
-- a wall with southern and western connections
north_twall.xbm
-- a wall with connections on all BUT northern side
south_twall.xbm
-- a wall with connections on all BUT southern side
east_twall.xbm
-- a wall with connections on all BUT eastern side
west_twall.xbm
-- a wall with connections on all BUT western side
centerwall.xbm
-- A wall will connections on all four sides.
 

BUGS

Auto bitmap resizing code doesn't take into account font sizes.
Feedback on user error is poor (only beeps).


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
AUTHORS
RESOURCES
SPECIAL BITMAPS
BUGS

This document was created by man2html, using the manual pages.
Time: 04:52:33 GMT, January 15, 2023