There was a 50 line challenge at one point. When I posted this I didn't realize I was about a week after the deadline. To my knowledge no winner was declared.
I converted this from the Dark Basic Pro challenges. The only difference is I took out the sounds.
The arrowkeys or WASD move. That's about all the instructions really.
sync on :sync rate 30 :autocam off :hide mouse :randomize timer() :if check display mode(1024,768,32)=1 :set display mode 1024,768,32 :endif :set text font "Gungsuh" :sw=screen width() :sh=screen height()
type car_info
acc as float :wpt as integer :lap as integer :finish as boolean
endtype
dim car(8) as car_info
type way_point
x as integer :z as integer
endtype
dim way(20) as way_point
null=make vector2(1) :null=make vector2(2) :dim pt(8) as string :pt(1)="st" :pt(2)="nd" :pt(3)="rd" :for i=4 to 8 :pt(i)="th" :next i :place=8 :dim comment(8) as string :comment(1)="Congradulations, you are God" :comment(2)="Ok, now you'll have to play again" :comment(3)="You still get a medal" :comment(4)="Do better" :comment(5)="Now your not even in the top 50%" :comment(6)="Shame" :comment(7)="You could have done worse" :comment(8)="Seek help" :make_image_memblock(1,32,32,32) :for x=1 to 32 :for y=1 to 32 :memblock_dot(1,x,y,rgb(rnd(128),rnd(128)+127,0))
next y :next x :make image from memblock 10,1 :for x=1 to 32 :for y=1 to 32 :c=rnd(20)+127 :memblock_dot(1,x,y,rgb(c,c,c)) :next y :next x :make image from memblock 11,1 :for x=1 to 32 :for y=1 to 32 :c=rnd(60) :memblock_dot(1,x,y,rgb(c,c,c)) :next y :next x :make image from memblock 12,1 :for x=1 to 32 :for y=1 to 32 :memblock_dot(1,x,y,rgb(255,x*50 mod 256,0)) :next y :next x :make image from memblock 15,1 :delete memblock 1 :set text size 14
color backdrop rgb(29, 94, 99) :track=1 :repeat :if escapekey()=1 :end :endif :sync :set cursor 0,0 :print "Select a track" :print "" :dim trackname(3) as string :trackname(1)="Winding Willow" :trackname(2)="Spring Track" :trackname(3)="Checker Field" :sprite 1,-10,-10,10 :size sprite 1,10,10 :for i=1 to 3 :if i=track :ink rgb(123, 123, 238),0 :arrow$=" <--------" :else :ink -1,0 :arrow$="" :endif :print trackname(i)+arrow$
next i : if track=1 : restore track1 : endif : if track=2 : restore track2 : endif : if track=3 : restore track3 : endif : for x=1 to 30 : for z=1 to 30 : read road : if road=0 : set sprite image 1,10 : endif : if road=1 : set sprite image 1,11 : endif : if road=2 : set sprite image 1,12 : endif : if road=3 :set sprite image 1,15 :endif
paste sprite 1,x*10+200,400-z*10 :next z :next x :track=track-upkey()+downkey() :if track<1 :track=1 :endif :if track>3 :track=3 :endif :ink -1,0 :until returnkey()=1 :delete sprite 1 :set camera range 10,10000 :color backdrop rgb(0, 210, 255) :make object box 1,50,30,100 :make object box 2,10,10,15 :make mesh from object 1,2 :delete object 2 :add limb 1,1,1 :offset limb 1,1,0,20,-40
delete mesh 1 :make object box 2,60,6,20 :make mesh from object 1,2 :delete object 2 :add limb 1,2,1 :offset limb 1,2,0,23,-40 :delete mesh 1 :make object sphere 2,100,6,6 :scale object 2,6,25,25 :make mesh from object 1,2 :delete object 2 :add limb 1,3,1 :offset limb 1,3,28,-10,30 :add limb 1,4,1 :offset limb 1,4,-28,-10,30 :add limb 1,5,1 :offset limb 1,5,28,-10,-30 :add limb 1,6,1 :offset limb 1,6,-28,-10,-30 :delete mesh 1 :scale object 1,50,50,50 :make_image_memblock(1,1,1,32) :for image=1 to 8 :memblock_dot(1,1,1,rgb(rnd(255),rnd(255),rnd(255))) :make image from memblock image,1
next image :memblock_dot(1,1,1,rgb(0,0,0)) :make image from memblock 9,1 :delete memblock 1 :make_image_memblock(1,256,128,32) :for thickness=0 to 2 :memblock_circle(1,128,128+thickness,128,rgb(255,255,255)) :next thickness :for ang=-90 to 90 step 10 :memblock_line(1,int((cos(ang)-sin(ang)*30+129)),int((sin(ang)-cos(ang)*30+129)),int((cos(ang)-sin(ang)*120+129)),int((sin(ang)-cos(ang)*120+129)),rgb(255,255,255)) :next ang :make image from memblock 13,1 :delete memblock 1 :sprite 1,sw-256,sh-152,13 :hide sprite 1 :make_image_memblock(1,10,120,32) :memblock_circle(1,5,115,5,rgb(255,0,0)) :for thickness=-2 to 2 :memblock_line(1,5+thickness,110,5+thickness,1,rgb(255,0,0)) :next thickness :make image from memblock 14,1 :delete memblock 1 :sprite 2,sw-130,sh-24,14 :offset sprite 2,0,115 :hide sprite 2
for car=2 to 8 :clone object car,1 :next car :for car=1 to 8 :texture object car,car :for i=3 to 6 :texture limb car,i,9 :next i :position object car,cos(car*180)*40+3700,0,car*40+2100 :next car :obj=9 :dim track(30,30)
if track=1 : restore track1 :endif : if track=2 :restore track2 : endif : if track=3 : restore track3 : endif :for x=1 to 30 :for z=1 to 30
read road :track(x,z)=road :if road<2 :make object plain obj,200,200,1 :xrotate object obj,90 :position object obj,x*200,-20,z*200 :texture object obj,10+road :else :if road=2 :make object box obj,200,50,200 :position object obj,x*200,5,z*200 :texture object obj,12 :else :make object plain obj,200,200,1 :xrotate object obj,90 :position object obj,x*200,-20,z*200 :texture object obj,15 :endif :endif :inc obj :next z :next x
if track=1 : way(0).x=19 :way(0).z=13 :way(1).x=20 :way(1).z=16 :way(2).x=26 :way(2).z=18 :way(3).x=29 :way(3).z=22 :way(4).x=23 :way(4).z=27 :way(5).x=15 :way(5).z=26 :way(6).x=13 :way(6).z=17 :way(7).x=11 :way(7).z=16 :way(8).x=8 :way(8).z=19 :way(9).x=8 :way(9).z=25 :way(10).x=4 :way(10).z=24 :way(11).x=4 :way(11).z=15 :way(12).x=7 :way(12).z=11
way(13).x=8 :way(13).z=4 :way(14).x=17 :way(14).z=4 :way(15).x=20 :way(15).z=3 :way(16).x=21 :way(16).z=7 :way(17).x=18 :way(17).z=10 :numways=17
endif : if track=2 :way(0).x=19 :way(0).z=15 :way(1).x=23 :way(1).z=16 :way(2).x=25 :way(2).z=6 :way(3).x=23 :way(3).z=3 :way(4).x=10 :way(4).z=3 :way(5).x=6 :way(5).z=10
way(6).x=3 :way(6).z=13 :way(7).x=5 :way(7).z=18 :way(8).x=4 :way(8).z=23 :way(9).x=6 :way(9).z=26 :way(10).x=11 :way(10).z=25 :way(11).x=15 :way(11).z=28 :way(12).x=26 :way(12).z=27 :way(13).x=27 :way(13).z=22 :way(14).x=17 :way(14).z=21 :way(15).x=14 :way(15).z=10 :way(16).x=18 :way(16).z=9 :numways=16
endif :if track=3 : way(0).x=17 :way(0).z=15 :way(1).x=12 :way(1).z=15 :way(2).x=12 :way(2).z=6 :way(3).x=4 :way(3).z=5 :way(4).x=4 :way(4).z=10 :way(5).x=6 :way(5).z=12 :way(6).x=3 :way(6).z=16 :way(7).x=6 :way(7).z=26 :way(8).x=12 :way(8).z=23 :way(9).x=15 :way(9).z=24 :way(10).x=20 :way(10).z=23 :way(11).x=26 :way(11).z=22 :way(12).x=26
way(12).z=13 :way(13).x=24 :way(13).z=5 :way(14).x=21 :way(14).z=5 :numways=14 :endif :set text size 100 :position camera 0,5000,0 :point camera 3000,0,3000 :for i=1 to 400 :sync :txt$="Get Ready! " :if i>=310 :txt$=txt$+str$((400-i)/30+1) :endif :ink rgb(0, 0, 160),0 :center text screen width()/2-5,screen height()/2-55,txt$ :ink -1,0 :center text screen width()/2,screen height()/2-50,txt$ :position camera curvevalue(object position x(1),camera position x(),80),curvevalue(1000,camera position y(),80),curvevalue(object position z(1),camera position z(),80) :rotate camera curveangle(90,camera angle x(),80),curveangle(0,camera angle y(),80),curveangle(0,camera angle z(),80) :next i :rotate camera 90,0,0
set text size 24 :show sprite 1 :show sprite 2 :repeat :if escapekey()=1 :end :endif :sync :text 0,0,"Lap:"+str$(car(1).lap+1) :text 0,30,"Place:"+str$(place)+pt(place) :speed$=str$(int(abs(car(1).acc*3)))+" mph" :text sw-text width(speed$),sh-24,speed$ :rotate sprite 2,abs(car(1).acc*3)-90 :oldx#=object position x(1) :oldz#=object position z(1) :road=track(int(oldx#/200+0.5),int(oldz#/200+0.5))
if road=0 :friction#=.95 :endif :if road=1 :friction#=.98 :endif :if road=3 :friction#=1.2 :endif :car(1).acc=car(1).acc*friction#+(((upkey()+keystate(17))>0)-((downkey()+keystate(31))>0)*.4)*.7 :move object 1,car(1).acc :turn=((rightkey()+keystate(32))>0)-((leftkey()+keystate(30))>0) :yrotate object 1,object angle y(1)+turn*4 :rotate limb 1,3,0,turn*10,0 :rotate limb 1,4,0,turn*10,0 :rotate limb 1,5,0,-turn*10,0 :rotate limb 1,6,0,-turn*10,0 :newx#=object position x(1) :newz#=object position z(1) :colwith=object collision(1,0) :if colwith>0 :position object 1,oldx#+(newx#-object position x(colwith))*.01,0,oldz#+(newz#-object position z(colwith))*.01 :car(1).acc=car(1).acc*.1 :endif :wx=way(car(1).wpt).x*200 :wz=way(car(1).wpt).z*200 :set vector2 1,object position x(1),object position z(1) :set vector2 2,wx,wz :subtract vector2 2,1,2 :dist#=length vector2(2) :if dist#<1000 :car(1).wpt=car(1).wpt+1
if car(1).wpt>numways :car(1).wpt=0 :car(1).lap=car(1).lap+1 :endif :endif :position camera object position x(1),1000,object position z(1) :tx=int(object position x(1)/200+0.5) :tz=int(object position z(1)/200+0.5) :if car(1).lap=5 and tx>16 and tx<22 and tz=13 :car(1).finish=1 :endif :for ai=2 to 8 :ca#=object angle y(ai) :wx=way(car(ai).wpt).x*200 :wz=way(car(ai).wpt).z*200 :point object ai,wx,0,wz :na#=object angle y(ai) :rotate object ai,0,curveangle(na#,ca#,10),0 :road=track(int(object position x(ai)/200+0.5),int(object position z(ai)/200+0.5))
if road=0 :friction#=.95 :endif :if road=1 :friction#=.98 :endif :if road=3 :friction#=1.2 :endif
car(ai).acc=car(ai).acc*friction#+rnd(100)/100.0+.1 :oldx#=object position x(ai) :oldz#=object position z(ai) :move object ai,car(ai).acc :newx#=object position x(ai) :newz#=object position z(ai) :colwith=object collision(ai,0) :if colwith>0 :position object ai,oldx#+(newx#-object position x(colwith))*.01,0,oldz#+(newz#-object position z(colwith))*.01 :car(ai).acc=car(ai).acc*.1 :endif :set vector2 1,object position x(ai),object position z(ai) :set vector2 2,wx,wz :subtract vector2 2,1,2 :dist#=length vector2(2) :if dist#<150 :car(ai).wpt=car(ai).wpt+1 :if car(ai).wpt>numways :car(ai).wpt=0 :car(ai).lap=car(ai).lap+1
endif :endif :tx=int(object position x(ai)/200+0.5) :tz=int(object position z(ai)/200+0.5) :if car(ai).lap=5 and tx>16 and tx<22 and tz=13 :car(ai).finish=1 :endif :next ai :place=1 :for i=2 to 8 :if car(i).lap>car(1).lap or car(i).lap=car(1).lap and car(i).wpt=>car(1).wpt :inc place :endif :next i :until car(1).finish=1 :delete objects 1,obj-1 :delete sprite 1 :delete sprite 2 :color backdrop 0 :set text size 50 :cls :place=1 :for i=2 to 8 :if car(i).finish=1 :inc place
endif : next i :center text screen width()/2,screen height()/2-25,"You ranked "+str$(place)+pt(place) : set text size 30 :center text screen width()/2,screen height()/2+15,comment(place) :sync :wait key :end
track1: : data 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,3,1,1,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,2,2,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,2,2,2,2,2,2,2,0,1,1,0,0,0,2,2,0,0,1,1,1,1,1,1,1,1,1,0,0,0,2,2,0,0,0,0,0,0,0,1,1,0,0,0,2,2,0,1,1,1,0,0,0,0,0,0,0,0,2,2,2,0,1,1,1,1,1,1,1,1,1,0,0,0,2,2,0,1,1,1,0,0,0,0,2,2,2,2,2,2,0,1,1,0,0,1,1,1,1,1,0,0,0,0,2,2,0,1,1,0,0,0,0,2,2,2,0,0,0,2,1,1,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,1,3,0,0,0,2,2,2,0,0,0,0,2,1,1,0,0,2,2,2,2,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0,0,0,0,2,2,0,0,0,1,1,1,1,0,0,2,0,2,0,2,0,2,0,2,0,0,0,1,1,0,0,0,0,0,2,2,0,0,1,1,1,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,0,1,0,0,0,0,0,0,2,2,0,0,1,1,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,0,0,0,0,0,0,2,2,0,0,1,1,0,0,2,0,2,0,2,0,2,0,2,0,0,0,2,0,1,1,1,0,0,0,0,0,2,2,0,0,1,1,1,1,1,1,1,1,0,2,0,2,0,0,0,2,0,0,1,1,1,0,0,0,0,0,2,2,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,0,0,0,0,0,0,2,2,0,0,0,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,3,1,1,1,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
function make_image_memblock(memblock,width,height,depth)
make memblock memblock,width*height*depth*4+12 :write memblock dword memblock,0,width :write memblock dword memblock,4,height :write memblock dword memblock,8,depth
endfunction :function memblock_dot(memblock,xcoord,ycoord,colour as dword)
width=memblock dword(memblock,0) :write memblock dword memblock,((ycoord-1)*width+xcoord-1)*4+12,colour
endfunction : function memblock_line(memblock,x1,y1,x2,y2,colour as dword)
width=memblock dword(memblock,0) : if abs(x2-x1)>abs(y2-y1) : m#=(y2-y1+0.0)/(x2-x1+0.0) :b#=y1-m#*x1 :minx=min(x1,x2) :maxx=max(x1,x2) : for ix=minx to maxx :iy=int(m#*ix+b#+0.5) :write memblock dword memblock,((iy-1)*width+ix-1)*4+12,colour :next ix :else :miny=min(y1,y2) :maxy=max(y1,y2) :if x2=x1 :for iy=miny to maxy :write memblock dword memblock,((iy-1)*width+x1-1)*4+12,colour :next iy :else :m#=(x2-x1+0.0)/(y2-y1+0.0) :b#=y1-1/m#*x1 :for iy=miny to maxy :ix=int(m#*(iy-b#)+0.5) :write memblock dword memblock,((iy-1)*width+ix-1)*4+12,colour :next ix :endif :endif
endfunction :function memblock_circle(memblock,centerx,centery,radius,colour as dword)
bx=centerx-radius :py1=centery+sqrt(radius^2-(bx-centerx)^2) :py2=centery-sqrt(radius^2-(bx-centerx)^2) :ex=centerx+radius :width=memblock dword(memblock,0) :size=get memblock size(1) :for x=bx to ex :y1=centery+sqrt(radius^2-(x-centerx)^2) :y2=centery-sqrt(radius^2-(x-centerx)^2) :miny=min(py1,y1) :maxy=max(py1,y1) :for y=miny to maxy :pos=((y-1)*width+x-1)*4+12 :if pos>11 and pos<size :write memblock dword memblock,pos,colour :endif :next y :miny=min(py2,y2) :maxy=max(py2,y2) :for y=miny to maxy :pos=((y-1)*width+x-1)*4+12 :if pos>11 and pos<size :write memblock dword memblock,pos,colour :endif :next y :py1=y1 :py2=y2 :next x
endfunction :function min(value1#,value2#)
if value1#<value2# :a#=value1# :else :a#=value2# :endif
endfunction a# :function max(value1#,value2#)
if value1#>value2# :a#=value1# :else :a#=value2# :endif
endfunction a#
I just read that this had been added to the 50 line thread:
Quote: "Let's set the date at Thursday 29th March, 11:59pm GMT."
.
I guess I missed the deadline anyway.