rem Terrain Functionality
rem Standard Setup Code for all examples
sync on : sync rate 0 : color backdrop 0
set text font "serif" : set text size 16
set text to bold : set text transparent
rem Make Simple Terrain
TerrainNumber=1
make terrain TerrainNumber,"land.bmp"
rem Position The Terrain
position terrain TerrainNumber, 0, 0, 1025
rem Texture terrain
ImageNumber=1
load image "grass.bmp",ImageNumber
texture terrain TerrainNumber,ImageNumber
size#=1025
rem Load sky object
load object "sb.x",1
scale object 1,40,40,40
set object cull 1,0
set object light 1,0
set object texture 1,2,1
rem make building
load image "WINDOW.BMP",9
make object cube 5,80
texture object 5,9
position object 5,320,50,300
set object collision to polygons 5
make object cube 510,80
texture object 510,9
position object 510,400,50,300
set object collision to polygons 510
remstart
make light 16
show light 16
position light 16,320,50,300
make light 17
show light 17
position light 17,300,50,320
rem Setup gun for player
lock object on GunObj
scale object GunObj,2,2,4
rotate object GunObj,265,0,0
position object GunObj,0.5,-1,2
disable object zdepth GunObj
remend
rem Position camera in center of terrain
position camera 512,10,512
rem Main loop
desc$="LOD Terrain from Bitmap"
while mouseclick()=0
rem Control camera over terrain
control camera using arrowkeys 0,1,1
cx#=camera position x(0)
cz#=camera position z(0)
if cx#<0.0 then cx#=0
if cx#>size# then cx#=size#
if cz#<0.0 then cz#=0
if cz#>size# then cz#=size#
position camera cx#,get terrain height(TerrainNumber,cx#,cz#)+5,cz#
rem set automatic collision for camera
automatic camera collision 0,30,0
set global collision on
rem Position sky at player
position object 1,camera position x(0),camera position y(0)-150,camera position z(0)
rem Show Framerate
text 20,screen height()-40,desc$
fps$="DBPro Fps: "+str$(screen fps())
text screen width()-20-text width(fps$),screen height()-40,fps$
rem Update screen
sync
rem End loop
endwhile
rem Delete Terrain
delete terrain TerrainNumber
Hi when i add any tipe off collision it doesnt work.
I Want it so that i dont go throught objects.
200GB HARD DRIVE 1GB RAM 256MB GRAPHICS CARD
