'sk8 basic by sephiroth
 
' CODE START

1
open window 640,512
setrgb 1,23,59,121
fill rect 40,40,600,472
setrgb 1,0,0,0
text 170,80,"M A T T    P R O D U C T I O N S"
text 240,100,"P R E S E N T S"

setrgb 1,255,86,41
text 270,200,"sk8 basic"
text 250,210,"____________"

setrgb 1,25,186,41
text 260,300,"press start"

c = peek("port1")
if and(c,8) = 8 goto obs
setdrawbuf dw
dw = 1 - dw
setdispbuf dw
goto 1

label obs
2
clear window
open window 640,512
setrgb 1,255,255,255
text 165,100,"OBJECTIVE: Score 60,000 points"
c = peek("port1")
if and(c,16384) = 16384 goto 3
setdrawbuf dw
dw = 1 -dw
setdispbuf dw
goto 2

3
x = 50:y = 400
x2 = 150:y2 = 410
xadj = 0
yadj = 0
delay = -1
ollie = 370
onrail = 0
score = 0
jump = 0
kf = 0
mxtime = 3020
ob1 = 0
ob2 = 0
ob3 = 0
open window 640,512
label start
setrgb 1,0,56,0
fill rect 0,0,640,512
setrgb 1,150,90,56
fill rect 0,421,640,512
setrgb 1,54,5,3
for verta = 590 to 640
vertb = 1000 - verta
line verta,420,636,vertb
next verta
setrgb 1,0,0,255
fill rect 330,407,400,412
fill rect 350,412,353,420
fill rect 380,412,383,420

setrgb 1,0,0,0
line x - 5,y-10,x-25,y-10+ind
fill circle x-15,y-15,5
line x-15,y,x-15,y-15
line x-15,y-5+(xadj)*5,x-5,y+5
line x-15,y-5,x-25+(xadj)*5,y+5
setrgb 1,200,0,0
fill circle x-5,y+15,3
fill circle x-23,y+15,3
line x-30,y+10,x+5,y+10

setrgb 1,120,0,40
line x2-5,y2-10,x2-25,y2-10+ind
fill circle x2-15,y2-15,5
line x2-15,y2,x2-15,y2-15
line x2-15,y2-5+(xadj)*5,x2-5,y2+5
line x2-15,y2-5,x2-25+(xadj)*5,y2+5

if kf = 1 then
setrgb 1,0,50,0
text 20,105,"                               "
setrgb 1,0,0,0
text 20,105,"kickflip                   "
setrgb 1,0,56,0
fill circle x-5,y+15,3
fill circle x-23,y+15,3
line x-30,y+10,x+5,y+10
setrgb 1,200,0,0
fill circle x-5,y+7,3
fill circle x-25,y+7,3
line x-30,y+12,x+5,y+12
if y > 390 bail = 1
kf = 0
score = score + 20
end if

if vkf = 1 then
setrgb 1,0,56,0
text 20,105,"                                     "
setrgb 1,0,0,0
text 20,105,"varial kickflip                 "
setrgb 1,0,56,0
fill circle x-5,y+15,3
fill circle x-23,y+15,3
line x-30,y+10,x+5,y+10
setrgb 1,200,0,0
fill circle x-5,y+19,3
fill circle x-23,y+26,3
line x-30,y+22,x+5,y+9
if y > 390 bail = 1
vkf = 0
score = score + 40
end if

if hst = 1 then
setrgb 1,0,56,0
text 20,105,"                                     "
setrgb 1,0,0,0
text 20,105,"handstand                           "
setrgb 1,0,56,0
line x-5,y-10,x-25,y-10+ind
fill circle x-15,y-15,5
line x-15,y,x-15,y-15
line x-15,y-5+(xadj)*5,x-5,y-5
line x-15,y-5,x-25+(xadj)*5,y+5
setrgb 1,0,0,0
line x-5,y-20,x-15,y-12
line x-15,y-10,x-30,y-12
fill circle x-15,y-2,5
line x-15,y-5+(xadj)*5,x-5,y+5
line x-15,y-5,x-25+(xadj)*5,y+5
ob2 = 1
hst = 0
score = score + 1
end if

setrgb 1,255,255,255
text 20,78,"SCORE"
text 80,78,str$(score)
if ob1 = 0 and score >= 100000 ob1 = 1
if bail = 1 then
setrgb 1,0,56,0
text 20,105,"                                     "
setrgb 1,255,0,0
text 20,105,"BAILED                         "
score = score - 90
wait 1
bail = 0
end if

if ob1 = 1 then
setrgb 1,0,0,0
text 155,120,"OBJECTIVE 1 COMPLETE"
end if

p = peek("port1")
if and(p,32) = 32 then
speed = speed + .2
xadj = 1
end if
if and(p,16384) = 16384 then
yadj = -1
end if
if and(p,128) = 128 then
speed = speed + .2
xadj = -1
end if
if and(p,64) = 64 then
speed = speed - .2
end if
if and(p,32784) = 32784 then
if y < 390 kf = 1
end if
if and(p,32832) = 32832 then
if y < 390 vkf = 1
end if
if and(p,3840) = 3840 then
hst = 1
end if

x = x + xadj * speed
y = y + yadj
if speed >3 speed = 3
if speed <0 then
speed = 0
xadj = 0
end if


if y < ollie then
yadj = 0
y = 400
end if

if x < 3 then
xadj = 1
end if

if x > 638 then
xadj = -1
end if

if x > 328 and x < 402 and yadj = -1 onrail = 1
if onrail = 1 then
rtime = rtime + 1
yadj = 0:y = 385
setrgb 1,0,0,0
text 20,105,"50-50 grind"
if rtime <> 2 score = score + 5
end if
if onrail = 1 then
if and(p,16) = 16 then
xadj = 0
y = 400
rtime = 0
onrail = 0
setrgb 1,0,0,0
text 20,105,"                       "
end if
end if
if rtime >= 76 then
setrgb 1,0,56,0
text 20,105,"                             "
setrgb 1,255,0,0
text 20,105,"bailed                "
bail = 0
rtime = 0
onrail = 0
y = 400
xadj = 0
for paws = 1 to 50000:next paws
end if
if onrail = 1 and xadj = 1 and x > 328 then
onrail = 0
rtime = 0
yadj = -1
setrgb 1,0,56,0
text 20,105,"                      "
end if
if onrail = 1 and xadj = -1 and x > 328 then
onrail = 0
rtime = 0
yadj = -1
setrgb 1,0,56,0
text 20,105,"                           "
end if

if x > 590 then
setrgb 1,0,0,0
text 20,105,"indy           "
ind = 12
delay = 1000 * speed
jump = jump + 1
jum2 = jump
if abs(jump) > 4 jum2 = abs(4 * speed - jump)
x = 590 + jum2
y = 400 - (jum2^2)
if jump >=4 * speed then
jump = 0
score = score + 450
x = 590
xadj = -1
delay = -1
ind = 0
setrgb 1,0,0,0
text 20,105,"indy           "
end if
end if

if xadj = 1 then
setrgb 1,0,0,0
text 450,105,"              "
setrgb 1,0,0,0
text 450,105,"REGULAR"
end if

if xadj = -1 then
setrgb 1,0,0,0
text 450,105,"                 "
setrgb 1,0,0,0
text 450,105,"SWITCH"
end if

for i = 1 to delay:next i
mxtime = mxtime - 1
setrgb 1,0,0,0
text 80,20,"TIME  :   " + str$(int(mxtime/50))

if mxtime <= 0 end
setdrawbuf dw
dw = 1 - dw
setdispbuf dw

goto start


'CODE END



