GMS 2 Night effect with limited colour palette

Discussion in 'Programming' started by trentallain, Jun 7, 2019.

  1. trentallain

    trentallain Member

    Joined:
    Aug 6, 2016
    Posts:
    473
    Basically, if I am using the endesga 32 colour palette and I want my game to only use those colours. So no blending or alpha etc because that will ruin the effect. However for night time I need a way to make it look like night (with a light source around the player). What I was thinking of doing is shifting every colour "down one" on the screen, that is not in the circle around the player. For example, the light red becomes the slightly darker red. And black remains black because that is the darkest in the palette already. Anyone know if a shader could do this?
     
  2. Yal

    Yal Member GMC Elder

    Joined:
    Jun 20, 2016
    Posts:
    3,395
    @Pixelated_Pope made a pretty good palette swap shader, I've been using it for years. (Or at least it feels like years, I keep exaggerating all my number estimates :p)
     
    Pixelated_Pope and trentallain like this.
  3. trentallain

    trentallain Member

    Joined:
    Aug 6, 2016
    Posts:
    473
    So I would just colour swap it to a colour palette with all the colours shifted down 1?
     
  4. Pixelated_Pope

    Pixelated_Pope Member

    Joined:
    Jun 20, 2016
    Posts:
    780
    You could actually define each alternate color specifically.

    If you want the palette to only apply to a specific area of the screen, that is possible but can be a bit tricky to implement.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice