lua - swapping assets for night mode

  • #10, by afrlmeThursday, 06. April 2017, 16:24 7 years ago
    Yeah, you could have tinted screen a color & set the strength with the openGL shader or apply lighting (spotlights) in any color you like, but neither of those options would add shadows or anything as it's still a 2D game. Useful if you want to darken a room & give your character a flashlight or the scene shifts between dark & light due to it being a dark room with some flashing/pulsing fluorescent lights or emergency lighting.

    Imperator

    7278 Posts


  • #11, by F_KalThursday, 06. April 2017, 17:05 7 years ago
    I see @ARFLme! 
    Is there some GLshader (I'm not even sure what shaders can do or cannot do) that can be applied on Scene objects (not the whole scene) and allow the particular scene object to be blended with the underlying layers in a manner other than opacity? eg. multiply blending, additive, substract,divide etc?

    Forum Fan

    107 Posts

  • #12, by afrlmeThursday, 06. April 2017, 17:46 7 years ago
    I see @ARFLme! 
    Is there some GLshader (I'm not even sure what shaders can do or cannot do) that can be applied on Scene objects (not the whole scene) and allow the particular scene object to be blended with the underlying layers in a manner other than opacity? eg. multiply blending, additive, substract,divide etc?
    Simon is the best one to ask about the shaders. He's the one that implemented it into the source code & wrote the shader toolkit script which is available on the script index page of the wiki.

    To my knowledge only some of the premade shader effects can be applied to scene objects though it's possible if you have enough savvy (I don't) to write your own shader functions & effects to apply to the scene / scene objects, etc.

    You could actually create an image the size of your scene which contains the background & all of the static objects that can't be manipulated/picked up. Other than that I don't know... I still think best approach would be 2 scenes. Getting the position of all your characters on current scene & teleporting them to same position on the new scene is pretty straightforward.

    Imperator

    7278 Posts

  • #13, by F_KalThursday, 06. April 2017, 23:38 7 years ago
    thanks @ARFLme!
    (Probably my next attempt will be replicating the whole scene as you suggest - I've got another room that needs a dark state)

    Forum Fan

    107 Posts