Designing Maps For XorGramana
-----------------------------

Within these instructions, an object refers to one item which occupies
a single block (or tile) in the game. One block of wall is an ojbect. 
The players are objects (player 0 and player 1), and letters also are
objects. As are the exit, teleports, and force-fields, etc.

Map files can be created in your favourite text editor. Please don't
use DOS/Windows format text files (the map reading code might be
broken for them and I'm not going to fix it yet).


Map File Layout
---------------

title
maximum moves
map width
map height
map width * map height map
map piece 1 location (x y)
map piece 2 location
map piece 3 location
map piece 4 location
word solution list


Layout notes
------------

Currently the title can have a maximum of 24 characters (which
conflicts with the level menu potential maximum title length of 20...
So just for now, stick to a max ~ 17 chars).

The maximum number of moves should not make the level unapproachable
for the novice, but should also not encourage wasteful moves, and
should create enough of a challenge.

When defining the map, do not include the outer boundary walls - the
outer wall is automatically created for you. So, with this is mind,
when defining the map width and height, just set these to the size of
the grid which you are defining - not the size of the map when the
boundary walls are created.

The map can be a maximum of 99x99 blocks. If you find this value too
restrictive then change the corresponding values defined in the source
file defs.h and do a complete rebuild for this to take effect. Please
bear in mind that you'll need a good reason for this increase to be
incorporated into the game release.

The map must include the following details at minimum:
player0 - represented by a 0 (zero)
player1 - represented by a 1 (one)
exit    - represented by a E (capital E)

Note: the E for (closed) exit is different to the e which is the
letter e object.

For guidance on choice of objects and their behaviour, please
frequently refer to the top of the source file actions.c where the
behaviours of the objects are defined. Hopefully it will make some
sense to the non-programmer amongst you. Alternatively play an
existing level.


SOME FURTHER NOTES:
-----------------\

In Xor, it was not possible to have 'unsupported' objects. that
is objects which gravitate when their path of gravitation is
not blocked. however, in XorGramana this is now changed, YOU
CAN have unsupported objects defined in the map, and these will
begin gravitating as soon as the player begins to play the map.

This effect can be like a nice little introductory animation.
In the map "Ivy Mike's Breakie" the first word the player has to
construct is shown when the map loads - the game pauses for the
player to take note of this and then the objects begin gravitating
and the word is destroyed and must be rebuilt by the player.



-----------

The behaviour of the letters/objects in XorGramana, I am currently
happy with and do not as of this moment (0.0.6) forsee any change
in these behaviours in the future.

-----------

the map peice data location is

each section is numbered

  4 | 1
  --+--
  3 | 2

first position all 4 of your map objects in the map (by using 'M'). 
secondly, add -DMAP_DEBUG to the CFLAGS in the Makefile, do a 'make 
clean' and then 'make'. this will provide you with debugging information 
for the map reading code - including the exact coordinates of each map 
piece. 

Each map piece can represent one of the four corners of the map. The map 
piece in sector 1 could provide the section of map to display sector 3 
for example.

Once you have the exact coordinates of each map piece within the map, 
you then order them in the where the first map piece location entry will 
provide sector 1 of the map, the second, sector 2, and so on.

Example:
23 11
17 10
3  5
1  26

(ie 0,0 is topleft of map, and map is 27x27).

-----------

the solution list at the end of the map is layout:

word x y dir x2 y2

where word is one word (without spaces) to be solved
where x,y are the coordinates in the map the solution is to be arranged
where dir is either r for right or d for down
where x2,y2 are the 'unblock' coordinates in the map to turn an object 
into a space

therefor (as in the map "fear fear fear") you can lock a player in a
'room' in a map until player has solved problem. (To me it makes sense
to have the object *that is to be unblocked* begin as a force-field but
have the force-field positioned in such a way to deny access - again,
see map "fear fear fear").

--------------
end for now
