Rebound - Level Definition File
 

Adding new levels to Rebound is very easy. Currently all the levels are defined in the levels.ldf file, located in the data directory. This file can be edited with any regular text editor except vi.

What follows attempts to be something of a formal definition for the ldf file, but to be honest, its syntax is really basic and you could probably figure it out by just looking at the first level and then referencing the ldf file.

Currently comments are not supported in the level definition file. I have included them here to help describe the file but don't include them in yours. Look for comments to be enabled in version 1.5.

When you see the tag STRLIT that stands for string literal. A string literal in Rebound is either a string with no spaces like
this_is_a_string_literal
or it is a string with spaces, surrounded by quotes like
"this is a string literal"

The format of the file is as follows:

title = STRLIT
The title here identifies the name of this file. This title is currently not being used but it planned to be supported in version 1.5 when multiple level definition files are supported.

The levels are played in the order they are listed in this file.

level = {
Each level is started by the level tag and all level data is contained in the curly braces.

title = STRLIT
The title in the level area is the title which will appear when the level is loaded into the game. The title name is really arbitrary and can be set to anything.

author = STRLIT
The author in the level area is the author which will appear when the level is loaded into the game. This should be the name, nick name, handle or what ever of the person who wrote the level. This is their claim to fame so to speak.

image = STRLIT
Image file to use as the background. This file must be located in the PICTURE_DIR. Image files are not checked or loaded when the game starts but only checked when they are loaded for that actual level so make sure they exist.

board = {
The actual definition for a board starts with the board tag. All board data is located between the open and close curly braces which follow the tag.

The board definition is a series of twelve lines, each containing 24 characters with no spaces. Each line is separated by a single return. In each line, each set of two characters identify the type and color of the brick to be placed in that location. The first characters in the pair always identifies the type of brick. The second character identifies the color of the brick if applicable. A pair of underscores mean that that brick should be left blank.

The brick functions are as follows:
B - Brick
L - Lock
K - Key
P - Paint
W - Wall
G - Gold
S - Switch
D - Death

The brick colors are as follows:
R - Red
O - Orange
G - Green
Y - Yellow
B - Brown
C - Cobalt (blue)
L - Light Blue

So the line ____BCDDBC____BRDDBR____ from the third level means that the bricks are requested as follows:
1st brick - blank
2nd brick - blank
3rd brick - standard brick which is cobalt colored
4th brick - death brick
5th brick - standard brick which is cobalt colored
6th brick - blank
7th brick - blank
8th brick - standard brick which is red colored
9th brick - death brick
10th brick - standard brick which is red colored
11th brick - blank
12th brick - blank

}
This curly closes the open one from the board.

}
This curly closes the open one from the level.

By the way, the comment that you can't use vi was just a joke.