Using the other effects?

Discussion and feedback on Construct 2

Post » Fri Mar 11, 2011 4:39 pm

Right now I'm trying to see if I can completely redo the original construct 0.x ghost shooter demo. I've run into a problem though with lights. My plan was to use a semi-transparent black sheet to simulate the darkness, then use one of the effects to eat out part of it when an object gives off light. So far however any time I've tried to use an effect if would just react with everything meaning the light would eat through the darkness, the ghosts, the player, and the floor. Any advice?
B
51
S
10
G
7
Posts: 184
Reputation: 6,825

Post » Fri Mar 11, 2011 6:10 pm

How about just using a big black sprite with a transparent hole in the middle using alpha? You can't use multiply, so I don't think you can get the same lighting-up flash when a ghost is hit. You could just about do it with subtract, but that's not supported by canvas :(
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,528

Post » Fri Mar 11, 2011 7:05 pm

I guess that's the only option for the moment. Mind if I ask a few questions though?

1. Would layer effects be possible in HTML5?
2. Would it be possible to restrict what object effects react with?
3. Is the current ensemble of effects all that could ever be made available without the HTML5 standards changing?
B
51
S
10
G
7
Posts: 184
Reputation: 6,825

Post » Fri Mar 11, 2011 9:31 pm

1. Yep
2. How do you mean?
3. Right now yes, although the standards can and do change, and if WebGL takes off it supports shaders to the same extent the 0.x runtime does.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,528

Post » Fri Mar 11, 2011 11:47 pm

[quote="Ashley":d88six9x]
2. How do you mean?
[/quote:d88six9x]
http://dl.dropbox.com/u/10316081/example.png
It's somewhat in line with what I said with my first post. This picture consists of three objects, the circle has the XOR effect and the 2 squares are over lapping. From what I've read, most of the canvas effects require at least two objects. What I'm asking is, would it be possible to make the XOR effect (For example) put a hole in the red block, but ignore the green one and allow you to see it. Or am I completely screwing up what these particular effects are for?
B
51
S
10
G
7
Posts: 184
Reputation: 6,825

Post » Sat Mar 12, 2011 1:39 pm

Once we have layer effects and the equivalent of 'force own texture', you should be able to do that by having the green object on a layer below.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,528


Return to Construct 2 General

Who is online

Users browsing this forum: Eisenhans, nimos100 and 7 guests