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.

Code Snippets / Advanced Day/Night Simulation (No media needed/copy, paste, and run)

Author
Message
Yusaku
21
Years of Service
User Offline
Joined: 21st Jan 2003
Location: NYC
Posted: 17th Jul 2005 18:06 Edited at: 18th Jul 2005 23:17
New Code Below
Note: When first posted, users replied at the code not working. It's been drastically updated in the few hours since then.

Twenty four hours of programming in the last year to bring you all one of my best programs yet. This newly enhanced version of my day/night simulator used in my DBZ Trunks RPG features sunrise, sunset, moonrise, and moonset. The sun rises at the same time each day (perhaps in a later version this will change), but the moon travels a bit faster than the sun, so some time down the road, there will be a total solar eclipse... I just don't know when. Change the timespeed# to 0.003 for a near virtual-second-to-real-second ratio. Enjoy!




-----Signature-----
http://tenshin.infinitydev.net -- Games Made: Dragon Ball Z, Dragon Ball GT, Fable, Master Chief, and more.
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 17th Jul 2005 22:08
hmmm, i could swear i saw this before in the codebase.

P.S. It's not exactly advanced if you don't have a sun going round and round and round and round and round.

Your signature has been erased by a mod because it's larger than 600x120...
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 17th Jul 2005 22:25
Works fine in the start. And then, when blue color is bigger then 255, the sky turns brown all of a sudden... Also, it runs pretty slow on my pc...

Immunity and Annihalation makes Immunihalation...
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 17th Jul 2005 23:15
Went brown for me too.

[url]andrewneale2004@yahoo.com[/url]
http://www.elbsoftware.dbspot.com
Yusaku
21
Years of Service
User Offline
Joined: 21st Jan 2003
Location: NYC
Posted: 18th Jul 2005 04:33
Hmm, odd. I'll look it over a bit later.

-----Signature-----
http://tenshin.infinitydev.net -- Games Made: Dragon Ball Z, Dragon Ball GT, Fable, Master Chief, and more.
Robot
20
Years of Service
User Offline
Joined: 27th May 2004
Location:
Posted: 18th Jul 2005 16:09
The new one is a lot better! well done.

The happenings of tommorow are behind us now
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 18th Jul 2005 19:29
rgb colors are actually 1 nr.
for example: rgb(255,255,255) = 16777215
rgb(0 ,0 ,1 ) = 1
rgb(0 ,1 ,0 ) = 256
rgb(1 ,0 ,0 ) = 65 536
etc.

this means. When the blue value > 255, the green value will be raised by 1.

Immunity and Annihalation makes Immunihalation...
Yusaku
21
Years of Service
User Offline
Joined: 21st Jan 2003
Location: NYC
Posted: 18th Jul 2005 23:16
"rgb colors are actually 1 nr.
for example: rgb(255,255,255) = 16777215
rgb(0 ,0 ,1 ) = 1
rgb(0 ,1 ,0 ) = 256
rgb(1 ,0 ,0 ) = 65 536
etc.

this means. When the blue value > 255, the green value will be raised by 1.
"

Not sure if you only read the replies or actually tried it, but it's been fixed.

-----Signature-----
http://tenshin.infinitydev.net -- Games Made: Dragon Ball Z, Dragon Ball GT, Fable, Master Chief, and more.
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 18th Jul 2005 23:29
Quote: "Not sure if you only read the replies or actually tried it, but it's been fixed."

Either way, it was just an explanation. I learned from it. Thanks Sven B!

[url]andrewneale2004@yahoo.com[/url]
http://www.elbsoftware.dbspot.com
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 18th Jul 2005 23:52
I was doing some research about it. I wanted to create a function that does exactly the same as rgbr(), rgbg() and rgbb(). (I didn't know they existed). They worked alright, and then I saw those commands...

Immunity and Annihalation makes Immunihalation...
Darkbasic MADPSP
19
Years of Service
User Offline
Joined: 15th Jun 2005
Location: Uk
Posted: 1st Aug 2005 21:45
Can you take the matrix commands out of it please as i already have a matrix

life's a game and a games a life More games at www.freewebs.com/halorc

Login to post a reply

Server time is: 2024-11-23 11:28:20
Your offset time is: 2024-11-23 11:28:20