Reference

bloksi_format(6)

.lev format - Description of the puzzle files for bloksi This file describes the .lev format used by bloksi and glotski (bloksi is the result of my cloning glotski). The format that is common to bloksi and glotski is described first. bloksi-specific parts are described later. A .lev file represents a sliding-blocks puzzle and possibly the history of movements that the puzzle has undergone. A .lev file is an ascii file consisting of "sections". Each section is a consecutive set of lines. The character ';' separates sections. Anything appearing on a line starting with ';' is otherwise ignored, so you can put comments that way.

      size  <WIDTH> <HEIGHT>

indicates that the puzzle consists of <width>-by-<height> cells.

      initial
      2211
      AA..
      AA78
      6533
      6544

This block describes the initial configuration of a 4-by-5 puzzle. An empty cell in the puzzle is represented by a '.'. Each piece of the puzzle has a different label. In the example above, the labels are "1", "2", "3", "4", "5", "6", "7", "8", "A". Any alphanumeric character may serve as label. Each line must have exactly <WIDTH> characters and there should be <HEIGHT> lines.

      target
      ....
      ....
      ....
      AA..
      AA..

This block the target (aka "final", aka "desired") configuration of a 4x5 puzzle. All cells whose contents are of no importance are represented by a '.'. The target in this example is to bring the "A" piece to the lower left corner of the board.

      color <LABEL> <R> <G> <B>

means that the piece <LABEthe gt manpage will be displayed with rgb colors <R>, <G> and <B>, which should be between 0 and 255. Default is greenish.

      end

This is not needed, but can be used to separate the glotski-compliant part of the file from the bloksi-specific part.
History-related sections :

Image-related sections :

      img <LABEL> <IMGFILE>

specifies that the image file <IMGFILE> should be used to display piece <LABEL>.

      fgimg <IMGFILE>

Individual pieces will be cut out of <IMGFILE>, which is assumed to represent the puzzle in its initial position.

      bgimg <IMGFILE>

Use <IMGFILE> as a background for the board. This is the file c19.lev which comes with bloksi :

      ; C19 from _Sliding Piece Puzzles_
      ; Move the big red square to the bottom left corner
      size 4 5
      initial
      AA11
      AA22
      78..
      6533
      6544
      target
      ....
      ....
      ....
      AA..
      AA..
      color A 127 0 0
      color 7 0 0 127
      color 8 0 0 127
      ;
      end