Anyone know a way to do opacity effects?
synthesis
Member Posts: 1,693
For example,
You have a cookie on the screen. The gamer taps the cookie and a bite is taken out at the location of the tap using an opacity overlay (which basically masks the image).
In Flash...you would use a mask layer...its pretty simple there.
I am wondering if GS has a way to accomplish this. I have played around with the available graphics settings and have not gotten anything working like this.
Is it possible to achieve this in GS or not? If so, how? If not...it sure would be nice to have.
You have a cookie on the screen. The gamer taps the cookie and a bite is taken out at the location of the tap using an opacity overlay (which basically masks the image).
In Flash...you would use a mask layer...its pretty simple there.
I am wondering if GS has a way to accomplish this. I have played around with the available graphics settings and have not gotten anything working like this.
Is it possible to achieve this in GS or not? If so, how? If not...it sure would be nice to have.
Comments
You'll need to make separate images for each frame of the sequence.
I agree that masks would be nice!
If allowing more than one bite, maybe then test for which image is currently in play and then select a newer bite image.
If you allowed bites in four quadrants, name your images something like:
cookie_1_1_1_1.png
cookie_1_1_1_0.png
.
.
.
And then use string concatenation to "select" the newer image based on the current image.
The problem here is large rule sets and also if the cookie is rotating or not to determine "bite" quadrant/location (more maths). Also, if you already have a bite in quadrant 4 you would have to ignore (more rules).
If you don't care where the bite shows up on the cookie in relation to touch, this gets easier.
Something along those lines...this was hastily thought up.
It seems like the "Additive" setting is nearly there. It doesn't seem like it would be a stretch to offer an "Opacity" adjustment that is connected to scene layers (similar to spawning settings). Their "Opaque" setting doesn't seem to offer anything valuable to graphics manipulation.
I'm using approximately 100 constrains in my current project (with simple graphics) and it performs adequately on a 3GS. It functions on the lesser models, but the timing of execution with timers gets funked up and not all rules fire...so not playable. Anyway, with a four part cookie, that is 25 cookies...scale it down to 10-15 to have a lot of overhead...
Thanks though for the excellent base solution...I hadn't thought of spawning an "opacity block".
HELP US OUT GENDAI...LET'S IMPLEMENT OPACITY EFFECTS ALONGSIDE ADDITIVE EFFECTS!!!