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.

Deke/Near's Time Script, Tone Changing

OS

Sponsor

Hello, all. I would just like to know if anyone knows how to get the Tone Change Effect that Deke/Near got with this method:

Code:
def get_tone
  hour=get_hour.floor
  minutes=get_minute + hour*@hour_length
  phase_shift=Math::PI*(minutes/(@hour_length*@day_length))
  illumination=  -150+ 165*Math.sin(phase_shift)
  tone=Tone.new(illumination,illumination,illumination,0)
  return tone
end

without calling the methods in their script. I need this for my own time script that is a little different. It uses a variable for each value instead of a method. I just need to know how to use this formula, only with things changed to use these variables:

Code:
@minutes #Minutes in an hour
@hours #Hours in a day
@seconds #Seconds in a minute
@minute #the current minute
@hour #the current hour
@second #the current second
@frames #the frames per second
@frame #the current frame

If anyone can help, I thank you greatly. I will keep working on it for now. Peace!
 

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