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.

DarkBASIC Professional Discussion / DarkClouds issue with time.

Author
Message
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 4th Feb 2011 01:14 Edited at: 4th Feb 2011 02:23
I've been playing around with DarkClouds now for a few days and have noticed several "problems".

The main one I'm having right now is it's use of time to set the time of day.

I've set up a test program that runs through a 24 hour cycle, and at different times the Sun will start moving in a figure 8 pattern that's centered on where it's actually supposed to be in the sky.

The documentation isn't clear on the subject, but through testing I've figured out that time runs 0.0 to 23.99 to represent hours and minutes. The transition between 23.99 and 0.0 is a long one, and the transitions around those two times suffers the same inconsistency as what is shown in the video below.

I haven't seen much (if anything) posted about DarkClouds, which concerns me, and the few things I've asked so far haven't received much of a response. I'm hoping this add-on isn't a lost cause...

Here's a video showing some of the weirdness.

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 4th Feb 2011 11:16
Hi KISTech, I have DC and can look into this for you but not until tonight (at least). Is the sun bobbing around? Hard to tell from the video exactly what the problem is. I have noticed a similar problem if you update DC without changing the time of day...

Could that be the cause? Can you post a simple demo of the problem?

KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 4th Feb 2011 18:59
Interesting. That seems to have fixed the problem. I was updating every loop, but when I changed it to this,



then it seemed to work as expected.

Thanks for that.

I noticed the sun shrink and then enlarge again once, but I figured out what that was too. A cloud had formed in front of it, and the brightness diminished, causing it to shrink. As the cloud moved out of the way it expanded again.

Now if I could just figure out a way to get a star background behind the clouds during the night cycle...

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 4th Feb 2011 21:03
Quote: "Now if I could just figure out a way to get a star background behind the clouds during the night cycle..."

You could try adding them as 'planet' images...

KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 4th Feb 2011 22:11
That would be an awful lot of planet images, and then they would be subject to the lighting of the sun.

I've spent the last several hours playing with making a skybox, and using the dc make cube map command to make the individual textures for the skybox sides, but I can't get a high enough resolution texture to make it worth while. I might have to resort to something like that though for night time, then I can blend a starry sky texture in behind the clouds.

I also noticed that when you make a set of cubemap images it doesn't include the sun image in that texture. So you end up with a bright spot, but no sun image where it should be.

Also, I take it back about the sun being covered by a cloud when it changed size. It does it anyway, and at seemingly random times. It's very strange...

I'd love to see some comment / suggestions from the developer of this.

KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 5th Feb 2011 04:23
Actually, I just found that if you don't update DC ever time before you sync, then the backdrop texture turns with the camera, making it jump when it does update. So that's not the solution either. Updating the time in smaller increments, and then updating before every sync helps get rid of the strange sun movements, but doesn't cure the shrinking and expanding sun image.

I'd call this a bug.

I've written an email to the developer to get his input on the situation.

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Feb 2011 09:55
I have another idea for the stars.

1-set up your star skybox and have it rendered to a second camera (rotated as your first camera)
2-paste the image from camera 2 to the backdrop and then paste your cloud image over the top as a sprite with alpha to make it slightly transparent
3-adjust the transparency of your cloud sprite to suit the time of day

Yes, you should update DC every sync. I thought you might be updating when you weren't syncing... I got this issue when I updated to the same value as the previous update.

KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 7th Feb 2011 23:28 Edited at: 8th Feb 2011 01:52
Not sure that's going to give the desired effect. Might be worth a go though..

On another note, I borked my main hard drive's boot capability by trying to install Windows XP on a second drive so I could dual boot and get some work done. Turns out, once I got XP going I was having some of the same problems.

So I've ripped the XP drive out, put in a new main drive, and reinstalled Win7 Pro 64bit, and have been moving all my junk over from the old drive all morning.

Turns out there were some corrupted files in the DBP core files that were causing the compiler to do all kinds of weird things. Once I reinstalled DBP from the original downloaded file, and then updated to the latest U7.7RC3 it started giving good error messages to tell me what's going on, and it started compiling properly again.

As far as I can tell, that fixed a few of the problems I was having with DarkClouds. There are still issues though.

- The DC SET TIME command gives "command not recognized". This is the command that should update the DC SET CLOUDY changes.
- Not crazy about the rain, as it only shows up on the backdrop. I'll probably handle that myself with a transparent plane in front of the camera.
- DC GET SUN DIRECTION X (or Y or Z) doesn't work. "?DCGetSunDirectionX@@XAIX doesn't exist in DarkCLOUDS.dll".

I bumped up the speed of the updates to watch the results of changing the cloudiness, cirrus cloud level, and rain levels, and it works pretty well. Just have to be patient when you're running a 1:1 game clock I guess..

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Feb 2011 10:37
Not sure. I haven't really used it to dynamically change the weather in those ways yet but for my skybox maker I might need those features at some point...

I got the impression those things should work as you are expecting.

If I get a bit of time I'll take a look as I'm doing some work on EnviroScope (my skybox/skysphere maker) at the moment.

KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 8th Feb 2011 17:11
The realtime changes to the cloudy, cirrus, and wind values all update fine as far as I can see now. I sped up the game clock and was able to see (at Keyframe intervals) that DC was making the desired changes.

The problem with the command DC SET TIME isn't as big an issue, but getting the sunlight direction would be helpful. I've gotten around that by doing a little math, which is probably faster than getting the direction vector from the DLL anyway, and then having to figure out where to place the light.

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Feb 2011 17:23
Looks pretty simple to me:
Quote: "
DC GET LIGHT DIRECTION
Call to obtain the x, y or z component of the direction the sun is shining towards.
Syntaxdir_x#=DC GET LIGHT DIRECTION X()
dir_y#=DC GET LIGHT DIRECTION Y()
dir_z#=DC GET LIGHT DIRECTION Z()
ParametersThis command takes no parameters.

ReturnsThe x, y or z component of the sunlight direction.

Example Coderem Main loop
do
...
set directional light 0,dc get light direction x(),dc get light direction y(),dc get light direction z()
...
loop
"


KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 8th Feb 2011 18:21
You would think so, but DC GET LIGHT DIRECTION X, Y and Z don't exist in the keywords, don't show up in the DLL, and when compiling DC GET SUN DIRECTION X, Y and Z do show up, but doesn't run once the compile is done. (error saying it can't find the command in the DLL..)

I suppose I could try downloading the updates again, but I don't know if that's going to make a difference. You never know though..

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Feb 2011 18:31
Nice... needs reporting as a bug then (if it hasn't been reported already)

KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 8th Feb 2011 21:15
I updated my bug report, and sent an email to support.

In the meantime, I'm playing around with TreeParty.

Why is the default scale of the trees 50,000!!!???

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Feb 2011 21:43
Don't know, don't have it. Sounds a little excessive.

KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 9th Feb 2011 01:28
Yeah, I can't get the trees to show up if I scale them down to a reasonable size. (say 8,000)

Must be something I can do. Scale up the tree parts or something so the scale doesn't have to be that big. It's ridiculous..

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Feb 2011 10:13
Have you tried scaling using vertex manipulation?


KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 9th Feb 2011 17:26
I actually ended up sifting through the tpDPE_lib.dba file and finding several "errors" that were contributing to trees disappearing when scaled down to far, or not showing up at all because their status was set incorrectly. There were also a few errors in the code that was supposed to fade out the tree and fade in the billboard at the proper clip distance. It was just deleting the tree and then fading in the billboard.

I'm also having an issue with prong color. I set them up as dark green in the editor, but when it gets in game they are all the same washed out light green. Could be my lighting though. I'll have to play around with that and see what happens.

Login to post a reply

Server time is: 2026-07-16 04:36:29
Your offset time is: 2026-07-16 04:36:29