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.

Dark GDK / Directory Structure

Author
Message
The Guru
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location:
Posted: 8th Feb 2008 22:43
Hello,

I have encountered a problem, i have been trying to load files to create terrain similar to that in the sample terrain file. I cant overwrite the height map in the default directory due to permission errors i receive. I tried to create a new VS project and copy the demo.cpp file.

dbSetDir ( "media\\" );

I believe this is setting the root directory for the script to the media directory which is in bin/ the next references refer to objects like this - media\\texture.jpg.

Ie this is the path to media/

C:\Program Files\The Game Creators\Dark GDK\Samples\Bin\Media

then texture.jpg etc. reside here

C:\Program Files\The Game Creators\Dark GDK\Samples\Bin\Media\media

When i copy the files to the a new project and debug it i get an error where the message is 6. But it works in the sample section,

How does the gdk directory structure work and how can i get the terrain file to work outside the samples directory?

Thanks,
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 9th Feb 2008 04:04
First - I use slashes the other way #1 it works #2 no escaping needed: c:/hi/mom/Filename.txt

Second - If your code and media are here:

c:\MyProject\

and you are in compiler... there is a directory:

c:\MyProject\Debug

( or )

c:\MyProject\release

where the EXE resides... but the WORKING DIRECTORY is:

c:\MyProject

Try putting your media and exe into one dir, and running outside of compiler:

c:\Temp\MyExe.exe
c:\temp\MyImage.bmp

And running from explorer via double click - that makes current dir:

c:\temp

You mentioned a media directory.

try simply:

dbSetDir("media")

No slashes.

The Guru
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location:
Posted: 9th Feb 2008 10:53
Hello,

Thanks for the reply. I got the sample working now out side the samples directory. But when i modify map.bmp (the height map) i get an error 6.

Here is the sample terrain file modified.



I have changed the black and white file to have more black and then it gets a error 6.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 9th Feb 2008 16:10
ok... other thing about dir ... I personally figure my starting dir is current - so to go into gfx - I might do

dbSetdir("gfx");
...do whatever....
dbSetDir(".."); // to go back where I was before going to gfc dir.



Ok - Error 6 Sux. Its NOT ALWAYS a file error. there are some rules - for example - the height map needs to be even like 16x16, 32x32, 64x64 .... 512x512 etc.

Also - the Tiling and split values can get ya! (So can forgetting the SetUp and Buildterrain but you have those)

If I were you - with terrains... I'd go back to the original - and tweak one thing at a time... so you KNOW HOW you killed it regardless of the error messages or lack there of.

The Guru
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location:
Posted: 9th Feb 2008 17:05
Thanks,

I was just adding more black to the image, ie varying the height levels.

Is the some sort of correlation between the Tiling and Split values and the colors on the map?

Thanks,
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 9th Feb 2008 17:24
Hmm... you must be new - got your response before it showed up - but the answer is NO.

split has to do with how the terrain is "chunked" for display optimization and culling I think

Tiling I THINK is how much the DETAIL image is tiled (repeated) across the terrain.

The Guru
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location:
Posted: 9th Feb 2008 18:29
Ok, problem solved. Thanks,

Login to post a reply

Server time is: 2024-09-29 11:28:19
Your offset time is: 2024-09-29 11:28:19