What does this mean for me? You will always be able to play your favorite games on Kongregate. However, certain site features may suddenly stop working and leave you with a severely degraded experience.
What should I do? We strongly urge all our users to upgrade to modern browsers for a better experience and improved security.
We suggest you install the latest version of one of these browsers:
Kongregate is a community-driven browser games portal with an open platform for all web games.
Get your games in front of thousands of users while monetizing through ads and virtual goods.
Learn more »
I’ve got a torch that “lights up the room” when it’s really a black circle with a white triangle in it. And the blendmode set to Multiply. So the white in the circle essentially becomes transperant and you can see the room, and the back hides everything else.
I also have other objects and walls that cast shadows that are simply black-filled shapes.
What I want to do is make a window where you can see the world outside, regardless of whether an object nearby is casting a shadow, or if the torchlight is on it or not. (See picture)
I already have background and the window with the transperant sections cut out, but I have no idea how I can make the background “shine through” the darkness. I assume I’ll need to use a blend mode to cancel out the darkness, otherwise I’m not sure it’s possible. :( Any help?
PS. I can’t put the background over the foreground and mask it because the cutout is a lot more complicated than the picture suggests.
Make all outside objects be children of X including the window itself. The window will be on top of everything else, and there needs to be a mask on X the shape of the window.
That might get really ugly, so maybe try version 2:
Make all outside objects be children of X. X is child of Y. Window is child of Y. Make mask on X the shape of the window. Make sure Window is set above X.
I simply used the square window as an illustration to make it easy to understand.
What I’m really working with is a chainlink fence, or a crosswork of metal bars, etc. Every map has different “windows” of different shapes and sizes.
Here’s one example:
> *Originally posted by **[DrYoshiyahu](/forums/4/topics/311870?page=1#posts-6584776):***
> Ok I guess I’ll have a go at manually drawing absract shaped masks for each level, see how that goes…
on topic: make the “window” a lightssource in your lighting engine.
The problem with that is that my other light source is simply white that becomes transperant, and black that covers everything else.
Remarkably, making a mask actually worked. It took a while to draw, but it’s perfect! :)
> *Originally posted by **[DrYoshiyahu](/forums/4/topics/311870?page=1#posts-6584822):***
> The problem with that is that my other light source is simply white that becomes transperant, and black that covers everything else.
> Remarkably, making a mask actually worked. It took a while to draw, but it’s perfect! :)I’m not sure how making the window light itself in the same way as the flashlight wouldn’t work?
Because the “light” from the torch is really an absense of darkness, which is everything else. To make a new “light” I would really be deleting “darkness”. My “light” is a black circle with a hole cut out so you can see the floor and the walls.