SOURCE CODE! You need to copy the source code into DBC and then compile it (make sure you do this in the folder you unzipped the game into)
Level 1 Source Code
Rem * Title : TOR_level1
Rem * Author : Drew Cameron
Rem * Date : 30/1/04
rem ================================================================
rem The Old Remedy
rem Challenge Mode - The High School ( REMASTERED )
rem Coded by Drew Cameron drewcameron@ddrw.com
rem ================================================================
rem Hide mouse etc...
hide mouse : autocam off
fog on : fog distance 0
sync on : sync rate 0 : set camera range 1,2000
backdrop off : cls
sleep 500
rem LEVEL BRIEF IMAGE
rem -------------------------------------------------------------------
load sound "sound/click.wav",2
load image "wide2.bmp",1037
sprite 2,0,430,1037 : set sprite 2,0,0
repeat
ink rgb(255,255,255),1
text 10,10,"The Old Remedy 3D Skateboarding"
text 10,25,"LEVEL 1 - GLEN URQUHART HIGH SCHOOL"
text 10,55,"It's another wet day at Glen Urquhart High School and most of the pupils"
text 10,70,"are enjoying lunch break inside. You are Neil, 16 years old. You skate around the school"
text 10,85,"grounds minding your own business when suddenly you hear Martin call you..."
text 10,115,"Martin is funny, cool, good at voice acting and popular with the ladies. Despite"
text 10,130,"the bad weather it seems to be your lucky day... Martin calls you over! If you can impress"
text 10,145,"Martin you might earn some serious respect..."
text 10,175,"You make your way through the poring rain towards Martin..."
sync
if returnkey()=1 then continue=1
if joystick fire a()=1 then continue=1
until continue=1
cls : sync
play sound 2
delete image 1037 : delete sprite 2
rem Player Object - (1,3,4,5)
load object "modelstemp.x",1
yrotate object 1,90
fix object pivot 1
scale object 1,350,350,350
xrotate object 1,350
fix object pivot 1
set object speed 1,10
load object "modelstemp.x",3
yrotate object 3,90
fix object pivot 3
scale object 3,350,350,350
xrotate object 3,350
fix object pivot 3
set object speed 3,18
load image "Models/jean.bmp",2 : load image "Models/skin.bmp",3
load image "Models/white.bmp",4
texture limb 1,2,2 : texture limb 1,11,2
texture limb 1,12,2 : texture limb 1,14,2
texture limb 1,15,2 : texture limb 1,5,4
texture limb 1,6,3 : texture limb 1,7,3
texture limb 1,9,3 : texture limb 1,10,3
texture limb 1,3,4 : texture limb 1,8,4
texture limb 3,2,2 : texture limb 3,11,2
texture limb 3,12,2 : texture limb 3,14,2
texture limb 3,15,2 : texture limb 3,5,4
texture limb 3,6,3 : texture limb 3,7,3
texture limb 3,9,3 : texture limb 3,10,3
texture limb 3,3,4 : texture limb 3,8,4
rem Shadow (Cylinder Crushed) - ( 2 )
make object sphere 2,10 : scale object 2,140,1,140
load image "shadow.bmp",7 : texture object 2,7
rem LEVEL CREATING
rem -------------------------------------------------------------------
rem Enviroment FLOOR ( 1000 )
make object plain 1000,1000,1000 : load image "ground.bmp",1000
texture object 1000,1000
xrotate object 1000,90
fix object pivot 1000
set object 1000,1,0,0
delete image 1000
rem High School Building Front ( 1001 )
make object plain 1001,1005,120 : position object 1001,500,60,0
load image "school.bmp",1001 : texture object 1001,1001
yrotate object 1001,90 : scale object texture 1001,6,1
delete image 1001
rem High School Library ( 1002 )
make object cylinder 1002,120
position object 1002,500,59,-420 : scale object 1002,200,100,200
load image "school2.bmp",1002
texture object 1002,1002 : scale object texture 1002,4,1
delete image 1002
rem 4 Silver Gates ( 1003,1004,1005,1006 )
load image "gate.bmp",1003
for gate=1003 to 1006
make object plain gate,60,30
texture object gate,1003 : set object gate,1,0,0
next gate
position object 1003,20,15,-180
position object 1004,20,15,-85
position object 1005,20,15,325
position object 1006,20,15,415
delete image 1003
rem Big Kicker Ramp ( 1007 )
make object box 1007,35,40,30 : xrotate object 1007,290
position object 1007,260,-7,130 : load image "kicker.bmp",1007
texture object 1007,1007
delete image 1007
rem North Backdrop Wall ( 1008 )
make object plain 1008,1000,250 : position object 1008,0,90,-500
load image "backdrop/1.bmp",1008 : texture object 1008,1008
set object 1008,1,0,0
rem South Backdrop Wall ( 1009 )
make object plain 1009,1000,250 : position object 1009,0,90,500
load image "backdrop/2.bmp",1009 : texture object 1009,1009
set object 1009,1,0,0
delete image 1009
rem Shadow of person ( 1010)
make object sphere 1010,10 : scale object 1010,140,1,140
load image "shadow.bmp",2
texture object 1010,2
position object 1010,397,0.3,-189
delete image 2
rem East Backdrop Wall ( 1011 )
make object plain 1011,1020,250 : position object 1011,-500,90,0
load image "backdrop/4.bmp",1011 : texture object 1011,1011
yrotate object 1011,90
set object 1011,1,0,0
delete image 1011
rem Yellow Bin ( 1012 )
make object cylinder 1012,10
xrotate object 1012,90 : fix object pivot 1012 : yrotate object 1012,90
position object 1012,-172,5,90 : load image "yellow.bmp",1012
texture object 1012,1012 : scale object 1012,100,100,300
delete image 1012
rem Rail ( 1013 )
make object box 1013,220,2,2 : position object 1013,-340,1,0 : load image "rail.bmp",1013
texture object 1013,1013
yrotate object 1013,90 : scale object texture 1013,4,1
delete image 1013
rem Geography Weather Station ( 1014 )
make object plain 1014,17,32
position object 1014,20,16,140 : load image "thing.bmp",1014
texture object 1014,1014 : set object 1014,1,0,0
delete image 1014
rem Rain Image ( IMG 1015 ) for Rain Sprites
load image "rain.bmp",1015
dim rainx(30)
dim rainy(30)
for rain=1 to 30
rainx(rain)=rnd(640)
rainy(rain)=rnd(200)
next rain
rem High School Front Reflection ( 1017 )
make object plain 1017,1005,120 : position object 1017,500,-60,0
load image "schoolR.bmp",1017 : texture object 1017,1017
yrotate object 1017,90 : scale object texture 1017,6,1
delete image 1017
rem Library Reflection ( 1018 )
make object cylinder 1018,120
position object 1018,500,-60,-420 : scale object 1018,200,100,200
load image "school2R.bmp",1018
texture object 1018,1018 : scale object texture 1018,4,1
delete image 1018
rem Martin ( 1121 )
load image "P2.bmp",1122
make object plain 1121,13.2,28 : set object 1121,1,0,0 : texture object 1121,1122
position object 1121,397,14,-189
delete image 1122
rem Puddles ( 1024 - 1034 )
load image "Shadoww.bmp",1023
for puddle=1024 to 1034
make object plain puddle,15,15 : xrotate object puddle,90
ghost object on puddle : texture object puddle,1023 : fix object pivot puddle
next puddle
rem Splashes
load image "splash.bmp",1035
for splash=1035 to 1045
make object plain splash,10,10
texture object splash,1035 : set object splash,1,0,0
next splash
rem SETTING UP INTRO MOVIE
rem -------------------------------------------------------------------
inc ca#,180 : a#=100 : fmvsound=100
dialogue=0 : x#=327 : z#=-200
load image "wide.bmp",1036
load image "wide2.bmp",1037
sprite 1,0,0,1036 : set sprite 1,0,0
sprite 2,0,430,1037 : set sprite 2,0,0
load sound "sound/rainloop.wav",1 : loop sound 1
backdrop on : color backdrop rgb(255,255,255)
cls
fog off
load sound "sound/fmv1.wav",2
repeat
YROTATE OBJECT 1121,CAMERA ANGLE Y()
gosub enviroment
if displayingtext=0
if ca#=<115
play sound 2 : displayingtext=1
endif
endif
if displayingtext=1
text 320,75,"KING MARTIN:"
text 320,75+30,"Hey Neil you haven't done"
text 320,75+45,"anything all day, now's your chance to"
text 320,75+60,"impress me!"
text 320,75+90,"IMPRESS MARTIN TO ADVANCE!"
endif
sprite 1,0,0,1036
sprite 2,0,430,1037
if dialogue=<3
ca#=wrapvalue(curveangle(a#,ca#,200.0))
position camera 327,23,-200 : yrotate camera wrapvalue(ca#)
endif
if returnkey()=1 then endmovie=1
if joystick fire a()=1 then endmovie=1
sync
until endmovie=1
rem SETTING UP GAME LOOP
rem -------------------------------------------------------------------
fog on
x#=260 : z#=379 : a#=180 : likeamount=5 : cproximity#=100
delete sprite 1 : delete sprite 2 : delete sound 2
if sprite exist(3)=1
delete sprite 3
endif
rem Bottom Left HUD Sprites (Challenge, smily face)
challenge#=10
load image "challenge/1.bmp",10
load image "challenge/1_bg.bmp",11
load image "challenge/bar.bmp",18
set sprite 2,0,0
sprite 3,20,413,11
sprite 4,21,415,18
rem Load Sound effects 100 onwards
load sound "sound/skate1.wav",100
load sound "sound/skate2.wav",101
load sound "sound/pop.wav",102
load sound "sound/land.wav",103
load sound "sound/kicker.wav",104
load sound "sound/grind.wav",105
load 3dsound "sound/gate.wav",106
load 3dsound "sound/martin1.wav",107
fog off
set sound volume 1,95
rem MAIN PROGRAM LOOP
rem -------------------------------------------------------------------
do
oldx#=x# : oldz#=z# : oldmove#=move#
gosub movementandcamera
gosub ollie
gosub kicker
gosub grinding
gosub shadows
gosub collide
gosub enviroment
gosub challenge
gosub 3dsound
gosub sound
sync
loop
rem Moving around and Camera Controls
movementandcamera:
if move#=<1
if upkey()=1 then move#=1
if joystick up()=1 then move#=1
endif
if upkey()=1 then inc move#,0.07
if joystick up()=1 then inc move#,0.07
if move#=>0.08
if downkey()=1 then dec move#,0.08
if joystick down()=1 then dec move#,0.08
endif
if ollie=0
if leftkey()=1 then a#=wrapvalue(a#-2.2)
if rightkey()=1 then a#=wrapvalue(a#+2.2)
if joystick left()=1 then a#=wrapvalue(a#-1.9)
if joystick right()=1 then a#=wrapvalue(a#+1.9)
endif
if move#=>0.04 then dec move#,0.010
if move#=>5 then dec move#,0.07
if move#=<0.05 then move#=0
x#=newxvalue(x#,a#,move#) : z#=newzvalue(z#,a#,move#)
position object 1,x#,y#,z# : yrotate object 1,a#
position object 3,x#,y#,z# : yrotate object 3,a#
if cproximity#=<-100 then cproximity#=100
cx#=newxvalue(x#,wrapvalue(a#+180),cproximity#) : cz#=newzvalue(z#,wrapvalue(a#+180),cproximity#) : cy#=y#+30.0
position camera cx#,cy#,cz# : point camera x#,y#+20,z#
if cproximity#=>10
if cx#=>480 then dec cproximity#,10 : keepcamera=0
if cx#=<-480 then dec cproximity#,10 : keepcamera=0
if cz#=>480 then dec cproximity#,10 : keepcamera=0
if cz#=<-480 then dec cproximity#,10 : keepcamera=0
endif
if cx#=>-440
if cx#=<440
if cz#=>-440
if cz#=<440
if cproximity#=<100 then inc cproximity#,2
endif
endif
endif
endif
if move#=0 then set object frame 1,5
if ollie=0
show object 1
if move#=>0.04 then set object frame 1,58
hide object 3
endif
if ollie=2
show object 3 : hide object 1
endif
return
rem The Ollie
ollie:
if ollie=0
if move#=>0.05
if spacekey()=1 then ollie=1 : incyamount#=2.3 : INC impress#,1 : play sound 102
if joystick fire a()=1 then ollie=1 : incyamount#=2.3 : INC impress#,1 : play sound 102
endif
endif
if ollie=1
play object 3,38,58 : trick=0
ollie=2
endif
if ollie=2
inc y#,incyamount#
dec incyamount#,0.15
if y#=<0.1 then y#=0 : ollie=0 : play sound 103
if trick=0
if returnkey()=1 then play object 3,81,94 : trick=1 : inc impress#,likeamount : dec likeamount
if shiftkey()=1 then play object 3,130,142 : trick=2 : inc impress#,likeamount : dec likeamount
if joystick fire c()=1 then play object 3,81,94 : trick=1 : inc impress#,likeamount : dec likeamount
if joystick fire d()=1 then play object 3,130,142 : trick=2 : inc impress#,likeamount : dec likeamount
endif
if trick=1
if object frame(3)=>93 then trick=0
endif
if trick=2
if object frame(3)=>141 then trick=0
endif
endif
return
rem Big Kicker
kicker:
if ollie=0
if x#=>260-17
if x#=<260+17
if z#=>130-17+MOVE#
if z#=<130+20
ollie=1 : incyamount#=3
INC impress#,5 : play sound 104
endif
endif
endif
endif
endif
return
rem Grinding the Green Rail Code
grinding:
if move#=>2
if grind=0
if y#=<2
if x#=>object position x(1013)-30
if x#=<object position x(1013)+30
if z#=>object position z(1013)-110
if z#=<object position z(1013)+110
if z#=>oldz#
if controlkey()=1 then grind=1
if joystick fire b()=1 then grind=1
endif
if z#=<oldz#
if controlkey()=1 then grind=2
if joystick fire b()=1 then grind=2
endif
endif
endif
endif
endif
endif
endif
endif
if grind=1
INC impress#
x#=-340
a#=0
move#=oldmove# : y#=7
if spacekey()=1 then ollie=1 : incyamount#=2 : INC impress#,2 : hinder#=0.5 : grind=0 : likeamount=7
if joystick fire a()=1 then ollie=1 : incyamount#=2 : INC impress#,2 : hinder#=0.5 : grind=0 : likeamount=7
if z#=>110 then y#=0 : grind=0 : likeamount=3
endif
if grind=2
INC impress#
x#=-340
a#=180
move#=oldmove# : y#=7
if spacekey()=1 then ollie=1 : incyamount#=2 : INC impress#,2 : hinder#=0.5 : grind=0 : likeamount=7
if joystick fire a()=1 then ollie=1 : incyamount#=2 : INC impress#,2 : hinder#=0.5 : grind=0 : likeamount=7
if z#=<-110 then y#=0 : grind=0 : likeamount=3
endif
return
rem Shadows,Lighting and Popup
shadows:
position object 2,x#,0.3,z# : scale object 2,100-y#*2,0.1,100-y#*2
yrotate object 1014,camera angle y()
yrotate object 1121,camera angle y()
return
rem Collision map
collide:
if move#=>0.01
for gate=1003 to 1006
if x#=>object position x(gate)-30
if x#=<object position x(gate)+30
if z#=>object position z(gate)-5
if z#=<object position z(gate)+5
if sound playing(106)=0
gatex=object position x(gate)
gatez=object position z(gate)
play sound 106
endif
z#=oldz# : dec impress#
endif
endif
endif
endif
next gate
if x#=>490 then x#=oldx#
if x#=<-390 then x#=oldx#
if z#=>490 then z#=oldz#
if z#=<-490 then z#=oldz#
if x#=>500-120
if x#=<500+120
if z#=>-420-120
if z#=<-420+120 then x#=oldx# : z#=oldz# : move#=0
endif
endif
endif
if ollie=0
if x#=<45
if x#=>-15
if z#=<-180 then x#=oldx# : z#=oldz# : dec impress#
endif
endif
if x#=<45
if x#=>-15
if z#=>-85
if z#=<325 then x#=oldx# : z#=oldz# : dec impress#
endif
endif
endif
if x#=<45
if x#=>-15
if z#=>415 then x#=oldx# : z#=oldz# : dec impress#
endif
endif
endif
endif
if ollie=0
if x#=>-172-15
if x#=<-172+15
if z#=>90-5
if z#=<90+5 then z#=oldz#
endif
endif
endif
endif
if ollie=2
if x#=>-172-15
if x#=<-172+15
if z#=>90-5
if z#=<90+5 then likeamount=6
endif
endif
endif
endif
return
rem Enviroment
enviroment:
for rain=1001 to 1030
sprite rain,rainx(rain-1000),rainy(rain-1000),1015
rainy(rain-1000)=rainy(rain-1000)+16
if rainy(rain-1000)=>480 then rainy(rain-1000)=0-rnd(300)
next rain
for ripple=1024 to 1034
catchx#=x#-200 : catchz#=z#-200
if rnd(2)=1
newx#=catchx#+rnd(400) : newz#=catchz#+rnd(400)
newx2#=catchx#+rnd(400) : newz2#=catchz#+rnd(400)
position object ripple,newx#,-0.4,newz#
position object ripple+11,newx2#,5,newz2#
endif
next ripple
for splash=1035 to 1045
yrotate object splash,camera angle y()
next splash
return
rem Challenge
challenge:
inc reset
if reset=500 then likeamount=6 : reset=0
inc unimpressed
if finished=0
if unimpressed=25 then unimpressed=0 : dec impress#
endif
if impress#=<0 then impress#=0
if impress#=>99 then finished=1 : impress#=100
stretch sprite 4,impress#,100
sprite 1,20,433,challenge#
if finished=1
center text 320,240,"PRESS DOWN TO STOP!"
if move#=0 then cls : goto challengedone
endif
return
rem 3D Sound Handling
3dsound:
position listener cx#,cy#,cz#
rotate listener 0,wrapvalue(360.0-ca#),0
position sound 106,gatex,cy#,gatez
position sound 107,397,cy#,-189
if rnd(1100)=1 then play sound 107
return
rem Sound Handling
sound:
skatersound=100
if x#=>-75
if x#=<-13 then skatersound=101
endif
if skatersound=100 then stop sound 101
if skatersound=101 then stop sound 100
if ollie=0
if move#*100=>100
set sound speed 100,8000*move#
set sound speed 101,8000*move#
loop sound skatersound
else
pause sound skatersound
endif
else
pause sound skatersound
endif
if grind=>1
stop sound 100
stop sound 101
loop sound 105
else
stop sound 105
endif
return
rem CHALLENGE COMPLETED
rem -------------------------------------------------------------------
challengedone:
fog on
set sound volume 1,100
load sound "music/end.wav",10
delete sprite 1 : delete sprite 2 : delete sprite 4
delete sprite 3
load image "wide.bmp",1036
load image "wide2.bmp",1037
load image "challenge/ticket.bmp",1038
sprite 1,0,0,1036 : set sprite 1,0,0
sprite 2,0,430,1037 : set sprite 2,0,0
camerazpan=-400
set sound volume 1,100
fog off
time=0 : x#=327 : z#=-200
ticketx=700
load sound "sound/fmv2.wav",2
play sound 10
repeat
center text 320,240,"CHALLENGE COMPLETED!"
position camera -400,40,camerazpan
x#=-400 : z#=camerazpan
point camera 0,0,0
if camerazpan=<400 then inc camerazpan
gosub enviroment
sync
if returnkey()=1 then nextending=1
if joystick fire a()=1 then nextending=1
until nextending=1
repeat
until returnkey()=0
repeat
until joystick fire a()=0
repeat
x#=327 : z#=-200
position camera 327,14,-200 : point camera 397,17.4,-220
YROTATE OBJECT 1121,CAMERA ANGLE Y()
gosub enviroment
if showtext=0
inc time
if time=50 then play sound 2 : showtext=1
endif
if showtext=1
text 320,75,"KING MARTIN:"
text 320,75+30,"Hey here's your reward."
text 320,75+135,"£10"
text 320,75+150,"NEXT LEVEL - A82"
sprite 3,320,75+60,1038
endif
sync
if returnkey()=1 then finishchallenge=1
if joystick fire a()=1 then finishchallenge=1
until finishchallenge=1
write to clipboard "GO2"
execute file "C2.exe",s$,d$ : end
Level 2 Source Code
Rem * Title : TOR_level1
Rem * Author : Drew Cameron
Rem * Date : 30/1/04
rem ================================================================
rem The Old Remedy
rem Free Skate - A82 ( REMASTERED )
rem Coded by Drew Cameron drewcameron@ddrw.com
rem ================================================================
rem Hide mouse etc...
hide mouse : autocam off
fog on : fog distance 0
sync on : sync rate 0 : set camera range 1,6000
backdrop off : cls
sleep 500
rem LEVEL BRIEF IMAGE
load sound "sound/click.wav",2
load image "wide2.bmp",1037
sprite 2,0,430,1037 : set sprite 2,0,0
repeat
ink rgb(255,255,255),1
text 10,10,"The Old Remedy 3D Skateboarding"
text 10,25,"LEVEL 2 - A82"
text 10,55,"The weather has turned for the better and you can't see a cloud in the sky."
text 10,70,"You are going to the Eastgate shopping centre with the money Martin gave you."
text 10,85,"As you skate along a glimmer in the distance catches your eye... It's a beer can! "
text 10,115,"In fact, someone has left a trail of beer cans! You must seize this opportunity to get drunk,"
text 10,130,"you'd better hurry though otherwise those beers will go warm in the sun!"
sync
if returnkey()=1 then continue=1
if joystick fire a()=1 then continue=1
until continue=1
cls : sync
play sound 2
delete image 1037 : delete sprite 2
rem Player Object - (1,3,4,5)
load object "modelstemp.x",1
yrotate object 1,90
fix object pivot 1
scale object 1,350,350,350
xrotate object 1,350
fix object pivot 1
set object speed 1,10
load object "modelstemp.x",3
yrotate object 3,90
fix object pivot 3
scale object 3,350,350,350
xrotate object 3,350
fix object pivot 3
set object speed 3,18
load image "Models/jean.bmp",2 : load image "Models/skin.bmp",3
load image "Models/white.bmp",4
texture limb 1,2,2 : texture limb 1,11,2
texture limb 1,12,2 : texture limb 1,14,2
texture limb 1,15,2 : texture limb 1,5,4
texture limb 1,6,3 : texture limb 1,7,3
texture limb 1,9,3 : texture limb 1,10,3
texture limb 1,3,4 : texture limb 1,8,4
texture limb 3,2,2 : texture limb 3,11,2
texture limb 3,12,2 : texture limb 3,14,2
texture limb 3,15,2 : texture limb 3,5,4
texture limb 3,6,3 : texture limb 3,7,3
texture limb 3,9,3 : texture limb 3,10,3
texture limb 3,3,4 : texture limb 3,8,4
rem Shadow (Cylinder Crushed) - ( 2 )
make object sphere 2,10 : scale object 2,140,1,140
load image "shadow.bmp",7 : texture object 2,7
rem LEVEL CREATING
rem -------------------------------------------------------------------
rem Enviroment
make object plain 1000,500,8000 : xrotate object 1000,90
load image "ground2.bmp",1000 : texture object 1000,1000
scale object texture 1000,1,16
make object plain 1001,8000,30
position object 1001,249,15,0 : yrotate object 1001,90
load image "fence.bmp",1001
texture object 1001,1001 : scale object texture 1001,200,1
make object plain 1002,8000,200
position object 1002,-300,50,0 : yrotate object 1002,90
fix object pivot 1002
zrotate object 1002,45
load image "backdrop/14.bmp",1002 : texture object 1002,1002
scale object texture 1002,16,1
make object plain 1013,8000,280
yrotate object 1013,90
position object 1013,-400,150,0 : load image "backdrop/5.bmp",1013
texture object 1013,1013 : scale object texture 1013,14,1
set object 1013,1,0,0
rem Bus
make object plain 1014,70,70
load image "bus_front.bmp",1015 : texture object 1014,1015
make object plain 1015,220,70
yrotate object 1015,90
make object plain 1016,220,70
yrotate object 1016,90 : Load image "bus_back.bmp",1016
make object plain 1017,70,70 : texture object 1017,1016
busz=-1000
load image "bus_side.bmp",1014
texture object 1015,1014
texture object 1016,1014
make object box 1018,35,40,30 : xrotate object 1018,290
position object 1018,-40,-7,-1800 : load image "kicker.bmp",1018
texture object 1018,1018 : fix object pivot 1018
yrotate object 1018,180
make object plain 1040,70,220
xrotate object 1040,90 : load image "bustop.bmp",1040
texture object 1040,1040
rem Smoke
load image "smoke.bmp",1027
for smoke=1027 to 1037
make object plain smoke,30+rnd(10),30+rnd(10)
position object smoke,-40,-60,-100
TEXTURE OBJECT smoke,1027
ghost object on smoke
next smoke
make object sphere 1038,10 : scale object 1038,400,2,400
texture object 1038,7 : position object 1038,-40,0.3,-100
rem 95,0 -45
load image "barrier.bmp",1020
make object plain 1020,50,24
position object 1020,-45,12,1550
make object plain 1021,50,24
position object 1021,-45,12,2450
make object plain 1022,50,24
position object 1022,-45,12,2950
make object plain 1023,50,24
position object 1023,-45,12,3505
make object plain 1024,50,24
position object 1024,-45,12,-3505
make object plain 1025,50,24
position object 1025,-200,12,-3505
make object plain 1026,50,24
position object 1026,-200,12,3505
for barrier=1020 to 1026
texture object barrier,1020
set object barrier,1,0,0
next barrier
rem 115 for Lamps
lampz=-3000 : load image "lamp.bmp",1003
for lamp=1003 to 1009
make object plain lamp,45,110
position object lamp,112,55,lampz
texture object lamp,1003 : set object lamp,1,0,0
inc lampz,1000
next lamp
make object plain 1010,45,6000
xrotate object 1010,90
position object 1010,112,106,0
load image "lamp2.bmp",1010 : texture object 1010,1010
set object 1010,1,0,0
rem Beer Can
make object plain 1041,5,10
position object 1041,-73,10,-2000
load image "can.bmp",1041 : texture object 1041,1041
rem Arrow
make object plain 1042,20,20
load image "red.bmp",1042 : texture object 1042,1042
set object 1042,1,0,0,0,0
load image "spark.bmp",1027
dim rainx(10)
dim rainy(10)
for rain=1 to 10
rainx(rain)=rnd(80)
rainy(rain)=300+rnd(20)
next rain
rem SETTING UP INTRO MOVIE
rem -------------------------------------------------------------------
LOAD IMAGE "backdrop/17.bmp",100
backdrop on : texture backdrop 100
fog on
x#=-73 : z#=-3000 : a#=0 : time#=100
rem Level Music
load sound "sound/aloop.wav",1 : loop sound 1
rem Load Sound effects 100 onwards
load sound "sound/skate1.wav",100
load sound "sound/skate2.wav",101
load sound "sound/pop.wav",102
load sound "sound/land.wav",103
load sound "sound/kicker.wav",104
load sound "sound/grind.wav",105
load 3dsound "sound/bus.wav",106
load sound "sound/hit.wav",107
load 3dsound "sound/smoke.wav",108
load sound "sound/burp.wav",109
load sound "sound/time.wav",110
load sound "sound/timeup.wav",111
fog off
rem Movie
load image "wide.bmp",1000
load image "wide2.bmp",1001
sprite 1,0,0,1000 : set sprite 1,0,0
sprite 2,0,430,1001 : set sprite 2,0,0
camz=61
sync on
position camera -23,30,-1940
point camera -73,10,-2000
yrotate object 1041,camera angle y()
repeat
yrotate object 1041,camera angle y()
position camera -23,60,-1940
point camera -73,10,-2000
if showtext=0
inc time
if time=50 then showtext=1
endif
if showtext=1
text 15,75,"CHALLENGE INSTRUCTIONS:"
text 15,75+30,"You must collect all the beer cans"
text 15,75+45,"within the time limit. Cans are marked with a red indicator."
text 15,75+60,"After a few drinks you may start to feel disorientated."
text 15,75+90,"COLLECT 6 CANS WITHIN TIME LIMIT TO ADVANCE!"
endif
if returnkey()=1 then endmovie=1
if joystick fire a()=1 then endmovie=1
sync
until endmovie=1
repeat
until returnkey()=0
repeat
until joystick fire a()=0
delete sprite 1 : delete sprite 2
challenge#=10
load image "challenge/2.bmp",10
load image "challenge/time_bg.bmp",11
load image "challenge/bar.bmp",12
sprite 1,20,433,10
sprite 3,20,413,11
sprite 4,21,415,12
rem Level Music
set sound volume 1,95
rem MAIN PROGRAM LOOP
rem -------------------------------------------------------------------
do
oldx#=x# : oldz#=z# : oldmove#=move#
gosub movementandcamera
gosub ollie
gosub smoke
gosub grinding
gosub shadows
gosub collide
gosub enviroment
gosub 3dsound
gosub sound
gosub challenge
sync
loop
rem Moving around and Camera Controls
movementandcamera:
if move#=<1
if upkey()=1 then move#=1
if joystick up()=1 then move#=1
endif
if upkey()=1 then inc move#,0.07
if joystick up()=1 then inc move#,0.07
if move#=>0.08
if downkey()=1 then dec move#,0.08
if joystick down()=1 then dec move#,0.08
endif
if beernumber=<2
if ollie=0
if leftkey()=1 then a#=wrapvalue(a#-2.2)
if rightkey()=1 then a#=wrapvalue(a#+2.2)
if joystick left()=1 then a#=wrapvalue(a#-1.9)
if joystick right()=1 then a#=wrapvalue(a#+1.9)
endif
endif
if beernumber=>3
if ollie=0
if leftkey()=1 then a#=wrapvalue(a#+2.2)
if rightkey()=1 then a#=wrapvalue(a#-2.2)
if joystick left()=1 then a#=wrapvalue(a#+1.9)
if joystick right()=1 then a#=wrapvalue(a#-1.9)
endif
endif
if move#=>0.04 then dec move#,0.010
if move#=>5+maxmove# then dec move#,0.07
if move#=<0.05 then move#=0
x#=newxvalue(x#,a#,move#) : z#=newzvalue(z#,a#,move#)
position object 1,x#,y#,z# : yrotate object 1,a#
position object 3,x#,y#,z# : yrotate object 3,a#
cx#=newxvalue(x#,wrapvalue(a#+180),98) : cz#=newzvalue(z#,wrapvalue(a#+180),100) : cy#=y#+30.0
position camera cx#,cy#,cz# : point camera x#,y#+20,z#
if move#=0 then set object frame 1,5
if ollie=0
show object 1
if move#=>0.04 then set object frame 1,58
hide object 3
endif
if ollie=2
show object 3 : hide object 1
endif
return
rem The Ollie
ollie:
if ollie=0
if move#=>0.05
if spacekey()=1 then ollie=1 : incyamount#=2.3 : INC impress#,3 : play sound 102
if joystick fire a()=1 then ollie=1 : incyamount#=2.3 : INC impress#,3 : play sound 102
endif
endif
if ollie=1
play object 3,38,58 : trick=0
ollie=2
endif
if ollie=2
inc y#,incyamount#
dec incyamount#,0.15
if y#=<0.1 then y#=0 : ollie=0 : play sound 103
if trick=0
if returnkey()=1 then play object 3,81,94 : trick=1 : inc impress#,3
if shiftkey()=1 then play object 3,130,142 : trick=2 : inc impress#,3
if joystick fire c()=1 then play object 3,81,94 : trick=1 : inc impress#,3
if joystick fire d()=1 then play object 3,130,142 : trick=2 : inc impress#,3
endif
if trick=1
if object frame(3)=>93 then trick=0
endif
if trick=2
if object frame(3)=>141 then trick=0
endif
endif
return
rem Smoke
smoke:
if y#=<180
if x#=>-47-17
if x#=<-23+17
if z#=>-115-20
if z#=<-90
ollie=2 : incyamount#=5
endif
endif
endif
endif
endif
for smoke=1027 to 1037
yrotate object smoke,camera angle y()
position object smoke,-40,object position y(smoke)+rnd(30),-100
if object position y(smoke)=>170+rnd(90) then position object smoke,-40,-60,-100
next smoke
return
rem Grinding the Green Rail Code
grinding:
if grind=0
for rain=1001 to 1010
if sprite exist(rain)=1 then hide sprite rain
next rain
if x#=>70
if x#=<150
if z#=>-3000
if z#=<3000
if y#=>100
if y#=<112
if controlkey()=1
if z#=>oldz# then grind=1
if z#=<oldz# then grind=2
endif
if joystick fire b()=1
if z#=>oldz# then grind=1
if z#=<oldz# then grind=2
endif
endif
endif
endif
endif
endif
endif
endif
if grind=1
ollie=0 : a#=0 : x#=112 : y#=113
for rain=1001 to 1010
sprite rain,280+rainx(rain-1000),rainy(rain-1000),1027
show sprite rain
rainy(rain-1000)=rainy(rain-1000)+6
if rainy(rain-1000)=>480+rnd(80) then rainy(rain-1000)=300+rnd(60)
next rain
move#=oldmove#
loop sound 105
if spacekey()=1 then ollie=1 : incyamount#=2 : grind=0
if joystick fire a()=1 then ollie=1 : incyamount#=2 : grind=0
if z#=>3000 then ollie=1 : incyamount#=0 : grind=0
if z#=<-3000 then ollie=1 : incyamount#=0 : grind=0
endif
if grind=2
ollie=0
a#=180
x#=112
y#=113
for rain=1001 to 1010
sprite rain,280+rainx(rain-1000),rainy(rain-1000),1027
show sprite rain
rainy(rain-1000)=rainy(rain-1000)+6
if rainy(rain-1000)=>480+rnd(80) then rainy(rain-1000)=300+rnd(20)
next rain
move#=oldmove#
loop sound 105
if spacekey()=1 then ollie=1 : incyamount#=2 : grind=0
if joystick fire a()=1 then ollie=1 : incyamount#=2 : grind=0
if z#=>3000 then ollie=1 : incyamount#=0 : grind=0
if z#=<-3000 then ollie=1 : incyamount#=0 : grind=0
endif
return
rem Shadows,Lighting and Popup
shadows:
position object 2,x#,0.3,z# : scale object 2,100-y#*2,0.1,100-y#*2
return
rem Collision map
collide:
if x#=<-181 then x#=oldx#
if y#=<0.5
if x#=>0 then x#=oldx#
endif
if y#=<0.5
if x#=>3 then message$="OUT OF BOUNDS!" : backtostart=1
endif
if backtostart=1
x#=-73 : z#=-3000 : a#=0
move#=0 : cls : busz=4000
backtostart=2 : messagetime=0
endif
if backtostart=2
center text 320,240,message$
inc messagetime
if messagetime=>150 then backtostart=0
endif
if x#=>180 then x#=oldx#
if z#=>3500.1 then z#=-3500
if z#=<-3500.1 then z#=3500
if ollie=0
if x#=>-47-17
if x#=<-23+17
if z#=>-1815-20
if z#=<-1790
play sound 104
ollie=1 : incyamount#=3
INC impress#,5
endif
endif
endif
endif
endif
if y#=<65
if x#=>-165
if x#=<-95
if z#=<busz+220
if z#=>busz-5
play sound 107
message$="" : backtostart=1
endif
endif
endif
endif
endif
if y#=<80
if y#=>69
if x#=>-165
if x#=<-95
if z#=<busz+220
if z#=>busz-5
y#=70 : ollie=2 : incyamount#=0
dec z#,21
endif
endif
endif
endif
endif
endif
if x#=>-70
if x#=<-20
for barrier=1020 to 1022
if z#=>object position z(barrier)-3
if z#=<object position z(barrier)+3 then z#=oldz#
endif
next barrier
endif
endif
return
rem Enviroment
enviroment:
position object 1014,-130,35,busz
position object 1015,-165,35,busz+110
position object 1016,-95,35,busz+110
position object 1017,-130,35,busz+220
position object 1040,-130,70,busz+110
dec busz,21
if busz=<-5500 then busz=5500
return
rem 3D Sound Handling
3dsound:
position listener cx#,cy#,cz#
rotate listener 0,wrapvalue(360.0-ca#),0
position sound 106,-95,cy#,busz
position sound 108,-40,cy#,-100
inc gosound
if gosound=5 then loop sound 106 : loop sound 108
return
rem Sound Handling
sound:
skatersound=100
if skatersound=100 then stop sound 101
if skatersound=101 then stop sound 100
if ollie=0
if move#*100=>100
set sound speed 100,8000*move#
set sound speed 101,8000*move#
loop sound skatersound
else
pause sound skatersound
endif
else
pause sound skatersound
endif
if grind=>1
stop sound 100
stop sound 101
loop sound 105
else
stop sound 105
endif
return
rem Challenge
challenge:
yrotate object 1041,camera angle y()
oldtime#=time#
if begun=0
BEGUN=1
endif
set cursor 20,393
print beernumber," / 6 beers"
if time#=>0 then stretch sprite 4,time#,100
if begun=1
inc nexttimedown
if nexttimedown=13 then nexttimedown=0 : dec time#
endif
gosub beer
if time#=0
stop sound 110 : play sound 111
message$="TIME UP! TRY AGAIN!" : backtostart=1
oldx#=-73 : oldz#=-3000 : x#=-73 : z#=-3000
time#=100 : beernumber=0 : nexttimedown=0
position object 1041,-73,10,-2000
MAXMOVE#=0
SHOW OBJECT 1041 : SHOW OBJECT 1042
endif
if sound playing(110)=0
if time#=<30 then loop sound 110
endif
if beernumber=6
stop sound 110
time#=100 : center text 320,240,"PRESS DOWN TO STOP!"
hide object 1042 : HIDE OBJECT 1041
if move#=0 then goto CHALLENGEDONE
endif
return
rem Beer Controling
beer:
rr#=wrapvalue(rr#+3.0)
position object 1042,object position x(1041),160+(cos(rr#)*20),object position z(1041)
yrotate object 1042,camera angle y()
if x#=>object position x(1041)-10
if x#=<object position x(1041)+10
if z#=>object position z(1041)-10
if z#=<object position z(1041)+10
play sound 109
position object 1041,0-rnd(181),10,object position z(1041)+1000
inc beernumber
endif
endif
endif
endif
if beernumber=6 then hide object 1041
return
rem CHALLENGE COMPLETED
rem -------------------------------------------------------------------
challengedone:
fog on
set sound volume 1,100
load sound "music/end.wav",10
delete sprite 1 : delete sprite 4
delete sprite 3
load image "wide.bmp",1036
load image "wide2.bmp",1037
sprite 1,0,0,1036 : set sprite 1,0,0
sprite 2,0,430,1037 : set sprite 2,0,0
camerazpan=1600
set sound volume 1,100
fog off
time=0
ticketx=700
load sound "sound/fmv2.wav",2
play sound 10
repeat
gosub smoke : gosub 3Dsound
center text 320,240,"CHALLENGE COMPLETED!"
position camera 50,40,camerazpan
cx#=-400 : cz#=camerazpan
point camera 0,0,0
if camerazpan=<2400 then inc camerazpan
gosub enviroment
sync
if returnkey()=1 then nextending=1
if joystick fire a()=1 then nextending=1
until nextending=1
repeat
until returnkey()=0
repeat
until joystick fire a()=0
repeat
gosub smoke
cx#=-100 : cz#=-340
position camera 100,14,-300 : point camera -100,17.4,-340
gosub enviroment : gosub 3Dsound
if showtext=0
inc time
if time=50 then showtext=1
endif
if showtext=1
text 320,75,"CHALLENGE COMPLETED:"
text 320,75+30,"Congratulations!"
text 320,75+45,"NEXT LEVEL - EASTGATE SHOPPING CENTRE"
sprite 3,320,75+60,1038
endif
sync
if returnkey()=1 then finishchallenge=1
if joystick fire a()=1 then finishchallenge=1
until finishchallenge=1
write to clipboard "GO3"
execute file "C3.exe",s$,d$ : end
Level 3 Source Code
Rem * Title : TOR_level1
Rem * Author : Drew Cameron
Rem * Date : 30/1/04
rem ================================================================
rem The Old Remedy
rem Challenge Mode - Eastgate Shopping Center ( REMASTERED )
rem Coded by Drew Cameron drewcameron@ddrw.com
rem ================================================================
rem Hide mouse etc...
hide mouse : autocam off
fog on : fog distance 0
sync on : sync rate 0 : set camera range 1,4000
rem LEVEL BRIEF IMAGE
load sound "sound/click.wav",2
load image "wide2.bmp",1037
sprite 2,0,430,1037 : set sprite 2,0,0
repeat
ink rgb(255,255,255),1 : cls
text 10,10,"The Old Remedy 3D Skateboarding"
text 10,25,"LEVEL 3 - EASTGATE SHOPPING CENTRE"
text 10,55,"You've sobered up and have reached the Eastgate shopping centre."
text 10,70,"As you enter the shopping centre, you see many people all around. You ask yourself how you"
text 10,85,"will spend the £10 Martin gave you. As you ponder, you notice your friend Liam Fraser ahead."
text 10,85+30,"You are just about to go and see him when something happens..."
sync
if returnkey()=1 then continue=1
if joystick fire a()=1 then continue=1
until continue=1
play sound 2
delete image 1037 : delete sprite 2
rem Player Object - (1,3,4,5)
REM TESTING FILES
load object "modelstemp.x",1
yrotate object 1,90 : fix object pivot 1
scale object 1,350,350,350 : xrotate object 1,350
fix object pivot 1 : set object speed 1,10
load object "modelstemp.x",3 : yrotate object 3,90
fix object pivot 3 : scale object 3,350,350,350 : xrotate object 3,350
fix object pivot 3 : set object speed 3,18
load image "Models/jean.bmp",2 : load image "Models/skin.bmp",3
load image "Models/white.bmp",4
texture limb 1,2,2 : texture limb 1,11,2
texture limb 1,12,2 : texture limb 1,14,2
texture limb 1,15,2 : texture limb 1,5,4
texture limb 1,6,3 : texture limb 1,7,3
texture limb 1,9,3 : texture limb 1,10,3
texture limb 1,3,4 : texture limb 1,8,4
texture limb 3,2,2 : texture limb 3,11,2
texture limb 3,12,2 : texture limb 3,14,2
texture limb 3,15,2 : texture limb 3,5,4
texture limb 3,6,3 : texture limb 3,7,3
texture limb 3,9,3 : texture limb 3,10,3
texture limb 3,3,4 : texture limb 3,8,4
rem Shadow (Cylinder Crushed) - ( 2 )
make object sphere 2,10 : scale object 2,140,1,140
load image "shadow.bmp",7 : texture object 2,7
make object sphere 6,10 : scale object 6,140,1,140
texture object 6,7
make object sphere 7,10 : scale object 7,140,1,140
texture object 7,7
rem "Ghost"
load object "modelstemp.x",4
yrotate object 4,90 : fix object pivot 4
scale object 4,350,350,350 : xrotate object 4,350
fix object pivot 4 : set object speed 4,10
load object "modelstemp.x",5
yrotate object 5,90 : fix object pivot 5
scale object 5,350,350,350 : xrotate object 5,350
fix object pivot 5 : set object speed 5,18
rem LEVEL CREATING
rem -------------------------------------------------------------------
rem Enviroment FLOOR ( 1000 )
make object plain 1000,500,4010
position object 1000,250,0,2000
xrotate object 1000,90 : set object 1000,1,1,1
fix object pivot 1000
load image "eastfloor.bmp",1000
texture object 1000,1000 : scale object texture 1000,1,8
wallz=250 : height=250
load image "east1.bmp",1001 : load image "east2.bmp",1002
make object plain 1001,4000,height
position object 1001,0,height/2,2000
yrotate object 1001,90
texture object 1001,1002 : scale object texture 1001,8,1
wallz=1750
wall=1011
make object plain wall,4000,height
position object wall,500,height/2,2000
yrotate object wall,90
texture object wall,1001
scale object texture wall,8,1
load image "eastbit.bmp",1017
make object plain 1020,500,height
position object 1020,250,height/2,0
texture object 1020,1017
make object plain 1021,500,height
position object 1021,250,height/2,4000
texture object 1021,1017
LOAD IMAGE "SMOKE.BMP",1022
for smoke=1022 to 1032
make object plain smoke,30+rnd(10),30+rnd(10)
position object smoke,-40,-60,-100
ghost object on smoke
texture object smoke,1022
next smoke
make object sphere 1033,10 : scale object 1033,400,2,400
texture object 1033,7 : position object 1033,90,0.3,1680
dim objecttype(100) : dim objectx(100) : dim objectz(100)
dim objectnumber(100)
build#=100 : storeobject=1 : objecttype=1
zoom#=100 : pan#=0 : x#=0 : z#=0
cproximity#=100
load image "eastpillar.bmp",1034
for box=1034 to 1043
make object box box,50,height,50 : texture object box,1034
next box
position object 1034,25,height/2,0
position object 1035,25,height/2,2000
position object 1036,25,height/2,3000
position object 1037,25,height/2,4000
position object 1038,25,height/2,1000
position object 1039,475,height/2,0
position object 1040,475,height/2,2000
position object 1041,475,height/2,3000
position object 1042,475,height/2,4000
position object 1043,475,height/2,1000
load image "kicker.bmp",1001
load image "barrier.bmp",1002
load image "rail.bmp",1003
load image "gantry.bmp",1004
load image "P2.bmp",1005
load image "editwall.bmp",110
gosub loading
load sound "sound/eloop.wav",2 : loop sound 2
rem Martin ( 1121 )
load image "P1.bmp",1033
make object plain 1050,13.2,28 : set object 1050,1,0,0 : texture object 1050,1033
position object 1050,397,14,1089 : position object 6,397,0.3,1089
LOAD IMAGE "P3.bmp",1051
load image "p4.bmp",1052
for person=1051 to 1061
make object plain person,13.2,28 : set object person,1,0,0
texture object person,1033
next person
position object 1051,168,14,403 : texture object 1051,1051
position object 1052,140,14,487 : texture object 1052,1052
position object 1053,369,14,820 : texture object 1053,1051
position object 1054,322,14,918 : texture object 1054,1052
position object 1055,136,14,1241 : texture object 1055,1051
position object 1056,71,14,1358 : texture object 1056,1052
position object 1057,142,14,1572 : texture object 1057,1051
position object 1058,349,14,1783 : texture object 1058,1052
position object 1059,324,14,1929 : texture object 1059,1051
position object 1060,149,14,2320 : texture object 1060,1052
position object 1061,156,14,2412 : texture object 1061,1051
rem Arrow
make object plain 1142,20,20
load image "red.bmp",1042 : texture object 1142,1042
set object 1142,1,0,0,0,0
rem SETTING UP GAME LOOP
rem -------------------------------------------------------------------
backdrop on : color backdrop rgb(0,0,0) : cproximity#=100
cls
fog off
x#=250 : z#=250 : a#=0
if sprite exist(3)=1
delete sprite 3
endif
dim enemyx(5000)
dim enemyz(5000)
dim enemyy(5000)
dim enemyturn(5000)
dim enemyframe(5000)
dim enemyframe2(5000)
dim enemyframeshow(5000)
load array "Willx",enemyx(slot)
load array "Willz",enemyz(slot)
load array "Willy",enemyy(slot)
load array "Willt",enemyturn(slot)
load array "Willf",enemyframe(slot)
load array "Willf2",enemyframe2(slot)
load array "Wills",enemyframeshow(slot)
rem Bottom Left HUD Sprites (Challenge, smily face)
challenge#=10
load image "challenge/3.bmp",10
rem Load Sound effects 100 onwards
load sound "sound/eastroll.wav",100
load sound "sound/skate2.wav",101
load sound "sound/pop.wav",102
load sound "sound/land.wav",103
load sound "sound/kicker.wav",104
load sound "sound/grind.wav",105
load sound "sound/moneygrab.wav",107
load 3dsound "sound/fmv4.wav",108
load 3dsound "sound/eastroll.wav",109
load 3dsound "sound/hitp.wav",110
load sound "sound/metal.wav",111
fog distance 3900
rem INTRODUCTION MOVIE--------------------------------------------------
load image "wide.bmp",1036
load image "wide2.bmp",1037
sprite 1,0,0,1036 : set sprite 1,0,0
sprite 2,0,430,1037 : set sprite 2,0,0
camx#=250 : camz#=1089 : camy#=35
draw to front : inc camz#,2.5
load sound "sound/fmv3.wav",1021
repeat
gosub people
position object 1,250,0,250
position camera camx#,camy#,camz#
if camz#=>200
dec camz#,2
else
inc time
endif
yrotate object 1050,camera angle y()
point camera 397,14,1089
if time=100 then endmovie=1
if returnkey()=1 then endmovie=1
if joystick fire a()=1 then endmovie=1
sync
until endmovie=1
repeat
until returnkey()=0
repeat
until joystick fire a()=0
endmovie=0
position object 4,397,0,350
point object 4,397,0,2000
repeat
gosub people
if object position z(4)=<1089
position camera 307,14,object position z(4)
else
position camera 307,14,1089
endif
point camera 397,14,camera position z()
yrotate object 1050,camera angle y()
if showtext=0
if object position z(4)=>1087 then play sound 1021 : showtext=1
endif
if showtext=1
text 15,72,"LIAM FRASER:"
text 15,72+30,"Hey! That punk stole my money!"
text 15,72+60,"RETRIEVE LIAM'S MONEY TO ADVANCE!"
endif
move object 4,5 : set object frame 4,58
position sound 109,cx#,cy#,object position z(4)
LOOP SOUND 109
CX#=307 : CZ#=camera position z()
GOSUB SOUND
position object 7,object position x(4),0.3,object position z(4)
if returnkey()=1 then endmovie=1
if joystick fire a()=1 then endmovie=1
sync
until endmovie=1
sprite 1,20,433,10 : set sprite 1,1,1
delete sprite 2 : set sound volume 2,95
rem MAIN PROGRAM LOOP --------------------------------------------------
do
oldx#=x# : oldz#=z# : oldmove#=move#
gosub people
gosub movementandcamera : gosub ollie
gosub shadows : gosub sound : GOSUB SOUND2
gosub collision : gosub interact
gosub recordme
sync
loop
people:
for person=1051 to 1061
inc nextanim
if nextanim=10 then texture object person,1051
if nextanim=20 then texture object person,1052 : nextanim=0
if rnd(150)=1 then yrotate object person,camera angle y()
move object person,-1
if object position x(person)=>410 then position object person,100,object position y(person),object position z(person)
if object position x(person)=<90 then position object person,400,object position y(person),object position z(person)
if object position z(person)=>3990 then position object person,rnd(400),object position y(person),100
if object position z(person)=<10 then position object person,rnd(400),object position y(person),3000
if x#=>object position x(person)-10
if x#=<object position x(person)+10
if z#=>object position z(person)-10
if z#=<object position z(person)+10
move object person,4
position sound 110,object position x(person),cy#,object position z(person)
if rnd(16)=1 then play sound 110
endif
endif
endif
endif
next person
return
movementandcamera:
if move#=<1
if upkey()=1 then move#=1
if joystick up()=1 then move#=1
endif
if upkey()=1 then inc move#,0.07
if joystick up()=1 then inc move#,0.07
if move#=>0.08
if downkey()=1 then dec move#,0.08
if joystick down()=1 then dec move#,0.08
endif
if ollie=0
if leftkey()=1 then a#=wrapvalue(a#-2.2)
if rightkey()=1 then a#=wrapvalue(a#+2.2)
if joystick left()=1 then a#=wrapvalue(a#-1.9)
if joystick right()=1 then a#=wrapvalue(a#+1.9)
endif
if move#=>0.04 then dec move#,0.010
if move#=>5 then dec move#,0.07
if move#=<0.05 then move#=0
x#=newxvalue(x#,a#,move#) : z#=newzvalue(z#,a#,move#)
position object 1,x#,y#,z# : yrotate object 1,a#
position object 3,x#,y#,z# : yrotate object 3,a#
if cproximity#=<-100 then cproximity#=100
cx#=newxvalue(x#,wrapvalue(a#+180),cproximity#) : cz#=newzvalue(z#,wrapvalue(a#+180),cproximity#) : cy#=y#+30.0
position camera cx#,cy#,cz# : point camera x#,y#+20,z#
if cproximity#=>10
if cx#=<20 then dec cproximity#,10 : keepcamera=0
if cz#=<20 then dec cproximity#,10 : keepcamera=0
if cz#=>3980 then dec cproximity#,10 : keepcamera=0
if cx#=>2480 then dec cproximity#,10 : keepcamera=0
if cx#=>480 then dec cproximity#,10 : keepcamera=0
endif
if cx#=>40
if cx#=<460
if cz#=>40
if cz#=<3960
if cproximity#=<100 then inc cproximity#,2
endif
endif
endif
endif
if move#=0 then set object frame 1,5
if ollie=0
show object 1
if move#=>0.04 then set object frame 1,58
hide object 3
endif
if ollie=2
show object 3 : hide object 1
endif
return
ollie:
if ollie=0
if move#=>0.05
if spacekey()=1 then ollie=1 : incyamount#=2 : INC impress#,3 : play sound 102
if joystick fire a()=1 then ollie=1 : incyamount#=2.3 : INC impress#,3 : play sound 102
endif
endif
if ollie=1
play object 3,38,58 : trick=0 : ollie=2
endif
if ollie=2
inc y#,incyamount#
dec incyamount#,0.15
if y#=<groundy#+0.1 then y#=groundy# : ollie=0 : play sound 103
if trick=0
if returnkey()=1 then play object 3,81,94 : trick=1 : inc impress#,3
if shiftkey()=1 then play object 3,130,142 : trick=2 : inc impress#,3
if joystick fire c()=1 then play object 3,81,94 : trick=1 : inc impress#,3
if joystick fire d()=1 then play object 3,130,142 : trick=2 : inc impress#,3
endif
if trick=1
if object frame(3)=>93 then trick=0
endif
if trick=2
if object frame(3)=>141 then trick=0
endif
endif
if ollie=0
if y#=>groundy#+1 then trick=0 : ollie=2 : incyamount#=0
endif
groundy#=0
return
shadows:
position object 2,x#,0.3,z# : scale object 2,100-y#*2,0.1,100-y#*2
return
sound:
position sound 108,object position x(1050),cy#,object position z(1050)
position listener cx#,cy#,cz#
rotate listener 0,wrapvalue(360.0-ca#),0
if skatersound=100 then stop sound 111
if skatersound=111 then stop sound 100
if ollie=0
if move#*100=>100
set sound speed 100,8000*move# : set sound speed 111,8000*move#
loop sound skatersound
else
pause sound 100 : pause sound 111
endif
else
pause sound 100 : pause sound 111
endif
if y#=<20 : skatersound=100 : else : skatersound=111 : endif
if grind=>1
stop sound 100 : stop sound 101 : loop sound 105
else
stop sound 105
endif
return
SOUND2:
if rnd(400)=1 then play sound 108
return
collision:
if x#=<10 then x#=oldx#
if z#=<10 then z#=oldz#
if z#=>3990 then z#=oldz#
if x#=>490 then x#=oldx#
if y#=<180
if x#=>90-17
if x#=<90+17
if z#=>1680-20
if z#=<1680+17 then ollie=2 : incyamount#=5
endif
endif
endif
endif
set cursor 20,403
print "£",moneynumber," / £10 retrieved"
smoke:
for smoke=1022 to 1032
yrotate object smoke,camera angle y()
position object smoke,90,object position y(smoke)+rnd(30),1680
if object position y(smoke)=>170+rnd(90) then position object smoke,-40,0,-100
next smoke
yrotate object 1050,camera angle y()
return
interact:
for box=1034 to 1042
if x#=>object position x(box)-30
if x#=<object position x(box)-25
if z#=>object position z(box)-30
if z#=<object position z(box)+30 then x#=oldx#
endif
endif
endif
if x#=<object position x(box)+31
if x#=>object position x(box)+25
if z#=>object position z(box)-30
if z#=<object position z(box)+30 then x#=oldx#
endif
endif
endif
if z#=<object position z(box)+32
if z#=>object position z(box)+25
if x#=>object position x(box)-30
if x#=<object position x(box)+30 then z#=oldz#
endif
endif
endif
if z#=>object position z(box)-32
if z#=<object position z(box)-25
if x#=>object position x(box)-30
if x#=<object position x(box)+30 then z#=oldz#
endif
endif
endif
next box
for check=1 to 100
if objecttype(check)=1
if ollie=<1
if x#=>object position x(playingobject(check))-17
if x#=<object position x(playingobject(check))+17
if z#=>object position z(playingobject(check))-17
if z#=<object position z(playingobject(check))+20
ollie=1 : incyamount#=3 : play sound 104
endif
endif
endif
endif
endif
endif
if objecttype(check)=2
if y#=<24
if x#=>object position x(playingobject(check))-25
if x#=<object position x(playingobject(check))+25
if z#=>object position z(playingobject(check))-5
if z#=<object position z(playingobject(check))+5
z#=oldz#
endif
endif
endif
endif
endif
endif
if objecttype(check)=3
if y#=<24
if x#=>object position x(playingobject(check))-5
if x#=<object position x(playingobject(check))+5
if z#=>object position z(playingobject(check))-25
if z#=<object position z(playingobject(check))+25
x#=oldx#
endif
endif
endif
endif
endif
endif
if objecttype(check)=4
if grind=0
if y#=<2
if x#=>object position x(playingobject(check))-30
if x#=<object position x(playingobject(check))+30
if z#=>object position z(playingobject(check))-110
if z#=<object position z(playingobject(check))+110
if z#=>oldz#
if controlkey()=1 then rail#=check : grind=1
if joystick fire b()=1 then rail#=check : grind=1
endif
if z#=<oldz#
if controlkey()=1 then rail#=check : grind=2
if joystick fire b()=1 then rail#=check : grind=2
endif
endif
endif
endif
endif
endif
endif
if grind=1
x#=object position x(playingobject(rail#))
a#=0
move#=oldmove# : y#=4 : OLLIE=0
if spacekey()=1 then ollie=1 : incyamount#=2 : INC impress#,2 : hinder#=0.5 : grind=0
if joystick fire a()=1 then ollie=1 : incyamount#=1 : INC impress#,2 : hinder#=0.5 : grind=0
if z#=>object position z(playingobject(rail#))+110 then y#=1 : grind=0 : ollie=2
endif
if grind=2
x#=object position x(playingobject(rail#)) : a#=180
move#=oldmove# : y#=4 : OLLIE=0
if spacekey()=1 then ollie=1 : incyamount#=2 : INC impress#,2 : hinder#=0.5 : grind=0
if joystick fire a()=1 then ollie=1 : incyamount#=1 : INC impress#,2 : hinder#=0.5 : grind=0
if z#=<object position z(playingobject(rail#))-110 then y#=1 : grind=0 : ollie=2
endif
endif
if objecttype(check)=5
if y#=>119
if x#=>object position x(playingobject(check))-25
if x#=<object position x(playingobject(check))+25
if z#=>object position z(playingobject(check))-25
if z#=<object position z(playingobject(check))+25 then groundy#=120
endif
endif
endif
endif
endif
next check
return
loading:
rem LOADING - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
load array "East",objecttype(100)
load array "East2",objectx(100)
load array "East3",objectz(100)
dim playingobject(100)
for makeobject=1 to 100
object#=objectnumber(makeobject)
if objecttype(makeobject)=1
make object box build#,35,40,30 : xrotate object build#,290
position object build#,objectx(makeobject),-7,objectz(makeobject)
playingobject(makeobject)=build#
texture object build#,1001
fix object pivot build#
yrotate object build#,180
inc build#
endif
if objecttype(makeobject)=2
make object plain build#,1,1
hide object build#
playingobject(makeobject)=build#
hide object build#
inc build#
endif
if objecttype(makeobject)=3
make object plain build#,1,1
hide object build#
playingobject(makeobject)=build#
inc build#
endif
if objecttype(makeobject)=4
make object box build#,220,4,2
position object build#,objectx(makeobject),1,objectz(makeobject)
texture object build#,1003
yrotate object build#,90
playingobject(makeobject)=build#
inc build#
endif
if objecttype(makeobject)=5
make object plain build#,50,50
xrotate object build#,90
texture object build#,1004
position object build#,objectx(makeobject)-25,120,objectz(makeobject)
playingobject(makeobject)=build#
inc build#
endif
if objecttype(makeobject)=6
make object plain build#,13,28
set object build#,1,0,0
texture object build#,1005
position object build#,objectx(makeobject),14,objectz(makeobject)
set object build#,1,0,0,0,0
playingobject(makeobject)=build#
inc build#
endif
if objecttype(makeobject)=7
make object box build#,5,4,5
color object build#,0
position object build#,objectx(makeobject),2,objectz(makeobject)
playingobject(makeobject)=build#
inc build#
endif
next makeobject
return
recordme:
rr#=wrapvalue(rr#+3.0)
position object 1142,object position x(4),((object position y(4)+160)+(cos(rr#)*20)),object position z(4)
yrotate object 1142,camera angle y()
position object 4,enemyx(slot),enemyy(slot),enemyz(slot)
position sound 109,object position x(4),cy#,object position z(4)
yrotate object 4,enemyturn(slot)
set object frame 4,enemyframe(slot)
position object 5,enemyx(slot),enemyy(slot),enemyz(slot)
yrotate object 5,enemyturn(slot)
set object frame 5,enemyframe2(slot)
position object 7,enemyx(slot),0.3,enemyz(slot) : loop sound 109
scale object 7,100-enemyy(slot)*2,0.1,100-enemyy(slot)*2
if enemyframeshow(slot)=1
show object 5 : hide object 4
else
hide object 5 : show object 4
endif
inc slot
if slot=2650 then slot=0
if y#=>enemyy(slot)-5
if x#=>enemyx(slot)-14
if x#=<enemyx(slot)+14
if z#=>enemyz(slot)-14
if z#=<enemyz(slot)+14
if moneynumber=<9
if move#=>2
if sound playing(107)=0 then play sound 107 : inc moneynumber
endif
endif
endif
endif
endif
endif
endif
if moneynumber=>10
moneynumber=10
center text 320,240,"PRESS DOWN TO STOP!"
if move#=0 then goto COMPLETED
endif
return
COMPLETED:
cls
set sound volume 2,100
load sound "music/end.wav",10
load image "wide.bmp",1036
load image "wide2.bmp",1037
sprite 1,0,0,1036 : set sprite 1,0,0
sprite 2,0,430,1037 : set sprite 2,0,0
camerazpan=1000
play sound 10
cls
repeat
gosub people : gosub smoke
center text 320,240,"CHALLENGE COMPLETED!"
position camera 250,camerazpan/12,camerazpan
point camera 250,0,camerazpan-(camerazpan/2) : hide object 1142
if camerazpan=<3000 then inc camerazpan,2
sync
if returnkey()=1 then nextending=1
if joystick fire a()=1 then nextending=1
until nextending=1
repeat
until returnkey()=0
repeat
until joystick fire a()=0
load sound "sound/fmv5.wav",534
repeat
gosub people : gosub smoke
position camera 307,14,1089 : point camera 397,14,1089 : hide object 1142
cx#=307 : cz#=1089
if showtext2=0
inc time2
if time2=50 then play sound 534 : showtext2=1
endif
if showtext2=1
text 15,72,"CHALLENGE COMPLETED:"
text 15,72+30,"Thanks!"
text 15,72+60,"THE OLD REMEDY 3D SKATEBOARDING - COMPLETED!"
endif
sync
if returnkey()=1 then finishchallenge=1
if joystick fire a()=1 then finishchallenge=1
until finishchallenge=1
end
All credit must be given to me!
Have fun with it...
The Old Remedy 3D Skateboarding - http://www.ddrw.dbspot.com
* * * Coming December 1st - "Dumbo"...