`darkbasicproguys racing entry
` all the setup stuff
 
Sync on : Sync rate 60
Set display mode 1024,768,16 : Hide mouse
autocam off `Set camera range 1,0x7fffffff
 
rem start
 
 
mtrxLand as integer : mtrxLand=1
txtrGrass as integer : txtrGrass=2
objCar as integer : objCar=1
hillheight=100
 
` make grass texture (from zotoasters entry)
 
create bitmap 1,128,128
set current bitmap 1
cls rgb(0,128,0)
for d=1 To 10000
ink rgb(0,rnd(255),rnd(50)),0
dot rnd(128),rnd(128)
next d
blur bitmap 1,4
get image txtrGrass,0,0,128,128
set current bitmap 0
delete bitmap 1
 
` make land (from zotoasters entry)
 
make matrix mtrxLand,20000,20000,50,50
randomize matrix mtrxLand,hillheight
prepare matrix texture mtrxLand,txtrGrass,1,1
update matrix mtrxLand
position matrix mtrxLand,0,0,0
 
` make car
 
make object box objCar,.5,.3,.8
color object objCar,rgb(2,255,255)
position object objCar,0,1,30
 
` camera
 
position camera 0,5,0
 
` main program loop*****
 
do
   control camera using arrowkeys 0,.1,1
   position camera camera position x(),5,camera position z()
   sync
loop