556
Programming / Re: Let there be light
« on: July 06, 2010, 09:22:01 am »What, showing off without a hint of code??? How dare you!Hehe, I was actually too embarressed to show the code, whilst the effect looked "okay", the code was pretty sloppy.
Very nice work! Looks a lot less gradual than the X-Com effect though, I presume you're not done yet?There are a number of issues with it at the moment, the main one being more than 1 sunrise in a day; secondly, I was getting the last longitude of each polygon and calculating a shade based of longitude and hour. This will also contribute to the relatively "jerky" sunrise.
It's populated by Globe::setSavedGame.Good call (pardon the pun), I didn't see that
I just tried it myself in the original, you're right that the ocean has 6 shades, but each land polygon seems to have 9-10 shades.Hmm, perhaps I need to dump the palette out so I can see what I've got to work with. I'm sure if my "shade" variable went negative, or above 6, the globe went psychodellic.
Actually, I dumped the palette out:
At least 16 shades, which will also make a smoother transition.
On with the thinking cap.
Also, one last thing. As you noted that there are shades of ocean, you're just drawing a blue circle. Are there ocean polygons that are just not being drawn yet? or is that going to need some wizardry to paint?