TGC Codebase Backup



Sphere Hopper (Level 2) by Daygamer

6th Mar 2009 14:03
Summary

Jump gaps, ride moving platform and dodge enemies. No Media!



Description

If you are reading this and you haven't played level 1 of the Sphere Hopper series than exit right now! No just kidding, but you might want to play the levels in order. The second level of Sphere Hopper is my favorite. It's probably easier than the first, because of my lack of planning the levels. Oh well! I call it the playground because you climb up the huge stairs in the start, and then run down the big slide at the end. The hardest part of the level is the middle where you must ride across a series of moving platforms. One more thing, I have hidden a Day Games Explore Bonus on this level. It flashes with brilliance. Can you find it? Hint: if you stop to rest right before you go down the slide watch your back... Have a good time!!!



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    hide mouse
ink rgb(85,0,85),0

Menu:
cls
do
set text size 30 : center text 320,50,"PRESS SPACE TO PLAY OR"
set text size 30 : center text 320,90,"PRESS ENTER TO SEE CONTROLS"
if spacekey()=1
gosub L2
endif
if returnkey()=1
gosub HTP
endif
loop

HTP:
cls
wait 200
set text size 25 : center text 200,30,"UP = MOVE FORWARD"
set text size 25 : center text 200,70,"DOWN = MOVE BACKWARD"
set text size 25 : center text 200,110,"RIGHT = TURN RIGHT"
set text size 25 : center text 500,30,"LEFT = TURN LEFT"
set text size 25 : center text 500,70,"SPACE = JUMP"
set text size 25 : center text 500,110,"P = PAUSE"
set text size 20 : center text 320,170,"PRESS ENTER TO RETURN TO MENU"
do
if returnkey()=1
gosub Menu
endif
loop

rem level 2 ================================================================
L2:
cls
set text size 80 : center text 320,170,"SPHERE HOPPER"
wait 1000
set text size 70 : center text 320,250,"LEVEL 2"
wait 3000
cls
autocam off : hide mouse
sync on : sync rate 30
ink rgb(1000,1000,1000),0

rem put controled object in level 2
make object sphere 1,1.5
color object 1,rgb(30,30,225)
position object 1,0,10000,0
point object 1,0,10000,100
make object collision box 1,-0.5,-0.5,-0.5,0.5,0.5,0.5,0

rem sky
color backdrop 0

rem day-games explore bonus
make object box 90,2,2,2
position object 90,-100,10007.5,390

rem end gate
make object sphere 97,8
color object 97,rgb(30,30,225)
position object 97,-100,9974.75,99
ghost object on 97

make object box 96,5,0,5
position object 96,-100,9975,99
hide object 96

rem ground boxes
make object box 3,8,2,8
position object 3,0,10000,0
color object 3,rgb(85,0,85)
make static object 3
objx#=object position x(3)
objy#=object position y(3)
objz#=object position z(3)
objsx#=object size x(3)/2.0
objsy#=object size y(3)/2.0
objsz#=object size z(3)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

make object box 4,24,2,24
position object 4,0,9995,8
color object 4,rgb(85,0,85)
make static object 4
objx#=object position x(4)
objy#=object position y(4)
objz#=object position z(4)
objsx#=object size x(4)/2.0
objsy#=object size y(4)/2.0
objsz#=object size z(4)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

make object box 5,24,2,24
position object 5,0,9995,75
color object 5,rgb(85,0,85)
make static object 5
objx#=object position x(5)
objy#=object position y(5)
objz#=object position z(5)
objsx#=object size x(5)/2.0
objsy#=object size y(5)/2.0
objsz#=object size z(5)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

make object box 6,24,2,24
position object 6,0,9998,102
color object 6,rgb(85,0,85)
make static object 6
objx#=object position x(6)
objy#=object position y(6)
objz#=object position z(6)
objsx#=object size x(6)/2.0
objsy#=object size y(6)/2.0
objsz#=object size z(6)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

make object box 7,24,2,24
position object 7,0,10001,129
color object 7,rgb(85,0,85)
make static object 7
objx#=object position x(7)
objy#=object position y(7)
objz#=object position z(7)
objsx#=object size x(7)/2.0
objsy#=object size y(7)/2.0
objsz#=object size z(7)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

make object box 8,24,2,12
position object 8,0,10003,150
color object 8,rgb(85,0,85)
make static object 8
objx#=object position x(8)
objy#=object position y(8)
objz#=object position z(8)
objsx#=object size x(8)/2.0
objsy#=object size y(8)/2.0
objsz#=object size z(8)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

make object box 9,24,2,12
position object 9,0,10006,165
color object 9,rgb(85,0,85)
make static object 9
objx#=object position x(9)
objy#=object position y(9)
objz#=object position z(9)
objsx#=object size x(9)/2.0
objsy#=object size y(9)/2.0
objsz#=object size z(9)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

make object box 10,24,2,12
position object 10,0,10009,180
color object 10,rgb(85,0,85)
make static object 10
objx#=object position x(10)
objy#=object position y(10)
objz#=object position z(10)
objsx#=object size x(10)/2.0
objsy#=object size y(10)/2.0
objsz#=object size z(10)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

make object box 11,24,2,12
position object 11,0,10012,195
color object 11,rgb(85,0,85)
make static object 11
objx#=object position x(11)
objy#=object position y(11)
objz#=object position z(11)
objsx#=object size x(11)/2.0
objsy#=object size y(11)/2.0
objsz#=object size z(11)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

make object box 12,24,2,12
position object 12,0,10015,210
color object 12,rgb(85,0,85)
make static object 12
objx#=object position x(12)
objy#=object position y(12)
objz#=object position z(12)
objsx#=object size x(12)/2.0
objsy#=object size y(12)/2.0
objsz#=object size z(12)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

make object box 13,24,2,6
position object 13,-100,10015,325
color object 13,rgb(85,0,85)
make static object 13
objx#=object position x(13)
objy#=object position y(13)
objz#=object position z(13)
objsx#=object size x(13)/2.0
objsy#=object size y(13)/2.0
objsz#=object size z(13)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

make object box 14,24,2,6
position object 14,-100,10015,311
color object 14,rgb(85,0,85)
make static object 14
objx#=object position x(14)
objy#=object position y(14)
objz#=object position z(14)
objsx#=object size x(14)/2.0
objsy#=object size y(14)/2.0
objsz#=object size z(14)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

make object box 15,24,2,200
position object 15,-100,9994.25,211
xrotate object 15,168
color object 15,rgb(85,0,85)

make object box 16,30,2,30
position object 16,-100,9973,99
color object 16,rgb(85,0,85)
make static object 16
objx#=object position x(16)
objy#=object position y(16)
objz#=object position z(16)
objsx#=object size x(16)/2.0
objsy#=object size y(16)/2.0
objsz#=object size z(16)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

make object box 17,18,2,30
position object 17,-103,9999,225
color object 17,rgb(85,0,85)
make static object 17
objx#=object position x(17)
objy#=object position y(17)
objz#=object position z(17)
objsx#=object size x(17)/2.0
objsy#=object size y(17)/2.0
objsz#=object size z(17)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

make object box 18,30,16,2
position object 18,-100,9995,200
color object 18,rgb(85,0,85)
make static object 18
objx#=object position x(18)
objy#=object position y(18)
objz#=object position z(18)
objsx#=object size x(18)/2.0
objsy#=object size y(18)/2.0
objsz#=object size z(18)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

make object box 19,16,2,16
position object 19,-175,9977,210
color object 19,rgb(85,0,85)
make static object 19
objx#=object position x(19)
objy#=object position y(19)
objz#=object position z(19)
objsx#=object size x(19)/2.0
objsy#=object size y(19)/2.0
objsz#=object size z(19)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

make object box 20,60,2,16
position object 20,-137.5,9985,210
zrotate object 20,15
color object 20,rgb(85,0,85)

make object box 21,24,2,24
position object 21,-100,9973,25
color object 21,rgb(85,0,85)
make static object 21
objx#=object position x(21)
objy#=object position y(21)
objz#=object position z(21)
objsx#=object size x(21)/2.0
objsy#=object size y(21)/2.0
objsz#=object size z(21)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

make object box 22,12,2,12
position object 22,-100,10005,390
color object 22,rgb(85,0,85)
make static object 21
objx#=object position x(22)
objy#=object position y(22)
objz#=object position z(22)
objsx#=object size x(22)/2.0
objsy#=object size y(22)/2.0
objsz#=object size z(22)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

make object box 23,12,12,2
position object 23,-100,10011,384
color object 23,rgb(85,0,85)
make static object 23
objx#=object position x(23)
objy#=object position y(23)
objz#=object position z(23)
objsx#=object size x(23)/2.0
objsy#=object size y(23)/2.0
objsz#=object size z(23)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

make object box 24,2,12,12
position object 24,-106,10011,390
color object 24,rgb(85,0,85)
make static object 24
objx#=object position x(24)
objy#=object position y(24)
objz#=object position z(24)
objsx#=object size x(24)/2.0
objsy#=object size y(24)/2.0
objsz#=object size z(24)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

make object box 25,2,12,12
position object 25,-94,10011,390
color object 25,rgb(85,0,85)
make static object 25
objx#=object position x(25)
objy#=object position y(25)
objz#=object position z(25)
objsx#=object size x(25)/2.0
objsy#=object size y(25)/2.0
objsz#=object size z(25)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#

rem jewels
make object cube 185,1
make object cone 85,1 : xrotate object 85,180 : color object 85,rgb(750,10,0)
position object 85,0,9997,0
position object 185,0,9997,0
hide object 185

make object cube 186,1
make object cone 86,1 : xrotate object 86,180 : color object 86,rgb(750,10,0)
position object 86,-100,10017,325
position object 186,-100,10017,325
hide object 186

make object cube 187,1
make object cone 87,1 : xrotate object 87,180 : color object 87,rgb(750,10,0)
position object 87,0,10017,210
position object 187,0,10017,210
hide object 187

make object cube 188,1
make object cone 88,1 : xrotate object 88,180 : color object 88,rgb(750,10,0)
position object 88,-100,10004,200
position object 188,-100,10004,200
hide object 188

make object cube 189,1
make object cone 89,1 : xrotate object 89,180 : color object 89,rgb(750,10,0)
position object 89,-175,9979,210
position object 189,-175,9979,210
hide object 189

make object cube 191,1
make object cone 91,1 : xrotate object 91,180 : color object 91,rgb(750,10,0)
position object 91,-100,9975,20
position object 191,-100,9975,20
hide object 191

rem jewel conterparts
make object cone 285,1 : xrotate object 285,180
position object 285,-95,9982.25,99.5

make object cone 286,1 : xrotate object 286,180
position object 286,-99,9982.25,99.5

make object cone 287,1 : xrotate object 287,180
position object 287,-97,9982.25,99.5

make object cone 288,1 : xrotate object 288,180
position object 288,-103,9982.25,99.5

make object cone 289,1 : xrotate object 289,180
position object 289,-101,9982.25,99.5

make object cone 291,1 : xrotate object 291,180
position object 291,-105,9982.25,99.5

rem moving platforms
make object box 108,9,1,9
color object 108,rgb(0,100,0)
position object 108,0,9995,25
make object collision box 108,-5,-1,-5,5,1,5,0

make object box 109,9,1,9
color object 109,rgb(0,100,0)
position object 109,0,10015,240
make object collision box 109,-5,-1,-5,5,1,5,0

make object box 110,9,1,9
color object 110,rgb(0,100,0)
position object 110,0,10015,270
make object collision box 110,-5,-1,-5,5,1,5,0

make object box 111,9,1,9
color object 111,rgb(0,100,0)
position object 111,-25,10015,300
point object 111,0,10015,300
make object collision box 111,-5,-1,-5,5,1,5,0

make object box 112,9,1,9
color object 112,rgb(0,100,0)
position object 112,-50,10015,309
point object 112,-25,10015,309
make object collision box 112,-5,-1,-5,5,1,5,0

make object box 113,9,1,9
color object 113,rgb(0,100,0)
position object 113,-75,10015,318
point object 113,-100,10015,318
make object collision box 113,-5,-1,-5,5,1,5,0

make object box 114,9,1,9
color object 114,rgb(0,100,0)
position object 114,-100,9973,50
point object 114,-100,9973,99
make object collision box 114,-5,-1,-5,5,1,5,0

make object box 115,9,9,1
color object 115,rgb(0,100,0)
position object 115,-100,10045,318
point object 115,-100,10015,318
make object collision box 115,-5,-1,-5,5,1,5,0

make object box 116,9,1,9
color object 116,rgb(0,100,0)
position object 116,-100,10000,325
make object collision box 116,-5,-1,-5,5,1,5,0

rem enimies
make object box 208,5,5,5
color object 208,rgb(1000,10,10)
position object 208,0,9997.5,67
point object 208,12,9997.5,67

make object box 209,5,5,5
color object 209,rgb(1000,10,10)
position object 209,0,10000.5,96
point object 209,10,10000.5,96

make object box 210,5,5,5
color object 210,rgb(1000,10,10)
position object 210,0,10000.5,106
point object 210,-10,10000.5,106

make object box 211,5,5,5
color object 211,rgb(1000,10,10)
position object 211,0,10005.5,150
point object 211,-10,10005.5,150

make object box 212,5,5,5
color object 212,rgb(1000,10,10)
position object 212,0,10011.5,180
point object 212,10,10011.5,180

make object box 213,5,5,5
color object 213,rgb(1000,10,10)
position object 213,0,10014.5,195
point object 213,10,10014.5,195

make object box 214,5,5,5
color object 214,rgb(1000,10,10)
position object 214,-100,10014,285
point object 214,-112,10014,285

make object box 215,5,5,5
color object 215,rgb(1000,10,10)
position object 215,-100,10007,255
point object 215,-88,10007,255

make object box 216,5,5,5
color object 216,rgb(1000,10,10)
position object 216,-100,9990,175
point object 216,-88,9990,175

make object box 217,5,5,5
color object 217,rgb(1000,10,10)
position object 217,-100,9988,165
point object 217,-112,9988,165

make object box 218,5,5,5
color object 218,rgb(1000,10,10)
position object 218,-100,9986,155
point object 218,-88,9986,155

make object box 219,5,5,5
color object 219,rgb(1000,10,10)
position object 219,-100,9984,145
point object 219,-88,9984,145

make object box 220,5,5,5
color object 220,rgb(1000,10,10)
position object 220,-100,9982,135
point object 220,-88,9982,135

make object box 221,5,5,5
color object 221,rgb(1000,10,10)
position object 221,-100,9976,30
point object 221,-112,9976,30

rem stoppers
make object box 300,1,1,1
position object 300,12,9997.5,67
hide object 300

make object box 301,1,1,1
position object 301,-12,9997.5,67
hide object 301

make object box 302,1,1,1
position object 302,12,10000.5,96
hide object 302

make object box 303,1,1,1
position object 303,-12,10000.5,96
hide object 303

make object box 304,1,1,1
position object 304,12,10000.5,106
hide object 304

make object box 305,1,1,1
position object 305,-12,10000.5,106
hide object 305

make object box 306,1,1,1
position object 306,12,10005.5,150
hide object 306

make object box 307,1,1,1
position object 307,-12,10005.5,150
hide object 307

make object box 308,1,1,1
position object 308,12,10011.5,180
hide object 308

make object box 309,1,1,1
position object 309,-12,10011.5,180
hide object 309

make object box 310,1,1,1
position object 310,12,10014.5,195
hide object 310

make object box 311,1,1,1
position object 311,-12,10014.5,195
hide object 311

make object box 312,1,1,1
position object 312,0,10015,300
hide object 312

make object box 313,1,1,1
position object 313,-112,10014,285
hide object 313

make object box 314,1,1,1
position object 314,-88,10014,285
hide object 314

make object box 315,1,1,1
position object 315,-112,10007,255
hide object 315

make object box 316,1,1,1
position object 316,-88,10007,255
hide object 316

make object box 317,1,1,1
position object 317,-112,9990,175
hide object 317

make object box 318,1,1,1
position object 318,-88,9990,175
hide object 318

make object box 319,1,1,1
position object 319,-112,9988,165
hide object 319

make object box 320,1,1,1
position object 320,-88,9988,165
hide object 320

make object box 321,1,1,1
position object 321,-112,9986,155
hide object 321

make object box 322,1,1,1
position object 322,-88,9986,155
hide object 322

make object box 323,1,1,1
position object 323,-112,9984,145
hide object 323

make object box 324,1,1,1
position object 324,-88,9984,145
hide object 324

make object box 325,1,1,1
position object 325,-112,9982,135
hide object 325

make object box 326,1,1,1
position object 326,-88,9982,135
hide object 326

make object box 327,1,1,1
position object 327,-112,9976,30
hide object 327

make object box 328,1,1,1
position object 328,-88,9976,30
hide object 328

make object box 329,24,1,6
position object 329,-100,10016,311
hide object 329

make object box 330,9,0,9
position object 330,-100,10001,325
hide object 330

make object box 331,9,9,9
position object 331,-100,10001,410
hide object 331

make object box 350,3000,1000,3000
position object 350,0,9910,0
hide object 350

rem start off player gravity
playergrav#=0.1

rem main loop --------------------------------------------------------------
do

rem make Day games Explore Bonus flash!
color object 90,rgb(rnd(1000),rnd(1000),rnd(1000))

rem level 2 print
center text 320,20,"LEVEL 2"
set text to italic
set text size 40

rem move platforms and enimies; rotate jewels
move object 108,0.1
move object 208,0.25
move object 209,0.25
move object 210,0.25
move object 211,0.25
move object 212,0.25
move object 213,0.25
move object 109,-0.1
move object 110,0.1
move object 111,0.1
move object 112,0.1
move object 113,0.1
move object 214,0.25
move object 215,0.25
move object 216,0.25
move object 217,0.25
move object 218,0.25
move object 219,0.25
move object 220,0.25
move object 114,0.1
move object 221,0.25
yrotate object 85,wrapvalue(object angle y(85)-2)
yrotate object 86,wrapvalue(object angle y(86)-2)
yrotate object 87,wrapvalue(object angle y(87)-2)
yrotate object 88,wrapvalue(object angle y(88)-2)
yrotate object 89,wrapvalue(object angle y(89)-2)
yrotate object 91,wrapvalue(object angle y(91)-2)

rem jewel pickup
if object collision(1,185) then hide object 85 : position object 185,0,10000,0 : color object 285,rgb(750,10,0)
if object collision(1,186) then hide object 86 : position object 186,0,10000,0 : color object 286,rgb(750,10,0)
if object collision(1,187) then hide object 87 : position object 187,0,10000,0 : color object 287,rgb(750,10,0)
if object collision(1,188) then hide object 88 : position object 188,0,10000,0 : color object 288,rgb(750,10,0)
if object collision(1,189) then hide object 89 : position object 189,0,10000,0 : color object 289,rgb(750,10,0)
if object collision(1,191) then hide object 91 : position object 191,0,10000,0 : color object 291,rgb(750,10,0)

if object collision(3,185) then yrotate object 285,wrapvalue(object angle y(285)-4)
if object collision(3,186) then yrotate object 286,wrapvalue(object angle y(286)-4)
if object collision(3,187) then yrotate object 287,wrapvalue(object angle y(287)-4)
if object collision(3,188) then yrotate object 288,wrapvalue(object angle y(288)-4)
if object collision(3,189) then yrotate object 289,wrapvalue(object angle y(289)-4)
if object collision(3,191) then yrotate object 291,wrapvalue(object angle y(291)-4)

rem control moving platforms
if object collision(108,4) then point object 108,0,9995,100
if object collision(108,5) then point object 108,0,9995,50

if object collision(109,12) then point object 109,0,10015,10
if object collision(109,110) then point object 109,0,10015,300 : point object 110,0,10015,300

if object collision(110,312) then point object 110,0,10015,250

if object collision(111,312) then point object 111,-50,10015,300
if object collision(111,112) then point object 111,-0,10015,300 : point object 112,-75,10015,309
if object collision(112,113) then point object 112,-25,10015,309 : point object 113,-100,10015,318
if object collision(113,13) then point object 113,-50,10015,318

if object collision(114,16) then point object 114,-100,9973,25
if object collision(114,21) then point object 114,-100,9973,99

if object collision(1,329) then move object 115,0.1
if object collision(1,330) then move object 116,0.1
if object collision(1,330) then move object 330,0.1
if object collision(330,331) then move object 330,10

rem control enimies
if object collision(208,300) then point object 208,-10,9997.5,67
if object collision(208,301) then point object 208,10,9997.5,67

if object collision(209,302) then point object 209,-10,10000.5,96
if object collision(209,303) then point object 209,10,10000.5,96

if object collision(210,304) then point object 210,-10,10000.5,106
if object collision(210,305) then point object 210,10,10000.5,106

if object collision(211,306) then point object 211,-10,10005.5,150
if object collision(211,307) then point object 211,10,10005.5,150

if object collision(212,308) then point object 212,-10,10011.5,180
if object collision(212,309) then point object 212,10,10011.5,180

if object collision(213,310) then point object 213,-10,10014.5,195
if object collision(213,311) then point object 213,10,10014.5,195

if object collision(214,313) then point object 214,-88,10014,285
if object collision(214,314) then point object 214,-112,10014,285

if object collision(215,315) then point object 215,-88,10008,255
if object collision(215,316) then point object 215,-112,10008,255

if object collision(216,317) then point object 216,-88,9990,175
if object collision(216,318) then point object 216,-112,9990,175

if object collision(217,319) then point object 217,-88,9988,165
if object collision(217,320) then point object 217,-112,9988,165

if object collision(218,321) then point object 218,-88,9986,155
if object collision(218,322) then point object 218,-112,9986,155

if object collision(219,323) then point object 219,-88,9984,145
if object collision(219,324) then point object 219,-112,9984,145

if object collision(220,325) then point object 220,-88,9982,135
if object collision(220,326) then point object 220,-112,9982,135

if object collision(221,327) then point object 221,-88,9976,30
if object collision(221,328) then point object 221,-112,9976,30

rem enter endgate
if object collision(1,96) then if spacekey()=1
delete object 3
delete object 4
delete object 5
delete object 6
delete object 7
delete object 8
delete object 9
delete object 10
delete object 11
delete object 12
delete object 13
delete object 14
delete object 15
delete object 16
delete object 17
delete object 18
delete object 19
delete object 20
delete object 21
delete object 22
delete object 23
delete object 24
delete object 25
delete object 300
delete object 301
delete object 302
delete object 303
delete object 304
delete object 305
delete object 306
delete object 307
delete object 308
delete object 309
delete object 310
delete object 311
delete object 312
delete object 313
delete object 314
delete object 315
delete object 316
delete object 317
delete object 318
delete object 319
delete object 320
delete object 321
delete object 322
delete object 323
delete object 324
delete object 325
delete object 326
delete object 327
delete object 328
delete object 329
delete object 330
delete object 331
delete object 351
gosub W
endif

rem day-games explore bonus pickup
if object collision(1,90) then if spacekey()=1
position object 1,0,20000,0
position camera -100,10007.5,392.5
point camera -100,10007.5,0
wait 5000
delete object 3
delete object 4
delete object 5
delete object 6
delete object 7
delete object 8
delete object 9
delete object 10
delete object 11
delete object 12
delete object 13
delete object 14
delete object 15
delete object 16
delete object 17
delete object 18
delete object 19
delete object 20
delete object 21
delete object 22
delete object 23
delete object 24
delete object 25
delete object 300
delete object 301
delete object 302
delete object 303
delete object 304
delete object 305
delete object 306
delete object 307
delete object 308
delete object 309
delete object 310
delete object 311
delete object 312
delete object 313
delete object 314
delete object 315
delete object 316
delete object 317
delete object 318
delete object 319
delete object 320
delete object 321
delete object 322
delete object 323
delete object 324
delete object 325
delete object 326
delete object 327
delete object 328
delete object 329
delete object 330
delete object 331
delete object 351
gosub W
endif

rem game over
if object collision(1,350) then position object 1,0,10005,0 : delete object 350 : make object box 351,3000,10,3000 : position object 351,0,9910,0
if object collision(1,350) then wait 4000
if object collision(1,351) then position object 112,-50,10015,309 : position object 108,0,9995,25 : position object 109,0,10015,240 : position object 110,0,10015,270 : position object 111,-25,10015,300 : position object 113,-75,10015,318
if object collision(1,351) then wait 3000 : position object 1,0,10005,0 : point object 1,0,10005,100
if object collision(1,351) then delete object 351 : make object box 351,3000,100,3000 : position object 351,0,-80,0 : position object 114,-100,9973,50 : position object 115,-100,10045,318 : position object 116,-100,10000,325
hide object 351
if object collision(1,208) then position object 112,-50,10015,309 : position object 108,0,9995,25 : position object 109,0,10015,240 : position object 110,0,10015,270 : position object 111,-25,10015,300 : position object 113,-75,10015,318
if object collision(1,208) then position object 114,-100,9973,50 : position object 115,-100,10045,318 : position object 116,-100,10000,325
if object collision(1,208) then wait 3000 : position object 1,0,10005,0 : point object 1,0,10005,100
if object collision(1,209) then position object 112,-50,10015,309 : position object 108,0,9995,25 : position object 109,0,10015,240 : position object 110,0,10015,270 : position object 111,-25,10015,300 : position object 113,-75,10015,318
if object collision(1,209) then position object 114,-100,9973,50 : position object 115,-100,10045,318 : position object 116,-100,10000,325
if object collision(1,209) then wait 3000 : position object 1,0,10005,0 : point object 1,0,10005,100
if object collision(1,210) then position object 112,-50,10015,309 : position object 108,0,9995,25 : position object 109,0,10015,240 : position object 110,0,10015,270 : position object 111,-25,10015,300 : position object 113,-75,10015,318
if object collision(1,210) then position object 114,-100,9973,50 : position object 115,-100,10045,318 : position object 116,-100,10000,325
if object collision(1,210) then wait 3000 : position object 1,0,10005,0 : point object 1,0,10005,100
if object collision(1,211) then position object 112,-50,10015,309 : position object 108,0,9995,25 : position object 109,0,10015,240 : position object 110,0,10015,270 : position object 111,-25,10015,300 : position object 113,-75,10015,318
if object collision(1,211) then position object 114,-100,9973,50 : position object 115,-100,10045,318 : position object 116,-100,10000,325
if object collision(1,211) then wait 3000 : position object 1,0,10005,0 : point object 1,0,10005,100
if object collision(1,212) then position object 112,-50,10015,309 : position object 108,0,9995,25 : position object 109,0,10015,240 : position object 110,0,10015,270 : position object 111,-25,10015,300 : position object 113,-75,10015,318
if object collision(1,212) then position object 114,-100,9973,50 : position object 115,-100,10045,318 : position object 116,-100,10000,325
if object collision(1,212) then wait 3000 : position object 1,0,10005,0 : point object 1,0,10005,100
if object collision(1,213) then position object 112,-50,10015,309 : position object 108,0,9995,25 : position object 109,0,10015,240 : position object 110,0,10015,270 : position object 111,-25,10015,300 : position object 113,-75,10015,318
if object collision(1,213) then position object 114,-100,9973,50 : position object 115,-100,10045,318 : position object 116,-100,10000,325
if object collision(1,213) then wait 3000 : position object 1,0,10005,0 : point object 1,0,10005,100
if object collision(1,214) then position object 112,-50,10015,309 : position object 108,0,9995,25 : position object 109,0,10015,240 : position object 110,0,10015,270 : position object 111,-25,10015,300 : position object 113,-75,10015,318
if object collision(1,214) then position object 114,-100,9973,50 : position object 115,-100,10045,318 : position object 116,-100,10000,325
if object collision(1,214) then wait 3000 : position object 1,0,10005,0 : point object 1,0,10005,100
if object collision(1,215) then position object 112,-50,10015,309 : position object 108,0,9995,25 : position object 109,0,10015,240 : position object 110,0,10015,270 : position object 111,-25,10015,300 : position object 113,-75,10015,318
if object collision(1,215) then position object 114,-100,9973,50 : position object 115,-100,10045,318 : position object 116,-100,10000,325
if object collision(1,215) then wait 3000 : position object 1,0,10005,0 : point object 1,0,10005,100
if object collision(1,216) then position object 112,-50,10015,309 : position object 108,0,9995,25 : position object 109,0,10015,240 : position object 110,0,10015,270 : position object 111,-25,10015,300 : position object 113,-75,10015,318
if object collision(1,216) then position object 114,-100,9973,50 : position object 115,-100,10045,318 : position object 116,-100,10000,325
if object collision(1,216) then wait 3000 : position object 1,0,10005,0 : point object 1,0,10005,100
if object collision(1,217) then position object 112,-50,10015,309 : position object 108,0,9995,25 : position object 109,0,10015,240 : position object 110,0,10015,270 : position object 111,-25,10015,300 : position object 113,-75,10015,318
if object collision(1,217) then position object 114,-100,9973,50 : position object 115,-100,10045,318 : position object 116,-100,10000,325
if object collision(1,217) then wait 3000 : position object 1,0,10005,0 : point object 1,0,10005,100
if object collision(1,218) then position object 112,-50,10015,309 : position object 108,0,9995,25 : position object 109,0,10015,240 : position object 110,0,10015,270 : position object 111,-25,10015,300 : position object 113,-75,10015,318
if object collision(1,218) then position object 114,-100,9973,50 : position object 115,-100,10045,318 : position object 116,-100,10000,3252
if object collision(1,218) then wait 3000 : position object 1,0,10005,0 : point object 1,0,10005,100
if object collision(1,219) then position object 112,-50,10015,309 : position object 108,0,9995,25 : position object 109,0,10015,240 : position object 110,0,10015,270 : position object 111,-25,10015,300 : position object 113,-75,10015,318
if object collision(1,219) then position object 114,-100,9973,50 : position object 115,-100,10045,318 : position object 116,-100,10000,325
if object collision(1,219) then wait 3000 : position object 1,0,10005,0 : point object 1,0,10005,100
if object collision(1,220) then position object 112,-50,10015,309 : position object 108,0,9995,25 : position object 109,0,10015,240 : position object 110,0,10015,270 : position object 111,-25,10015,300 : position object 113,-75,10015,318
if object collision(1,220) then position object 114,-100,9973,50 : position object 115,-100,10045,318 : position object 116,-100,10000,325
if object collision(1,220) then wait 3000 : position object 1,0,10005,0 : point object 1,0,10005,100
if object collision(1,221) then position object 112,-50,10015,309 : position object 108,0,9995,25 : position object 109,0,10015,240 : position object 110,0,10015,270 : position object 111,-25,10015,300 : position object 113,-75,10015,318
if object collision(1,221) then position object 114,-100,9973,50 : position object 115,-100,10045,318 : position object 116,-100,10000,325
if object collision(1,221) then wait 3000 : position object 1,0,10005,0 : point object 1,0,10005,100

rem store old positions
oldposx#=object position x(1)
oldposy#=object position y(1)
oldposz#=object position z(1)

rem controls
if upkey()=1 then move object 1,0.35
if downkey()=1 then move object 1,-0.35
if leftkey()=1 then yrotate object 1,wrapvalue(object angle y(1)-3)
if rightkey()=1 then yrotate object 1,wrapvalue(object angle y(1)+3)
if spacekey()=1 and playergrav#=0 then playergrav#=0.35
if inkey$()="p" then wait 500 : suspend for key

rem get current object position
posx#=object position x(1)
posy#=object position y(1)
posz#=object position z(1)

rem gravity
playergrav#=playergrav#-0.01
posy#=posy#+playergrav#

rem sliding collision
position object 1,posx#,posy#,posz#
if object collision(1,0)>0
	dec posx#,get object collision x()
	dec posy#,get object collision y()
	dec posz#,get object collision z()
	playergrav#=-0.0
endif

rem set size for controled object
s#=object size y(1)/2.0

rem ensure camera stays out of static boxes
if get static collision hit(oldposx#-s#,oldposy#-s#,oldposz#-s#,oldposx#+s#,oldposy#+s#,oldposz#+s#,posx#-s#,posy#-s#,posz#-s#,posx#+s#,posy#+s#,posz#+s#)=1
	dec posx#,get static collision x()
	dec posy#,get static collision y()
	dec posz#,get static collision z()	
	if get static collision y()<>0.0 then playergrav#=0.0
endif

rem update with new object position
position object 1,posx#,posy#,posz#

rem camera
angle#=object angle y(1)
camdist#=5.5 : camhigh#=posy#+0.8 : camfade#=3.5
set camera to follow posx#,posy#,posz#,angle#,camdist#,camhigh#,camfade#,1
xrotate camera 10

rem end loop
sync
loop

rem win
W:
do
set text to bold : set text size 60 : center text 320,70,"CONGRATULATIONS"
set text size 40 : center text 320,130,"TRY THE OTHER TWO LEVELS"
loop
suspend for key
end