DX-Boulderdash levelformat V1
A DX-Boulder levelmap has 2 major parts: a header and a data section. The Data section contains 100 levels,
each level also with a header and data section:
Structure:
LevelMapheader
Data section
LevelHeader level 0
Data level 0
LevelHeader level 1
Data level 1
.......
LevelHeader level 99
Data level 99
The leveldata section is variable in size, the header sections are fixed.
LevelMapheader:
TLevelMapHdr = record
ID:array[1..14]of char; : so this is 14 bytes and contains the text "StefBoulderMap"
count:byte; : the number of levels in the levelmap (currently not used)
reserved:byte; : not used yet
end;
Size of LevelMapheader: 16 bytes.
LevelHeader
TLevelHdr = record
Borderx:byte; :width off the level
Bordery:byte; :height of the level
Fellowx:byte; :X offset of the player
Fellowy:byte; :Y offset of the player
DiamondsToCollect:byte; : how many diamonds you have to collect
YamContent:array [1..8,1..3,1..3] of byte;
This is 8 times 9 bytes of Objectscodes that indicates what objects a yam turns into when it is hit by a rock.
Only the first 4 are used at the moment.
LevelTime:byte; :The time
MagicWallTime:word; : how long a magic wall stays active: 0 is forever
WheelTime:word; : how long a wheel stays active: 0 is forever
AmoebaRate:word; : how fast amoeba spreads
EmeraldScore:byte;
DiamondScore:byte;
RedGemScore:byte;
DynamiteScore:byte;
NutScore:byte;
RobotScore:byte;
ShipScore:byte;
YamScore:byte;
TimeScore:byte;
Bugscore:byte;
KeyScore:byte;
LevelName:string[20]; :the name of the level
LevelAuthor:string[20]; :the author of the level
LevelEditPassword:string[10]; : not used yet (maybe never ...)
Reserved:array[1..108] of byte; :room for expansion
end;
Size of LevelHeader: 256 bytes
please note that all "word" values use intel order, so the bytes are swapped
LevelData:
This is an 2 dimentional array of object codes, going from Topleft to Bottomright of the level.
Each object code is 1 byte (this will probably change in the future when I have more than 256 objects)
The array is Levelwidth x levelheight bytes in size . (so its variabel)
( thats: array [1 ..Levelhdr.BorderX , 1 .. Levelhdr.BorderY] of byte;)
Object codes:
0 Empty Space
1 Dirt
2 LittleFellow
3 Rock
4 Diamond
5 Bug Left
6 Solid Wall
7 Exit Closed
8 Exit Open
9 Bomb
10 Explosion
11 Amoeba
12 Nut
13 Emerald
14 Yam Random
15 Grover not used yet
16 Magic Wall
17 Crumble Wall 1
18 Magic Wall With rock
19 Terminal
20 Pattern 1 (wall)
21 pattern 2 (wall)
22 pattern 3 (wall)
23 pattern 4 (wall)
24 pattern 5 (wall)
25 pattern 6 (wall)
26 pattern 7 (wall)
27 pattern 8 (wall)
28 pattern 9 (wall)
29 pattern 10 (wall)
30 pattern 11 (wall)
31 Crumble Wall 2
32 Crumble Wall 3
33 Crumble Wall 4
34 Crumble Wall 5
35 Tube Left will be changed soon
36 Tube Right will be changed soon
37 Tube Up will be changed soon
38 Tube Down will be changed soon
39 Tube Vertical will be changed soon
40 Tube Horizontal will be changed soon
41 Tube Cross will be changed soon
42 ----
43 Tube Left toggle Gravity will be changed soon
44 Tube Right toggle Gravity will be changed soon
45 Tube Up toggle Gravity will be changed soon
46 Tube Down toggle Gravity will be changed soon
47 Door Green Open
48 Door Blue Open
49 Door Yellow Open
50 Door Red Open
51 Door Gray Open
52 Door Green Closed
53 Door Blue Closed
54 Door Yellow Closed
55 Door Red Closed
56 Door Gray (green) Closed
57 Key Green
58 Key Blue
59 Key Yellow
60 Key Red
61 Robot
62 Acid
63 Acidbox Top Left
64 Acidbox Top Right
65 Acidbox Bottom Left
66 Acidbox Bottom Right
67 Acidbox Bottom
68 Invisible Wall
69 Quicksand with Stone
70 Ship Left
71 Dynamite
72 Wheel
73 Dynamite Active
74 Amoeba Drop
75 Amoeba Stationary
76 Fixed Acid
77 Quicksand Empty
78 RockBirth internally
79 Door Gray (Blue) Closed
80 Door Gray (Yellow) Closed
81 Door Gray (Red) Closed
82 Bug Up
83 Bug Right
84 Bug Down
85 Ship Up
86 Ship Right
87 Ship Down
88 Yam Left
89 Yam Up
90 Yam Right
91 Yam Down
92 Utility Disk
93 Electron Left
94 Electron Up
95 Electron Right
96 Electron Down
97 Trap Inactive
98 Trap Active
99 SupaBomb
100 'A'
101 'B'
102 'C'
103 'D'
104 'E'
105 'F'
106 'G'
107 'H'
108 'I'
109 'J'
110 'K'
111 'L'
112 'M'
113 'N'
114 'O'
115 'P'
116 'Q'
117 'R'
118 'S'
119 'T'
120 'U'
121 'V'
122 'W'
123 'X'
124 'Y'
125 'Z'
126 '0'
127 '1'
128 '2'
129 '3'
130 '4'
131 '5'
132 '6'
133 '7'
134 '8'
135 '9'
136 Point
137 Interpunction
138 Question mark
139 Exclamation Point
140 Slash
141 Arrow left
142 Arrow up
143 Arrow right
144 Arrow down
145 Copyright
146
147
148
149
150 Snik Snak Left
151 Snik Snak Up
152 Snik Snak Right
153 Snik Snak Down
154 Expanding Wall
155 Expanding Wall Hor
156 Expanding Wall Ver
157 Glue
158:Tube Cross
159:Tube Vertical
160:Tube Horizontal
161:Tube T Left
162:Tube T Up
163:Tube T Right
164:Tube T down
165:Tube Turn TopLeft
166:Tube Turn Topright
167:Tube Turn BottomLeft
168:Tube Turn Bottomright
169:Glue Fellow