Loading external levels

The KSokoban Handbook
Prev | Chapter 2. The Game | Next

# 2.2. Loading external levels

KSokoban has the ability to load external sokoban levels from text files. You can load levels using the menu Game->Load levels..., or by specifying the level file URL as a command line argument when starting KSokoban from a shell.

The external levels must be defined using the standard characters shown in the table below. If the file contains more than one level, the levels should be separated by blank lines. The file may also contain text between the levels.

Character | Meaning
--- | ---
# | Wall
(space) | Empty square
. | Goal square
$ | Object on an empty square
* | Object on a goal square
@ | Start position on an empty square
+ | Start position on a goal square

As an example, below is a text representation of the first level in the Microban level collection:

     ####
     # .#
     #  ###
     #*@  #
     #  $ #
     #  ###
     ####

Prev | Home | Next
The Game | Up | Credits and License