Re: Particle color
Posted: Tue Mar 29, 2016 11:46 pm
Thank you for the advice. I tried with fadeIn() and fadeOut(), it really looks better with those transitions.
Getting the right values from GameMode.getTimeOfDay() to start and set duration of those transitions was the hard part... Luckily in my mod I decided to use physical time for this parameter instead of tiles walked, so I can calculate a correctly scaled value for the duration of a transition. But I had to do many tries so I used a fast day/night cycle as you can imagine (from 12 sec to 2 minutes, no way I could stand the 24 hours test
)
I hope the values I found will scale nicely for the normal cycle (24h). Here are the values I found, correct me if this is wrong;
- 0.04 to 0.08 : end of dawn, transition from orange to light blue clouds
- 0.90 to 0.94 : evening, transition from light blue to orange clouds
- 0.98 to 1.02 : night begins, transition from orange to dark blue clouds
- 1.96 to 2.00 : dawn begins, transition from dark blue to orange clouds
(time of day is in range [0,2[)
I was expecting more symmetry for those values, seems the night is longer than the day... I am glad there is no seasons in the game
Getting the right values from GameMode.getTimeOfDay() to start and set duration of those transitions was the hard part... Luckily in my mod I decided to use physical time for this parameter instead of tiles walked, so I can calculate a correctly scaled value for the duration of a transition. But I had to do many tries so I used a fast day/night cycle as you can imagine (from 12 sec to 2 minutes, no way I could stand the 24 hours test
I hope the values I found will scale nicely for the normal cycle (24h). Here are the values I found, correct me if this is wrong;
- 0.04 to 0.08 : end of dawn, transition from orange to light blue clouds
- 0.90 to 0.94 : evening, transition from light blue to orange clouds
- 0.98 to 1.02 : night begins, transition from orange to dark blue clouds
- 1.96 to 2.00 : dawn begins, transition from dark blue to orange clouds
(time of day is in range [0,2[)
I was expecting more symmetry for those values, seems the night is longer than the day... I am glad there is no seasons in the game