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.

Screen Tinting in a Time System

OS

Sponsor

Hello, all! I need a quick bit of help with my tinting method for my Random Weather 7.0.
Here is my way of creating a screen tone change:

Code:
def create_new_tone
    il = tone_hour*10
    il += tone_minute/10
    tone = Tone.new(il,il,il,0)
  end
  
  def tone_hour
    ret = hour?(24) >= 12 ? -hour?(24) : hour?(24)
    return ret
  end
  
  def tone_minute
    if tone_hour >= 0
      return @current[1]
    else
      return -@current[1]
    end
  end

Unfortunately the tones are too far off. I tested this with 6:30 (which was very bright) and 10:30 (which was very dark). This isn't right because both numbers were AM, so the tones shouldn't have been so different (and ten shouldn't have been so dark.)

Does anyone have a different way to tint the screen every hour, at least? I would prefer it to use minutes as well, so that the tone is changing every 60 seconds, but I don't absolutely need it too.

If anyone has any ideas, please let me know as soon as possible.

Thanks.
 

OS

Sponsor

Never mind, ya'll. I had some extra time to test this morning and came up with a set of Tones that I think work just fine! They range from -100 to 20, and transition every hour. It looks pretty good, I think. RESOLVED.
 

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