XNibbles 1.0 Beta Level Creation README

1] Can I write XNibbles levels?
2] What do I need to write XNibbles levels?
3] How do I get started writing XNibbles levels?
4] What do all those letters mean?
5] How do I install my level?
6] Does this README have to do with playing the game?
7] Contact info, licensing, patches, copyright, etc

1] Can I write XNibbles levels?

Yes.  In fact, you can use the levels you write without recompiling.  More
importantly, you can MAIL THEM TO US, so we can incorporate them into the next
release.  I say again,

#     #    #      ###   #               ####### #     # ####### #     #
##   ##   # #      #    #                  #    #     # #       ##   ##
# # # #  #   #     #    #                  #    #     # #       # # # #
#  #  # #     #    #    #                  #    ####### #####   #  #  #
#     # #######    #    #                  #    #     # #       #     #
#     # #     #    #    #                  #    #     # #       #     #
#     # #     #   ###   #######            #    #     # ####### #     #

             ####### #######         #     #  #####  ###
                #    #     #         #     # #     # ###
                #    #     #         #     # #       ###
                #    #     #         #     #  #####   #
                #    #     #         #     #       #
                #    #     #         #     # #     # ###
                #    #######          #####   #####  ###                  

That way, everyone will have lots of levels to play, instead of endlessly
repeating level 20 over and over and over again.

2] What do I need to write XNibbles levels?

You need to use the xnleditor.  This should have compiled automagically when
you compiles xnibbles, and should have installed in the same place as the
xnibbles binary.

3] How do I get started writing XNibbles levels?

To start, you invoke the xnleditor with no filename.  It will load with a
template level.  Then, you just kinda paint walls onto the level.  Along the
left side of the window are all of the different walls pieces - just click on
one, and then go to the level part of the screen and just click (and maybe
drag) to draw that wall piece.  The current piece is displayed on the left
below the available wall pieces, but above the buttons.  The other pieces
besides the walls are 4 white arrows, two question marks, and a diamond.  The
arrows are worm starting positions, along with initial direction.  Each
completed level should have two arrows of some type.  The question marks are
directed warps (yellow) and random warps (blue).  The diamond is the target for
the directed warps.  When you are done, click the save button, and it will
save the level to newlevel.xnl.  Click the quit button to quit (duh!).  Click
the new button to revert to the template.  Click the load button to reload from
file.  This is only if you invoked xnleditor with a filename to edit.

4] What do all those letters mean?

If you've looked at a .xnl file, you've noticed that they're just simple
rectangular character arrays, made up of a bunch of letters.  Only certain
letter values are allowed, and they stand for walls, warps, etc.

** NOTE !!! I think several of these are wrong, but I'm too lazy to check. **
** Use the editor instead.                                                 **

  'a' - Blank floor
  'b' - vertical wall
  'c' - horizontal wall
  'd' - top and right corner wall
  'e' - top and left corner wall
  'f' - bottom and right corner wall
  'g' - bottom and left corner wall
  'h' - left, right, and top t-wall
  'i' - top, right, and bottom t-wall
  'j' - bottom, left, and top t-wall
  'k' - left, right, and bottom t-wall
  'l' - left, top, right, and bottom super wall
  'm' - a worm starts here, and goes up
  'n' - a worm starts here, and goes right
  'o' - a worm starts here, and goes down
  'p' - a worm starts here, and goes left
  'B' - a random warp
  'C' - directed warp start point
  'D' - directed warp destination

The warps need some explanation.  The warps occupy a 2x2 area on the grid, but
are encoded with a single character in the lower right of the square you want
the warp on, for reasons any good hacker would immediately comprehend.  Random
warps move the players head to any position not already occupied by a wall,
bonus, or worm segment.  A directed warp takes the player to the point
specified by the 'D' character, and thus, there should only be one (1) 'D' per
level.  Both types of warp preserve direction.  The characters 'm'-'p'
specify where the worms start.  The first one encountered, reading left to
right, then top to bottom, specify where the first worm starts, and it's
direction.  The next one encountered specifies the same for the second worm.
There need to be two, and only two, of the characters 'm'-'p' in every level.
If there aren't two, it will most likely cause a Segmentation Violation.  Yeah!
If there are more than two, we're sure bad things will happen.

5] How do I install my level?

Installation of a new level is extremely easy.  First, rename newlevel.xnl to
something of the form level???.xnl, where ??? is a zero padded number from 1 to
999.  Then, move the file into the levels directory, preferably not overwriting
an existing file.  Actually, this entire step is completely optional, but
usually helpful.  Really, the key is adding the full path of the .xnl file to
the file LEVELS, found in the levels directory, in the position you want your
level to appear, i.e. first, fourth, last, etc.  You don't even need to
recompile the game - just run it.

6] Does this README have to do with playing the game?

No, you fool!  Read the README in the main directory.  This README is about
writing levels, if you hadn't noticed.

7] Contact info, licensing, patches, copyright, etc

The authors of XNibbles are Ian Peters (ipeters@acm.org), and Sean MacIsaac
(sjm@acm.org).  Feel free to contact us at any time.  If you make any changes
to source, or add a Makefile target, etc., please email us the changes so that
they may be incorporated into the next release.  XNibbles is Copyleft'd under
the GNU Public License.  See the file COPYING for information.
