Page 1 of 1
Re: Terrain won't show up
Posted: Wed Aug 28, 2013 6:22 pm
by DK_PETER
Hi Alexi
CreateTerrain(-1, 500, 12000, 600, 1, *Scene\Name, "Data")
~ You've set entity number to -1, why?
Best regards
Peter
Re: Terrain won't show up
Posted: Wed Aug 28, 2013 6:23 pm
by Fred
Does the examples works ?
Re: Terrain won't show up
Posted: Wed Aug 28, 2013 6:26 pm
by DK_PETER
@Fred
Works fine here.. 5.20 LTS B13
Re: Terrain won't show up
Posted: Wed Aug 28, 2013 6:29 pm
by Fred
I mean for Alexi, here it works as well

Re: Terrain won't show up
Posted: Wed Aug 28, 2013 6:36 pm
by DK_PETER
@Fred
Ooooh, I knoooow..I just wouldn't want to be left out ;-D
No seriously....Alexi uses an entity number of '-1'.
Re: Terrain won't show up
Posted: Wed Aug 28, 2013 7:06 pm
by Olby
DK_PETER wrote:@Fred
Ooooh, I knoooow..I just wouldn't want to be left out ;-D
No seriously....Alexi uses an entity number of '-1'.
Is -1

Re: Terrain won't show up
Posted: Wed Aug 28, 2013 7:10 pm
by DK_PETER
Hehe..I know Olby.. But putting '-1' in Createterrain() won't work.
Edit: Actually..It should work...Weird..

Re: Terrain won't show up
Posted: Wed Aug 28, 2013 7:16 pm
by Olby
DK_PETER wrote:
Hehe..I know Olby.. But putting '-1' in Createterrain() won't work.
#Terrain - The number to identify the new terrain. #PB_Any can be used to auto-generate this number.
Edit: Like you've just realised, it should work.
Re: Terrain won't show up
Posted: Wed Aug 28, 2013 7:19 pm
by DK_PETER
@Olby..
I totally agree. I've just read it too. PB 5.20 LTS 13.
Duh!!! BuildTerrain(Bob) <--- My mistake..Wong number!
Damn..That's embarassing.
Re: Terrain won't show up
Posted: Wed Aug 28, 2013 11:20 pm
by Olby
Alexi wrote:Seems like i fixed it. Don't use #PB_Terrain_Lightmap, maybe it's not freezing, but i don't want to wait 5 hours for a test run. And that's all. I simply use either #PB_Terrain_Lightmap or #PB_Terrain_NormalMap (#Null), but #PB_Terrain_NormalMap seems to work at a passable Speed.
And "Size" in CreateTerrain() must be equal the Heigthmap you are using. I simply use most common sizes like 64, 128, 512 + 1 Pixel. (65, 129, 513)
Once a terrain is generated and stored on disk it will try to reload it next time when you call createterrain using the same terrain file name. This way you will need to wait 5 hours only once.

Re: Terrain won't show up
Posted: Thu Aug 29, 2013 9:54 am
by Bananenfreak
I´ve programmed an Antifreezeloop
Try this, if you´re using WindowedScreen. If you´re using a Screen, edit it and post it for me

:
Code: Select all
For terrainX = 0 To weltGroesse -1
For terrainY = 0 To weltGroesse -1
DefineTerrainTile(terrain, terrainX, terrainY, "heightmap.png", #False, #False)
BuildTerrain(terrain)
SaveTerrain(terrain, #True)
SetGadgetState(#Progress_Laden_0, GetGadgetState(#Progress_Laden_0) + 1)
Repeat
SetActiveWindow(#Window_Laden)
Until WindowEvent() = 0
Next
Next
There is only a Problem with the Windows Task-Manager. If I call it, it displays, that my program no longer works Oo