[EFFECT] Force 16 Colors

0 favourites
  • 9 posts
From the Asset Store
Rotate & Animation for 16 Direction & Mouse Direction
  • This is a modification of Gigatron 's NESify effect. It takes 16 user-defined colors and forces any other color to be one of these by checking the nearest color to it.

    Do not mistake this with the "16 color replacer" effect! This one will force 16 colors in your game by comparing them to the nearest user-defined color. This means that, for instance, if your game has a certain shade of green and you define a different shade of green in the effect properties, it will change just fine.

    This effect is NOT able to take a color (for instance, blue) and swap it with completely different color (for instance, yellow). For this one you'll have to use the "16 color replacer" effect.

    Edit: (fixed link)

    Link: https://www.dropbox.com/s/zo1wdkfaoipfd ... s.zip?dl=0

    You can also use the Brightness property to make some cool fade-in/out animations while still forcing your game to use limited colors:

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Wow, that's great! I've been using ReplaceColor to get some palette control going but this looks much more useful. Does it work on individual objects or layout only? Is it limited to 16 colors?

    Thanks for sharing

  • Wow, that's great! I've been using ReplaceColor to get some palette control going but this looks much more useful. Does it work on individual objects or layout only? Is it limited to 16 colors?

    Thanks for sharing

    Yup, it works just fine on individual objects too.

    This effect allows up to 16 colors but you could use less without having to edit the effect directly - just set the unused colors to Red 0, Green 0 and Blue 0 and it should work.

    You can also add more colors but you have to manually edit the .fx and .xml files using notepad (I recommend Notepad++, it's a great app for this).

    To add more colors:

    In the .fx file you need to copy the last 3 variable lines :

    uniform float COLOR16R;
    uniform float COLOR16G;
    uniform float COLOR16B;[/code:1f5s2i6q]
    then paste it below while changing the numbers (to 17 and so on), 
    
    Then you need to add a line for it below the "TRY_COLOR (vec3 (COLOR16R, COLOR16G, COLOR16B));" line (also just copy/paste it while changing it to COLOR17R, COLOR17G, COLOR17B).
    
    After this you must edit the .xml you have and copy the last 3 params (they're on the bottom of the file):
    [code:1f5s2i6q]<param>
    			<name>Color 16 Red</name>
    			<description>Red color to replace, from 0 to 255.</description>
    			<type>float</type>
    			<initial>255</initial>
    			<uniform>COLOR16R</uniform>
    		</param>
    		<param>
    			<name>Color 16 Green</name>
    			<description>Green color to replace, from 0 to 255.</description>
    			<type>float</type>
    			<initial>241</initial>
    			<uniform>COLOR16G</uniform>
    		</param>
    		<param>
    			<name>Color 16 Blue</name>
    			<description>Blue color to replace, from 0 to 255.</description>
    			<type>float</type>
    			<initial>232</initial>
    			<uniform>COLOR16B</uniform>
    		</param>[/code:1f5s2i6q]
    And paste it below, editing the COLOR16 variables to COLOR17 and so on. If you want you can also change the numbers between the <uniform> tags to have a default value (aka the color you want). This way when you add the effect it will already have the color you wanted.
    
    You can have as many colors as you want by doing this.
  • Thanks for the explanation, I'm adding colors like no tomorrow now. The fade effect you can get with this is great, I dig it.

  • This is awsome! I love this kind of style and will deffinatly be using it as soon as I can.

    That example GIF looks great as well. But is it just a mock up or is from an actual game? Cause I would like to play it

  • This is awsome! I love this kind of style and will deffinatly be using it as soon as I can.

    That example GIF looks great as well. But is it just a mock up or is from an actual game? Cause I would like to play it

    It's a game I'm working on right now but it's still very early.. won't be done for the next few months!

  • I will be looking forward to it

  • I was looking time ago for something like this but not RGB based. Is there any chance to use Hex Values?

    To add colors like:

    1: F0F0DC

    2: FAC800

    3: 10C840

    etc...

    Instead of fill 3 parameters for one color. So Instead of use 48 parameters for 16 colors we only had to fill 16.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)