Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Changing a Game from DAY to NIGHT

ozboybrianozboybrian Posts: 2,102PRO
edited February 2012 in Miscellaneous
Any tricks to this?

Writing up script and features for an RPG I hope to start at the end of this year.
Already have art being prototyped but It will be a big RPG. I'm thinking easily 200mb. Quite possible a gig.
Will take over a year to make working up to 12 hours a day.

So obviously it would be a big time save if there was some method to make it look like it's night time without losing all the graphics.

Could just have it set as day all the time and just have somethings as night for story etc. But that could be boring.


  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,914Member
    Wait let me get my magic wand....waving it, okay close your eyes. Presto it's night.
  • ozboybrianozboybrian Posts: 2,102PRO
    edited February 2012
    lol I thought maybe there would be some darkness technique with colours or just something obvious I hadn't thought yet Captain Smart ****! :-q :P
  • KillerPenguinStudiosKillerPenguinStudios Posts: 1,291Member
    LMAO =))

    There are different ways that I am thinking that could work. Create triggers throughout the game that would fade in the night scene then fade it our. Or maybe a timer that is set really big that after the timer hits zero to fade in the night scene, then the same to fade it out over time. Not sure if those are kind of what you are looking for but thats what came to mind!
  • ozboybrianozboybrian Posts: 2,102PRO
    Oh yeah that much I know :) I was hoping there would be a method where I wouldn't have to change the actual art work ;)
    I guess there's no way around it! Just gonna be a lot of scenes is all :(|)
  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,914Member
    In the old days of silent film they used to simulate night by dying the film with a blue hue. You could try a type of gradient to cover the whole scene and adjust the opacity. There is an old school trick for ya.
  • ozboybrianozboybrian Posts: 2,102PRO
    I like it! :D thanks mate.
  • ChobbifaceChobbiface Posts: 491PRO
    edited February 2012

    I change one of my scenes from day to night by changing the red, green and blue colours of my background actor (no image change). Here's what I do:

    When sunset condition is true:
    interpolate (background actor) red to 1 over 1.5s
    interpolate (background actor) green to 0.51 over 1.5s
    interpolate (background actor) blue to 0.23 over 1.5s

    Then timer after 1.5 seconds:
    interpolate (background actor) red to 0 over 0.5s
    interpolate (background actor) green to 0.03 over 0.5s
    interpolate (background actor) blue to 0.28 over 0.5s

    For sunrise: interpolate red, green and blue back to 1 over 1.5s

    What this does is give a nice natural fade from day to night, without need to change background images (note it might not be suitable with all images), but the overall result as fryingbacon has mentioned is to give a blue hue effect which simulates night. You can of course adjust the numbers to fine tune it how you want it.

    Give it a whirl and see if it helps
  • SlickZeroSlickZero Houston, TexasPosts: 2,870Member, Sous Chef
    Brian, you remember my Christmas game? It had a nighttime background if the player was playing after 6pm, and it changed back to day at 6am. Is that what you are talking about?

    I have no friends. I'm a loser that makes video games all day. Will you be my friend?

  • ozboybrianozboybrian Posts: 2,102PRO
    Thanks @Chobbiface i'll give that a go when I get more in to it to :)
    SlickZero this for that RPG i'm making. Remember you said "What Hentai?" as a joke when I sent you that image lol.
  • JohnPapiomitisJohnPapiomitis Posts: 6,256Member
    Just have a black actor that covers the scene and thats on a non scrollable layer, and have the alpha set to 0

    then when you want it to become night just interpolate its alpha to 0.7 or something
  • ozboybrianozboybrian Posts: 2,102PRO
    Yeah I was thinking that to actually... Lots of awesome options at my disposal for the best result :D
This discussion has been closed.