hello everyone! I have been working a small terrain project and I have been having an issue with blitz terrain. The dbpro program tends to just freeze and disappear without an error of any type. Here is my code:
Rem Project: Dark Basic Pro Project
Rem Created: Thursday, August 27, 2015
sync on
sync rate 60
Rem ***** Main Source File *****
terrainID = bt maketerrain()
if file exist("info_gen.txt") = 1
open to read 1, "info_gen.txt"
read string 1, terrain_heightmap$
if file exist(terrain_heightmap$) = 1 then load image terrain_heightmap$, 1
bt setterrainheightmap terrainID, 1
read string 1, terrain_texture$
if file exist(terrain_texture$) = 1 then load image terrain_texture$, 2
bt setterraintexture terrainID, 2
read string 1, terrain_detail$
if file exist(terrain_detail$) = 1 then load image terrain_detail$, 3
bt setterraindetail terrainID, 3
read string 1, terrain_environment$
if file exist(terrain_environmrnt$) = 1 then load image terrain_environment$, 4
bt setterrainenvironment terrainID, 4
read string 1, terrain_scale$
bt setterrainscale terrainID, val(terrain_scale$)
read string 1, terrain_y_scale$
bt setterrainyscale terrainID, val(terrain_y_scale$)
remstart read string 1, terrain_LOD_Levels$
bt setterrainlod terrainID, val(terrain_LOD_Level$)
read string 1, terrain_LOD_Distance$
bt setterrainloddistance terrainID, 1 ,val(terrain_LOD_Distance$) remend
close file 1
endif
bt setterrainquadreduction terrainID,1
bt setterrainsmoothing terrainID,1
bt buildterrain terrainID, 1, 1
bt updateterrain terrainID
state = 0
do
sync
if state = 0
control camera using arrowkeys 0,3,2
endif
printc "polygon count: " : print bt getstatistic(1)
printc "Draw Calls: " : print bt getstatistic(2)
printc "Cull checks: " : print bt getstatistic(3)
if file exist("export") = 1
delete file "export"
objID = 1
if path exist("exports") = 0
make directory "exports"
endif
save object "exports\map_export.x", objID
ENDIF
LOOP
I am only loading the texture map, detail map, and height map and the info is coming from a file. Thank you for your help!
website: http://worksimpleintelligen.wix.com/parkers-apps
facebook: https://www.facebook.com/ParkersApps
youtube: http://www.youtube.com/user/mrsovr