Discord
Login
Community
DARK THEME

How to darken sprite ?

Is there drawSprite with darken mode ? Darken for 10% 50% 90%.. Or how to do it ?

Kind of but it's a bit complicated.

  • Use the pencil but set the opacity to however much you want to darken and set it to black
  • Replicate the shape of the sprite you want to darken in-code now just draw this darker sprite on top of the regular one.

Or I mean just make a darker sprite and draw it whenever you need it instead...

There are also blending options. A bit tricky to use, but gilles made an example

https://microstudio.dev/i/gilles/blendingfixed/

See my Sprite functions > https://microstudio.dev/i/JimB007/spritefunctions/

You can copy your sprite to another then change the brightness of the copy so it does not change your original sprite.

Sprite.Copy("myorginalsprite","darkersprite")
Sprite.Brightness("darkersprite",amount)

With the current feature set, not everything is possible in this regard. I will soon introduce the ability to work with offscreen images, which will make it much easier. With offscreen images, one way to do this could be to create a copy of the sprite, make it a black mask (using special blending ops probably) and then drawing the black mask, with different opacity settings, on top of the sprite.

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community