Un by Anonymous Coder22nd Sep 2004 13:31
|
---|
Summary Short Game design Not completed... I made it on my spare time just messin around Description Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com Sync On Sync Rate 60 Backdrop On set camera range 1,5000 fog on fog distance 2000 fog color RGB(0,0,0) color backdrop RGB(0,0,0) make matrix 1,10000,10000,20,20 make matrix 2,10000,10000,20,20 Load Image "C:\program files\dark basic software\dark basic\grass09.bmp",1 load image "c:\program files\dark basic software\dark basic\barry.bmp",3 load image "C:\program files\dark basic software\dark basic\media\bitmaps\textures\arcade\stone\broken01.bmp",4 prepare matrix texture 1,1,1,1 fill matrix 1,0,1 load image "C:\program files\dark basic software\dark basic\water.bmp",2 prepare matrix texture 2,2,1,1 make object sphere 100,50 set object collision to spheres 100 texture object 100,3 wh = 50 randomize matrix 1,1000 x#=100 z#=100 bouy = 0 do fog distance 2000 fog color RGB(0,0,0) ay#=object angle y(100) land# = get ground height(1,x#,z#) position object 100, x#,y#+25,z# If Upkey()=1 xtest#= newxvalue(x#,ay#,20) ztest#= newzvalue(z#,ay#,20) If xtest# > 0 and xtest# < 10000 and ztest# > 0 and ztest# < 10000 and wh < land# + 25 move object 100, 10 endif If xtest# > 0 and xtest# < 10000 and ztest# > 0 and ztest# < 10000 and wh >= land# + 50 move object 100, 5 endif If xtest# > 0 and xtest# < 10000 and ztest# > 0 and ztest# < 10000 and wh < land# + 50 and wh > land# + 25 move object 100, 8 endif endif if wh > y#+75 fog color RGB(0,64,128) fog distance 500 endif if object collision(100,0)>0 then position object 100,x#,y#,x# if Leftkey()=1 then yrotate object 100, wrapvalue(ay#-3) if Rightkey()=1 then yrotate object 100, wrapvalue(ay#+3) x#=object position x(100) z#=object position z(100) cx# = newxvalue(x#,ay#-180,100) cz# = newzvalue(z#,ay#-180,100) position camera cx#,y#+75,cz# point camera x#,y#+25,z# if shiftkey()=1 then wh=wh+1 if controlkey()=1 then wh=wh-1 fill matrix 2,wh,1 ghost matrix on 2 if spacekey()=0 and y# > land# and returnkey()=0 then y# = y# - 5 if spacekey()=1 then y# = y# + 2 if returnkey()=1 and bouy = 2 y# = y# + 5 endif if returnkey()=1 and bouy = 1 y# = y# - .8 endif if returnkey()=1 and bouy = 0 y# = y# + .8 endif if returnkey()=1 and y# >= wh-20 then bouy = 1 if returnkey()=1 and y# <= wh-30 and y# > wh-31 then bouy = 0 if y# = land# and wh > land# then bouy = 2 if y# < land# then y# = land# if mouseclick()=1 then ghost object on 100 if mouseclick()=0 then ghost object off 100 sync loop |