Making sprite partially invisible with alpha overlay?
CircleTime
Member Posts: 84
In my game, my character needs to eat many different objects, one bite at a time. Because there are so many different objects to eat, I do not think it would be memory efficient to make animations of each object being eating away via subtractive bites. So I want to know if it is possible to make a universal bite animation system, that uses transparency to make objects partially disappear, bit by bit? Loosely, I'm imagining somehow overlaying *magic transparent* alpha channel bite shapes on the objects that are being eaten. However, before I attempt this direction (as a Gamesalad novice), any advice if this seems possible? Any advice on another direction to accomplish this?
Thank you in advance,
CircleTime
Thank you in advance,
CircleTime
Comments
Hi @CircleTime I don't think different frames of each object being eaten will take up too much memory, but if you don't want to go down that route...
There's no way to make bits of an image transparent as you go at runtime...
The only way I can think of would only work if you've a plain and flat colour background, that way you could mask the objects bit by bit with an actor the same colour as the background colour.
Perhaps the following might look OK for you, a sort of symbolic eating of the objects: have the whole food item slowly fade to transparent along with reducing in size. Try it, you might like the look of it...
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Although the performance impact of using more actors might be worse than just using multiple images.
Hope that makes as much sense as it does in my head