Quote: "Somewhere in the forums i found this Terraindemo_V2.rar or something, and it worked well. But there's a confusion. that demo doesn't use any of the commands described @ http://bt.blitzwerks.co.uk/Help/index.html"
That demo doesn't use Blitzterrain, It uses an old, outdated plugin called advanced terrain.
Quote: "Well now i'm trying to do with those commands listed in that page, but without success. Let's say all the other commands seems to work "fine", as they don't report any errors. But in example, BT Update/UT Update cameranumber, doesnt work. It says illegal object number. There's no way it it illegal as default cam is 0, and i've even tried 1 and made a camera before that."
This must be a bug. The system calls DBPro functions internally, maybe one of the function calls inside calls something wrong.
You need to add something called a build loop. The build loop was invented so people can add their own loading bars. You can't get round it in 1.05. This code should work.
sync on
autocam off
backdrop on
color backdrop 0
terrain as integer
heightmap as integer
texture as integer
detail as dword
load image "heighmaps\default1.bmp",1
heightmap = 1
load image "textures\textured.bmp",3
texture = 3
load image "detailmaps\detaild.bmp",1
detail = 2
terrain=BT MakeTerrain()
BT SetTerrainHeightMap terrain,heightmap
BT SetTerrainTexture terrain,texture
BT SetTerrainDetail terrain,detail
BT SetTerrainLOD terrain,4
BT SetTerrainScale terrain,1
BT SetTerrainYScale terrain,1
BT BuildTerrain terrain
rem Build loop
progress=0
repeat
progress=BT ContinueBuild(FreeObjectID,0)
until progress=-1
BT InitialiseTerrain terrain
position camera 10,10,10
do
set cursor 20,20
print "x:"+STR$(camera position x())+"y:"+STR$(camera position y())+"z:"+STR$(camera position z())
control camera using arrowkeys 0,0.01,1
print STR$(scancode())
REM use pageup/down to go up/down
if keystate(201)=1 then position camera camera position x(),camera position y()+0.1,camera position z()
if keystate(209)=1 then position camera camera position x(),camera position y()-0.1,camera position z()
BT update 0
sync
loop
Quote: "Here we have loads of cool demos. none of em works for me.. what's the deal :S ? I guess i've installed blitzterrain rightway, dll is in user-plugins and keywords at their place.. etc.."
Those demos were made before blitzterrain was even ported to C++. The DBPro system worked differently to the C++ system.
The reason why things keep changing is because I keep finding better ways to do things. BlitzTerrain 2.00 (formerly 1.06) will be the first non beta release, meaning that I will not add anything which will break any code.
@Duffer, I still haven't started them yet. But I am now happy with the internal structures so this will be added very soon.
Anyway, Update time!!
Just rewritten the delete command and its working fine with no memory leak.
I did a test to create 100 terrains and delete them all. no ram gain between I started the test and finished the test. The test took 17 seconds to create and delete 100 terrains.
I also fixed a crash bug today. I found it while making the previous test. When you make at least 3 terrains it used to crash. This is now fixed.
Heres a list of the things I need to do before the release (not in any order)
Auto Recovery (recovers the terrain on alt tab)
Loading/Saving
Finnish the rendering engine (add shaders, etc)
Environment mapping (a simple feature but it will be used for multi detail mapping in the future)
The 'BT get point excluded' function needs finnishing.
Fix pinholes
We have also agreed on what features will be in which version of blitzterrain. I will publish this soon.