Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Is the Real Time Sky in Extends compatible with Advanced Terrain?

Author
Message
borngamer
15
Years of Service
User Offline
Joined: 16th Sep 2009
Location: London, Ontario
Posted: 11th Oct 2009 08:27
I'm having problems trying to get the Extends Real Time Sky working in the same program as the Advanced Terrain. I seem to be able to get one or the other working but not both in the same script?

If I define the terrain first, the RTS Skybox throws a error saying the object is in use. From what I've picked out in the forums, it appears that it uses the first 10 object numbers. Fair enough, so I changed the numbers of my texture to object number 50 and my program crashes every time.

Here's what I have for code so far.



Any help would be muchly appreciated.

Thanks,

John
CSGames94
16
Years of Service
User Offline
Joined: 27th Dec 2007
Location:
Posted: 12th Oct 2009 03:29
Try using the RTS commands first, and if that doesn't work try not using a function.
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 12th Oct 2009 18:13
One thing that pops...

if key$ = "1" and currentTerrain <> 1
currentTerrain = 1
LoadWorld("sample")
endif
if key$ = "2" and currentTerrain <> 2
currentTerrain = 2
LoadWorld("island")
endif


Your setting currentTerrain to 2, so if you were to press 2, it wouldn't load a world and would possibly crash because it's trying to update a world that doesn't exist.

Maybe try ensuring that a world is always loaded on the first load, so set currentTerrain to 0, and that should make sure that the world you select is loaded.


Health, Ammo, and bacon and eggs!
borngamer
15
Years of Service
User Offline
Joined: 16th Sep 2009
Location: London, Ontario
Posted: 12th Oct 2009 18:47
Van,

World 2 loads by default and at the beginning of the code. I don't actually have a problem loading the terrain or the sky individually. It's when I try to run them together at the same time things don't work.

Also, I tried the suggestions made by Master13 and no dice.

John
MayoZebraHat 1979
16
Years of Service
User Offline
Joined: 21st Dec 2007
Location:
Posted: 15th Oct 2009 21:56 Edited at: 15th Oct 2009 22:01
Your object numbers are conflicting. I think I address this here: http://forum.thegamecreators.com/?m=forum_view&t=157922&b=18

To be more specific Extends uses some objects/images internally, one of the reasons Dynamic data allocation functions are available in extends. All the parts of the sky system use up dynamically allocated objects (as far as I know, it would be good practice)

Login to post a reply

Server time is: 2024-11-24 01:44:17
Your offset time is: 2024-11-24 01:44:17