
  =================
  Intro
  =================

3D Block Maps are not easily represented by simple bitmap or text files, unless a
layering method is used which requires a massive number of files to cover all the layers.

Furthuremore a fully featured GUI editor for such maps would take a long time to program.

As such, Color Eater 3D uses maps generated entirely from source code using 'for' loops.
This is the same method used by nibbles by the way.

This method has several advantages:
It uses less disk space than other methods (especially methods lacking compression).
Maps are quickly generated rather than slowly loaded off the disk.
It is easy to get the computer to do the work of making intricate levels
(especially if you are good at manipulating mathematical functions)

  =========
  Basics
  =========

You will need to set up the source code for convienent compiling.  (See README.txt)
Once you have the game compiling, take a look at some of the first few lines of ColorEater3D.bas

Const FirstLevel = 1
Const LastLevel = 2
Const StartingLives = 5  '-1 = Infinite

These constants control game play; by setting the first level constant to the level you are working on
you can quickly test your new level without needing to play through other levels first.

Once these constants are set you can open up modLevel.bas and write the level generating code into the
GenLevel() Sub.

Sub GenLevel()
    Dim As Integer X, Y, Z, Height
    
    Select Case CurLevel
    Case 0 'Menu Screen Level 0
    ...
    Case Else
        Level.Title = "Empty"
        VoxMapW = 128
        VoxMapL = 128
        VoxMapH = 64
        
        VA_ReDim(VoxMapB, (VoxMapW+2)*(VoxMapL+2)*(VoxMapH+2) - 1, UByte)
        
        For X = 1 To VoxMapW
            For Z = 1 To VoxMapL
                VoxMap(X, Z, 1) = Vox_Dirt
            Next Z
        Next X
    End Select
    ...
End Sub

You will notice there is a case statement for each level, and for case 0 which is not really a level, but
provides the block arrangement for the menu screen.  The case else here is interesting, it makes for a good
starting point for making your own levels.

First thing is to name the level and specify the size of the level, Width, Length and Height, the VA_ReDim
macro is then used to reserve the memory for the map.  Finally we see a basic loop structure that fills the
bottom of the map with the dirt tile.

>>NOTE:  The Coordinates to address the VoxMap(...) array are in the order X, Z, Y rather than the conventional
X, Y, Z order.  This is done because gravity acts in the Y direction making it the oddball coordinate,
whereas X and Z have no gravity and are grouped together because they behave similiarly.  I hope this convention
does not confuse anyone.

Also notice that the range of values we can assign is 1 through VoxMapW/L/H.  Locations 0, and VoxMapW/L/H + 1
exist in the VoxMap array, however they are reserved to prevent memory overruns during adjacency testing, and
will not produce visable blocks, though they act as an invisable boundry arround the level.

  ======================
  Starting positions
  ======================




  ==================
  Special Blocks
  ==================




  ===============
  Please Share
  ===============



