|
Commands are the basic elements of the bolo level
files. They can be used to initiate global
settings for the level - music, gravity and friction - and to create
and position all the objects (stones, holes,
rubber bands etc.) and figures (beater, balls,
killerdisks).
There can be one command on a single line of text or
multiple commands, each seperated by whitespace. Commands are case
sensitive, as is true with object names and any other keywords you
will find in the bolo levels!
Each command begins with the command name, followed
by a list of parameters. Each parameter is either enclosed into brackets
( ), which is true for numbers and object names or it is enclosed into
quotation marks, which is true for strings.
There are no whitespaces allowed between the command and its parameters
and between a parameter and the brackets.
Numeric parameters have always integer type.
Comments can be enclosed in (* and *). Everything
that is enclosed by these characters is ignored by Bolo.
It's not allowed to write two comment statements short after each other.
There must be at least one command between them. Else your level won't
get loaded by Bolo !
The following is not allowed:
(* This is comment 1 *)
(* This is comment 2 *)
But you could write:
(* This is comment 1 *)
Stone(oRing2)(dgMamo1)(3)(6)(3)
(* This is comment 2 *)
It's important to have excactly the above described
syntax in your level, else Bolo won't accept it.
In general, don't experiment too much with the way how the levels for
Bolo are written. For the beginning, just modify the original Bolo levels
and look what happens. Later, when you create your own levels from scratch,
try to use the syntax as close to how it is in the original levels else
you may sometimes wonder why your level isn't running at all.
A typical simple level file could look like this:
|
Reset
Music"TRACK_04"
Reset
(* place the beater and the ball into the level *)
Fig(fBeater)(256)(360) Fig(fLittleBall)(256)(330)
(* create some stone types for later stone creation *)
oTyp(0)(oNone)
oTyp(1)(oHole)
Points(2)(50) oTyp(2)(oSimple)(dgTile1)(0)
Points(3)(150) oTyp(3)(oSimple)(dgTile1)(7)
Points(4)(200) oTyp(4)(oSimple)(dgTile1)(1)
(* setup the coordinate system *)
Offset(256)(200)
Factor(35)(25)
(* place the stones into the level *)
XYInc(1)(1)
Pos(-6)(-6)
ObjLine(13)"3.2.3.2.3.2.3"
NxtLine(13)".3.3.3.3.3.3."
NxtLine(13)"4.3.4.3.4.3.4"
(* create some holes *)
HolePower(500)
Pos(-6)(7)
ObjLine(13)"1111111111111"
|
First we call the command Reset
to initiate the level and set a music
track. Then we place a Beater and a Ball Figure
into the level.
Next we use object array commands
to create some stone types that will later
be used to create the actual stones. We setup the coordinate
system and then place the stones with the types we have made before
into the level. Last we put a row of Holes
onto the bottom of the screen.
Resets the coordinate system
and initiates the level. You should always put this command as the first
one in the level and again after setting the music track.

Sets the CD music track for the level, look at the Bolo
levels to get possible values for the parameter TRACK_n

Sets the amount of gravity that affects the balls and
the killerdisks. x and y
set the strength of the gravity in both directions. Possible values for
x and y range from
-3 to 3, where 0 means no gravity at all and a negative number indicates
the opposite direction.
When used right before creation of an oGravity
stone, it sets the gravity that will be activated when the oGravity
stone is hit by the ball.
Examples:
Gravity(0)(1) Stone(oGravity)(dgStck3)(1)(140)(50)
Gravity(0)(1) oTyp(1)(oGravity)(dgStck3)(1)
Gravity(0)(0) |
Line 1 places a gravity stone at position x=140, y=50.
when the stone is hit, gravity is activated in the y-direction (down the
screen).
The 2nd line creates a gravity stone type for the commands ObjLine and
NxtLine.
The 3rd line is useful when placed after the last gravity stone command
- it sets the normal level gravity.

Sets the amount of friction that affects the beater.
Possible values for n range from 0 to 3, 0
means very low friction (like on ice) and 3 a high friction (like on sand).
The default friction value is 2.
When used right before creation of an oFriction
stone, it sets the friction that will be activated when the oFriction
stone is hit by the ball.
Example:
Friction(0) Stone(oFriction)(dgStck3)(1)(140)(50)
Friction(0) oTyp(1)(oFriction)(dgStck3)(1)
Friction(2) |
Line 1 places a friction stone at position x=140, y=50.
when the stone is hit, the lowest friction is activated.
The 2nd line creates a friction stone type to be used with the object
array creation commands ObjLine
and NxtLine.
The 3rd line is useful when placed after the last friction stone command
- it sets the normal level friction.

|