It would be amazing to have objects opacity, like the Z-Value…what do you think?
You should be able to set this now, juaxix
fill( r, g, b, a ) stroke( r, g, b, a ) tint( r, g, b, a )
You can call tint( 255, 255, 255, 128 ) to make a sprite 50% transparent, for example. The same applies to fill and stroke.
I knew that…it is just a suggestion…it would be nice to refer an object and so on…thanks for woke me up
when you say now is in the new version?
Now as in today - go look at the “Dungeon Roller” example, which does sprite transparency effects.
yes, that’s the point, i used that example in the Asteroids game also…but i was thinking in something more easy to understand and use…
Keeping in mind that they can’t just change the API if they made an odd choice in design, because they’d break existing code, this is an ideal place to wrap it with something you find more appealing.
function spriteAlpha(a) tint(255, 255, 255, a) end
then spriteAlpha() fills the same role stroke() and it’s friends do. Or, just override the sprite() call itself, adding the optional parameter.
Very clever, thank you