forked from cnlohr/noeuclid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rooms.txt
453 lines (391 loc) · 12.1 KB
/
rooms.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
# Room settings
# Parens are used to declare 3-dimensional vectors
# Syntax in init/run scripts is C. vectors are declared as v(x,y,z) for ints or vf(x,y,z) for floats
# The room that is loaded when the game is started
StartAtRoom 0
# Begin declaration of room number 0
Room 0
# Time in seconds until player dies of old age
Time 100
# Start coordinates
Start (3 3 64)
# Corners of the exit box
Exit (4 4 61) (1 1 1)
EmptyBox (1 1 60) (6 6 6) Sand
Warp (1 1 60) (6 6 6) (.1 .1 .1)
Cell (4 4 60) Goal
Cell (2 4 62) IronOre
Cell (4 4 62) Leaves
Cell (3 2 61) 35
Cell (5 2 63) 50
Cell (3 5 64) 81
Cell (5 5 63) 22
Room 1
Time 100
Start (4.28 4.27 59.13)
Exit (3 9 51) (3 1 2)
AnimateOpen (4 4 60) (1 1 1)
# Box off to the side
EmptyBox (2 6 50) (4 4 3) 7
# Chute
EmptyBox (2 2 48) (4 4 11) 4
ClearCell 4 4 60
ClearCell 4 4 59
InitScript {
for(int i=0;i<10;i++) {
float den = (i+1.0)/12.0;
if(den<.1) den=.1;
WarpSpace(v(2,2,59-i),v(4,4,1),vf(den,den,den));
}
}
RunScript {
double f = fmod(timeInRoom,1); if(f<0)f=-f;
EmptyBox( v(2,2,48), v(4,4,11), 4, swoovey(timeInRoom * .1, 1)*70 + 185);
ClearCell( v(4,4,60) );
ClearCell( v(4,4,59) );
ClearRange( v(3,6,51), v(3,1,2) );
}
# Make hole in side.
ClearRange (3 6 51) (3 1 2)
PaintRange (4 10 50) (1 1 3) Goal
Room 2
Time 100
Start (4.5 7.92 51.92)
Exit (3 15.1 48) (3 1 2)
AnimateOpen (4 10 51) (1 1 2)
RunScript {
static int stage = 0;
gDaytime = gDaytime * .99 + 400 * .01;
//Force user to look around to get out.
switch (stage) {
case 0:
if (gDirectionY > .7 && PlayerInRange(v(3, 12, 48), v(3, 3, 3))) stage = 1;
break;
case 1:
if (gDirectionY < -.7) stage = 2;
break;
case 2:
if (gDirectionY > .7) stage = 3;
break;
case 3:
PaintRange(v(3, 11, 47), v(3, 1, 8), SPAAACE_CELL, 255);
if (gDirectionY < -.7) stage = 4;
break;
case 4:
//Open hole in front of room.
PaintRange(v(3, 15, 47), v(3, 2, 3), WHITE_BLOCK, 255);
ClearRange(v(4, 15, 48), v(1, 1, 1));
PaintRange(v(4, 16, 48), v(1, 1, 1), GOAL_BLOCK, 255);
WarpSpace(v(3, 15, 47), v(4, 4, 3), v(.3, .3, .3));
break;
}
}
EmptyBox (2 11 47) (4 4 10) EndRender
Warp (2 11 46) (4 4 3) (.3 .3 .3)
PaintRange (3 11 47) (3 1 8) Goal
ClearRange (4 11 51) (1 1 2)
Room 3
Time 100
Start (4.5 15.29 48.44)
Exit (6 32 48) (1 1 2)
AnimateOpen (4 16 48) (1 1 1)
Warp (1 15 40) (12 12 12) (.3 .3 .3)
PaintRange (3 15 47) (3 2 3) 19
# Open area
EmptyBox (1 16 40) (12 12 12) 2
# Tucked away (For goal)
EmptyBox (3 28 47) (6 5 3) 2
# Open wall between open area and goal.
ClearRange (4 28 48) (5 2 2)
PaintRange (12 17 40) (1 1 1) Goal
PaintRange (6 33 47) (1 1 3) Goal
ClearRange (4 15 48) (1 1 1)
RunScript {
static int already_removed_stretch = 0,
already_setup_jumpspace = 0;
gDaytime = gDaytime * .999 + 472 * .001;
if (PlayerInRange(v(2, 17, 41), v(10, 10, 1.1)) && !already_removed_stretch) {
printf("Dewarpify.\n");
//Remove the stretchyness that let us into this room.
WarpSpace(v(1, 15, 40), v(12, 12, 12), v(1, 1, 1));
PaintRange(v(4, 16, 48), v(1, 1, 1), DEADGOAL_BLOCK, 255);
already_removed_stretch = 1;
}
if (PlayerInRange(v(12, 17, 41), v(1, 1, 2)) && already_setup_jumpspace == 0) {
ClearRange(v(1, 16, 37), v(1, 1, 4));
ClearRange(v(1, 16, 48), v(1, 1, 4));
JumpSpace(v(1, 16, 39), v(12, 12, 3), v(0, 0, 7));
JumpSpace(v(1, 16, 51), v(12, 12, 3), v(0, 0, -7));
printf("Jumpspace\n");
already_setup_jumpspace = 1;
}
int i;
//Make shifting platform.
for (i = 2; i < 13; i++) {
float swoove = swoovey(timeInRoom * .1, 3.0) + .5;
swoove = (swoove * 13.0 - i)*.4;
float swd = 1. - swoove*swoove;
if (swd < 0) swd = 0;
if (swd > 1) swd = 1;
swd = pow(swd, .5);
PaintRange(v(i, 21, 46), v(1, 2, 1), 17, swd * 255); //Random little platform
}
}
Room 4
Time 100
Start (6.5 31.5 49)
Exit (5 47 43) (1 1 2)
AnimateOpen (6 33 48) (1 1 2)
AnimateClose (3 28 48) (6 1 2)
# Main room.
EmptyBox (3 33 43) (15 15 16) 2 255
# Tucked away (For start point)
EmptyBox (3 28 47) (6 5 3) 2
# Space on ceiling.
PaintRange (2 32 57) (17 17 3) EndRender
# Lava walls
PaintRange (3 35 43) (1 10 2) 10
PaintRange (18 35 43) (1 10 2) 10
InitScript {
//Increasingly warped world.
for (int x = 0; x < 14; x++) {
WarpSpace(v(2 + x, 34, 42), v(3, 15, 20), v(.8f / (14 - x), .8f / (14 - x), .4f));
}
//Fill some lava in in a random pattern.
unsigned long i = 1;
for (int x = 0; x < 15; x++)
for (int y = 0; y < 11; y++) {
i = (i * 2089) % 491;
if (((i % 7) > 1)) {
QuickCell(0, v(3 + x, 35 + y, 43), 10, 60); //Lava
AddDeathBlock(v(3 + x, 35 + y, 43));
}
}
//Target in floor.
}
PaintRange (5 47 43) (1 1 1) Goal
RunScript {
for (int x = 0; x < 14; x++)
for (int y = 0; y < 14; y++) {
QuickCell(0, v(4 + x, 34 + y, 43 + 10), 9, (byte)(sin(x * 2 + y + timeInRoom)*80 + 80));
}
UpdateZone(v(3, 33, 43 + 10),v( 15, 15, 3));
}
Room 5
Time 15
Start (5.5 47.5 42)
Exit (5 31 31) (1 1 2)
AnimateOpen (5 47 43) (1 1 1)
EmptyBox (3 45 30) (4 4 13) 13
EmptyBox (3 30 30) (7 15 4) 13
ClearCell (5 45 31)
ClearCell (5 45 32)
Warp (3 34 30) (3 11 6) (1 .2 1)
Warp (7 34 30) (3 11 6) (1 5 1)
# Target in floor.
PaintRange (5 30 31) (1 1 2) Goal
Room 6
Time 30
Start (5.5 30.5 32)
Exit (5 15 31) (1 2 2)
AnimateOpen (5 30 31) (1 1 2)
EmptyBox (3 15 30) (5 15 4) 1
PaintRange (3 18 30) (5 7 1) 10 255
PaintRange (4 27 31) (1 3 3) 1 120
PaintRange (6 27 31) (1 3 3) 1 120
# Target on wall.
PaintRange (5 15 31) (1 1 2) Goal
# Hide warp zone next to door.
JumpSection (7 29 31) (2 1 3) (-2 4 -15) (1 0 0) (0 0 1) (0 1 0)
Room 7
Time 150
Start (5.5 16.5 32)
Exit (23 7 21) (1 1 2)
AnimateOpen (5 15 31) (1 1 2)
# Mini waiting platform
EmptyBox (2 2 30) (13 13 18) Dirt 115
PaintRange (3 14 30) (5 3 1) Stone 120
PaintRange (3 15 30) (5 1 4) Stone 120
# Warp from top of first to top of second.
JumpSection (2 2 41) (13 13 1) (0 -19 -65) (1 0 0) (0 -1 0) (0 0 -1)
# Adn vice versa
JumpSection (2 2 25) (13 13 1) (0 -19 -65) (1 0 0) (0 -1 0) (0 0 -1)
EmptyBox (2 2 20) (22 13 5) Stone 115
ClearRange (14 3 19) (5 12 2)
# Lava pit
EmptyBox (13 2 18) (5 13 1) Lava 115
DieInRange (13 1 18) (7 15 3)
InitScript {
//Put a little mound of pickables over in the corner.
pickables_in_inventory = 0;
ClearPickableBlocks();
int x, y, z;
for (x = 0; x < 3; x++) {
for (y = 0; y < 3; y++) {
for (z = 0; z < 2; z++) {
PlacePickableAt(v(x + 5, y + 5, z + 31), -(x + y) - z * 2.0 - 2);
}
}
}
char lavamap[8 * 8] = {
0, 1, 1, 1, 1, 1, 1, 0,
1, 1, 0, 0, 0, 0, 1, 1,
1, 0, 1, 0, 0, 1, 0, 1,
1, 0, 0, 0, 0, 0, 0, 1,
1, 0, 1, 1, 1, 1, 0, 1,
1, 0, 0, 1, 1, 0, 0, 1,
1, 1, 0, 0, 0, 0, 1, 1,
0, 1, 1, 1, 1, 1, 1, 0,
};
//Now, in the goal chamber add some lava.
for (x = 0; x < 8; x++)
for (y = 0; y < 8; y++) {
if (lavamap[x + y * 8]) {
QuickCell(0, v(4 + x, 4 + y, 20), 10, 60); //Lava
AddDeathBlock(v(4 + x, 4 + y, 20));
}
}
//Goal
PaintRange(v(24, 7, 21), v(1, 1, 2), GOAL_BLOCK, 255);
}
Room 8
Time 200
Start (23 7.5 22)
Exit (16 46 54) (2 2 2)
AnimateOpen (24 7 21) (1 1 2)
RequireRoom 7
RequireRoom 4
InitScript {
pickables_in_inventory = 0;
ClearPickableBlocks();
for (int x = 0; x < 2; x++) {
for (int y = 0; y < 4; y++) {
for (int z = 0; z < 2; z++) {
PlacePickableAt(v(x + 6, y + 29, z + 48), -(x + y)*.5 - z * .5);
}
}
}
}
PaintRange (3 28 48) (6 1 2) Bedrock
PaintRange (5 47 43) (1 1 1) Bedrock
PaintRange (6 33 48) (1 1 2) Goal 0
# But block the exit.
JumpSection (25 7 21) (3 2 3) (-19 24 27)
ClearCell (17 48 55)
ClearCell (16 48 55)
ClearCell (16 48 54)
ClearCell (17 48 54)
PaintRange (16 48 54) (2 1 2) Goal
Room 9
Time 200
Start (17.4 49.8 55.1)
Exit (4 65 48) (2 2 2)
AnimateOpen (16 48 54) (2 1 2)
RequireRoom 8
PaintRange (15 45 53) (3 3 1) Water 130
# Draw whatever tubes and all.
EmptyBox (2 49 46) (17 17 10) 3
ClearRange (16 49 54) (2 1 2)
PaintRange (2 49 46) (17 16 1) 10 60
PaintRange (4 66 47) (2 1 3) Goal
RunScript {
static int firstRun = 1;
static char lifemap[256];
static char newlife[256];
static float TimeTransition;
if(firstRun) {
firstRun = 0;
int i = 10;
for (int x = 0; x < 16; x++) {
for (int y = 0; y < 16; y++) {
i = (i * 2089) % 491;
if (((i % 7) > 2)) {
newlife[x + y * 16] = 1;
}
}
}
}
//Fix life map up.
if (TimeTransition >= 1) {
memcpy(lifemap, newlife, sizeof (lifemap));
for (int x = 0; x < 16; x++) {
for (int y = 0; y < 16; y++) {
int alive = lifemap[x + y * 16];
int qty =
loopingarrayaccess(lifemap, 16, 16, x - 1, y - 1) +
loopingarrayaccess(lifemap, 16, 16, x - 1, y) +
loopingarrayaccess(lifemap, 16, 16, x - 1, y + 1) +
loopingarrayaccess(lifemap, 16, 16, x, y - 1) +
loopingarrayaccess(lifemap, 16, 16, x, y) +
loopingarrayaccess(lifemap, 16, 16, x, y + 1) +
loopingarrayaccess(lifemap, 16, 16, x + 1, y - 1) +
loopingarrayaccess(lifemap, 16, 16, x + 1, y) +
loopingarrayaccess(lifemap, 16, 16, x + 1, y + 1);
newlife[x + y * 16] = alive;
if (qty == 3 || qty == 4)
newlife[x + y * 16] = 1;
else if (qty > 4)
newlife[x + y * 16] = 0;
else if (qty < 2)
newlife[x + y * 16] = 0;
}
}
TimeTransition -= 1;
}
for (int x = 0; x < 16; x++) {
for (int y = 0; y < 16; y++) {
double den = ((double) lifemap[x + y * 16]) * (1. - TimeTransition) + ((double) newlife[x + y * 16]) * TimeTransition;
QuickCell(0, v(3 + x, 50 + y, 47), 5, den*255);
}
}
UpdateZone(v(3,50,47), v(19, 66, 47));
TimeTransition += worldDeltaTime;
if (gPositionZ < 47.8) die();
}
Room 10
Time 200
Start (5.1 65.2 48)
Exit (3 76 47) (2 2 2)
AnimateOpen (4 66 47) (2 1 3)
RequireRoom 9
EmptyBox (2 67 46) (6 10 10) 4
ClearRange (4 67 47) (2 1 3)
Warp (2 67 46) (10 10 10) (.3 .3 1)
Warp (7 67 51) (2 10 1) (.3 1.5 .5)
PaintRange (3 70 46) (10 3 1) 10
PaintRange (4 74 46) (1 1 1) Goal
DieInRange (3 70 46) (6 3 2.1)
RunScript {
for (int z = 46; z < 57; z++)
for (int y = 67; y < 77; y++) {
if ((y + z)&1) continue;
QuickCell(0,v(2, y, z), 5, (byte)(sin(timeInRoom * 10.0 + z + y)*50.5 + 160));
}
UpdateZone(v(1, 66, 46), v(1, 10, 10));
for (int z = 46; z < 57; z++)
for (int x = 2; x < 12; x++) {
if ((x + z)&1) continue;
QuickCell(0,v(x, 77, z), 5, (byte)(sin(timeInRoom * 10.0 + x + z)*50.5 + 160));
}
UpdateZone(v(1, 76, 46),v(10, 1, 10));
for (int y = 67; y < 77; y++)
for (int x = 2; x < 12; x++) {
if ((y + x)&1) continue;
QuickCell(0,v(x, y, 56), 5, (byte)(sin(timeInRoom * 10.0 + x + y)*50.5 + 160));
}
UpdateZone(v(2, 67, 56), v(10, 10, 1));
}
Room 11
RequireRoom 10
Time 100
Start (4 74 48)
AnimateOpen (4 74 46) (1 1 1)
EmptyBox (2 67 36) (6 10 10) 4 100
#JumpSection (3 67 37) (3 1 3) (0 5 0)
#JumpSection (3 77 37) (3 1 3) (0 -9 0)
#Cell (3 74 38) 17
RunScript {
ChangeCell(3, 74, 38, 17, timeInRoom*50);
float a = timeInRoom*0.1;
JumpSpaceExtended(v(3,67,37), v(3,1,3), v(0,5,0), v(1,0,0), v(0,cosf(a),-sinf(a)), v(0,sinf(a),cosf(a)));
}