Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Day/Night system

I'm not looking for a Day/Night system (I'd just use CCOA's otherwise)

Question 1. Does ccoa's Day/Night system use actual time? If so, where can I find it (looked on forums, and download manager)

Question 2. My system replaces the step counter with the clock (Cliché I know, but i'm new to RGSS) How do i get double-digit time for anytime below 9AM? (instead of 3:4 it displays 03:04)

Question 3.
Can someone help me come up with a formula that changes screentone according to the time?
Eg: $hours*4 = $tonered (which wouldn't work I know)
 
I hope you had a chance to read my reply on the temporary forum, since apparently all posts there wasn't transferred back here. If not...

Answer 1.
Have you tried The Lost Script section?

Answer 2.
Just use something like this:
Code:
time_to_show = sprintf("%02d:%02d", hour_to_show, minute_to_show)
#now you can draw text as usual
self.contents.draw_text(x, y, width, height, time_to_show, alignment)

Answer 3.
There are many approaches to do this. For example, you can determine time periods (the easiest way is by dividing the 24-hour clock by hours). Each period will have its own screen tone. Let's say...

6 am to 10 am: slightly bright
11 am to 3 pm: normal bright
4 pm to 6 pm: a little bit red
7 pm to 8 pm: slightly dark
9 pm to 3 am: very dark
4 am to 5 am: not too dark, not too bright

Now, each time you update your clock, check the hour. Change the screen tone if necessary. To change the tone, use $game_screen.start_tone_change(tone, duration), where tone is the screen tone and duration is how long the transition will be (maybe in frames). You can define a tone by using Tone.new(red, green, blue, gray); all four values are the same as using Change Screen Color Tone in event editor.

Shall you need more help, just ask.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top