Best way to achieve a Day/Night or Seasons cycle?

  • #1, by fritozSaturday, 01. February 2014, 00:23 10 years ago
    Hi all!

    My apologies if this has already been asked, i searched the forums first using the search term tool, but i found no matching posts

    My question is:

    What would be the best way for me to achieve a Day/Night transition effect for my game?

    Let me explain my theory first,then you can tell me if i am way off- (Before i spend a lot of time making backgrounds, i wanted to ask this!)

    I have a few dozen backgrounds all painted and ready, and i thought it would be neat to have my game have a Day Night Cycle you could see as the in-game clock changes, from light to dark and back again

    it would be a persistent dynamic, so even in caves where there is no light if your character has a nighttime stat boost it would still be in effect at appropriate times

    In photoshop i can easily change my art of each background to visually depict "night" and "day" (by changing color schemes, brightness, levels, and some cool plug ins) without much work once the initial background is completed

    in fact to illustrate my point i just uploaded this quick vid to youtube- it is made with only 3 main key frames of the same image, one day image, one night image, and one foggy image, i just changed transparency of the overlying levels to simulate the change in day to night etc- it works for seasons change too quite well-

    be sure to choose HD720p from youtube options, for some reason it always plays at only 360p by default

    Day/Night Cycle (and fog) Transitions Proof of Concept

    and a seasons cycle test

    Seasons Transitions Proof Of Concept

    So is this possible to recreate in Visionaire? without taxing the game engine too much? Basically using an opacity change with the backgrounds to change them in real time? I think it would be neat to have, so NPC's would come and go at night and things will change according to the time of day and visibility..

    another way to do it i suppose is to use simple alpha layered overlays using transparency to simulate the "night" effect but it would not be as cool as a totally recolored background transition imo, is this technique at least possible?


    ok so this one is my last resort, and it is more or less giving up on the whole transition idea and simply using a system where there is no in game clock, the time of day will stay forever either daytime or nighttime, but you can change the time of day by resting at certain points or at a bed or whatever i decide to implement, but the gist is, you can choose to "rest until..." and basically at first i would have only, "rest until daytime" and "rest until nighttime"

    then whatever the player chooses, it would load up the corresponding background and NPC models and a new player character skin colored/shaded appropriate for either day or night

    then i could have the unique aspects of of the day/night dynamic with no need for transition scripting...eventually i could have "rest until morning" and "rest until evening" if i wanted so then i could have more chances to change the look of the environments and have unique NPC interactions at different times of day


    its just i would really like a world where the time changes around you... i could even have seasons change as you play the game, the in game clock could dictate actions that trigger new animations to make leaves fall off trees and eventually grow back etc etc..

    maybe that is too ambitious for this engine? or maybe it is totally doable? i have high hopes it is doable, i hope someone knowledgeable can tell me either way

    i appreciate all ideas and feedback about this, i admit i like to think about game creation alot, so i have lots of ideas


    16 Posts

  • #2, by afrlmeSaturday, 01. February 2014, 01:31 10 years ago
    this is certainly possible... you could create a timer system via the editor using the pause action part in combination with values & a few if queries. Or you could use Lua script to create a timer or even use the players computer system time/date to reflect the in game time/season as it would be in the real world, or you could progress the time at certain points, - as you said - like after resting/saving; GTA style.

    your ideas for fading in the backgrounds/objects/animations seems perfectly reasonable to me.

    conditions, values & if queries are your friends, in this matter!


    7272 Posts

  • #3, by fritozTuesday, 11. February 2014, 08:27 10 years ago
    sorry it took so long to respond- i had some issues when i updated my graphics cards drivers, but i finally got it all sorted out and can actually use my computer again! woo-hoo!

    i am very happy to hear it is possible! it sounds like the trickiest part is creating an ingame clock system and then tying events to them and stat boosts and NPC location dependencies etc etc

    i think i may focus on getting a good demo made and then if i get a good interest going and a successful kickstarter campaign i can get more ambitious

    im sure i will have more questions once i get deeper into actual scripting the in game clock-

    until then, thanks again for the info


    16 Posts

  • #4, by ScubidubiTuesday, 18. March 2014, 12:07 10 years ago
    i would create animations for the background but set the background as object on the lowest layer so you walk on it. then use queries and values to change lightmaps and the phases of the background. the exaples you gave via youtube basically play with saturation and exposure settings. if possible split your images to layers so you can edit the values of your image, in your graphic program of choice, separately. but you would still need a timer ..which i have no clue about grin

    Forum Fan

    106 Posts