• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Asset - Scripts AEColorMask - Apply color to sprites with pixel-perfect precision [free]

angelwire

Member
angelEngineColorMaskLogo_feature_small.png
AEColorMask is a shader with a collection of scripts that let you apply a color to specific sprite areas using a mask

Marketplace Link: https://marketplace.yoyogames.com/assets/9420/aecolormask-recolor-sprites

With these scripts and shader you can color objects to add variety to your game without creating a bunch of duplicate sprites.
people.png

This system doesn't rely on palettes or have any restriction on the original sprite's color count. This means you can apply color to realistic sprites
cats.png
maskExample.png

The scripts set up and handle the shader for you:
  • draw_self_color_mask(...)
  • draw_sprite_color_mask(...)
  • draw_sprite_ext_color_mask(...)
  • draw_sprite_stretched_color_mask(...)
  • draw_sprite_stretched_ext_color_mask(...)
  • draw_sprite_tiled_color_mask(...)
  • draw_sprite_tiled_ext_color_mask(...)
All you have to do is provide the mask sprite (ideally it should be the same size as the original sprite), the mask sprite sub-image (masks and sprites can be animated), the color to apply, and the alpha that the color uses (an alpha of 0 will make the original sprite transparent which is also a neat feature)

There is a demo project included with a lot of helpful information

Documentation link: https://docs.google.com/document/d/1n34mwDxn5vIFn7HiNA553GS1RSrodGB4eOOqPx1o-gw
Marketplace Link: https://marketplace.yoyogames.com/assets/9420/aecolormask-recolor-sprites
GitHub Repository: https://github.com/angelwire/AEColorMask

I'm always willing to help out if you have any questions or problems. And if you have any suggestions I would be happy to hear them!​
 
Top