Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@allenkinzalow
Copy link
Contributor

Description
This PR adds the ability to turn on a day/night cycle.

The sunrise and sunset are currently hardcoded to 7 am and 7pm.
The precision is down to the second, so you should not see the shadows "jump" between minutes, it should be a smooth transition.
The sun yaw is currently based on your current local date and where the sun should rise and set based on the month.

Screenshots
9 am: https://gyazo.com/4ce467eedd173b0c3df7eef1bcddcbd5
12 pm: https://gyazo.com/e53c2ceff2a2fd8a6f0b21a532adef93
5 pm: https://gyazo.com/eb7ab14268d8fc8345cfc680071a5cbf
Night time: https://gyazo.com/7a1fb323d7c2f04b25c2c6449abc47e9
11pm: https://gyazo.com/8224794d38d7323e06f11f8170d2b7e2

I am currently looking for help testing this in other environments and adding NIGHT specific environments to other areas.

@NataIynn
Copy link
Contributor

Interesting, Is this togglable? Can you also possibly record a GIF of the transition? Quite Curious on how it looks.

@luna-duclos
Copy link

Could this potentially be based on server time instead so all players have the same day/night cycle ?

@allenkinzalow
Copy link
Contributor Author

allenkinzalow commented Sep 17, 2021

Interesting, Is this togglable? Can you also possibly record a GIF of the transition? Quite Curious on how it looks.

It is togglable, along with making it day-only. I'll try to get a time-lapse video done to show it off.

Could this potentially be based on server time instead so all players have the same day/night cycle ?

I think this would be a good option, but I personally like it tied to my local time so I think having both available is good. I've also considered looking into more of the lore of osrs to see if there is any mentions of the length of the day or time on Gielinor and possibly using that.

@geel9
Copy link

geel9 commented Sep 18, 2021

I would say that it shouldn't be based on your local time (or rather, the time system it uses should be configurable).

Many people only play during very specific hours, so it would get very dull to see the exact same lighting every time you play.

@AustinGarrettR
Copy link

n

As well as a way to make the days longer/shorter.
It's also important that this doesn't affect areas in caves.

@allenkinzalow
Copy link
Contributor Author

I would say that it shouldn't be based on your local time (or rather, the time system it uses should be configurable).

Many people only play during very specific hours, so it would get very dull to see the exact same lighting every time you play.

That problem would occur whether it was based on local time or UTC. I'm adding options for Local, UTC, and Random.

As well as a way to make the days longer/shorter.
It's also important that this doesn't affect areas in caves.

I have already started on the ability to set the amount of cycles per 24 hours 👍
As for the caves, this is built off of the existing lighting/shadows so there's no reason for that to happen.

@Rienokitsune
Copy link

That problem would occur whether it was based on local time or UTC. I'm adding options for Local, UTC, and Random.

I think that adding an option to set a timezone ( local time + Timezone offset) for the day-night cycle to go off of would be quite nice. You could set the timezone to where there's still light if you only play during the night. This would be a nice way to stop yourself from grinding for too long into the night if the sunset in game came out to be 2-3 am your local time. Day-Night cycle is an awesome addition to the plugin. Glory to OpenSource!

@ipkpjersi
Copy link
Contributor

I suggest adding manual options so you can manually set it to day or night time without having it cycle.

@dosier
Copy link

dosier commented Jan 20, 2022

It would be nice if we add support for sun- and moonlight, so shadows can be calculated naturally over the entire day/night cycle (currently it just removes shadows once u hit a certain time).

aHooder pushed a commit to aHooder/RLHD-old that referenced this pull request Nov 21, 2022
* updated license for textures, removed texture that is not open sourced

* updated license
@amastov
Copy link

amastov commented Feb 5, 2023

Looks very promising, it was a feature that I thought would be nice and I'm glad to see it's in development here. I wanted to suggest perhaps a setting to add artificial light sources like streetlamps around roads and such to light the world atmospherically. Could be quite an undertaking but I think the idea has merit. In any case, looking forward to this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants