The player has a distance around itself where the color is normal and black/white on the outside.
this is a gif from Construct 3 (NOT Gdevelop):
I can achieve this in Construct 3 by placing a gray box over the entire area, then having a round objects blend mode to: “Destination out” and then placing it under the gray box with Z-order so it will “cut a whole” in the gray box because of its blend mode.
trying to do the same in Gdevelop but I can’t find any blend mode that lets me do this effect.
I tried messing with the Object Masking addon but never figured out how to achieve the effect I wanted.
I obviously might have overlooked some things here, but I would appreciate it if someone could take the time to help me out. Thanks!
and no, I rather use Gdevelop than pay for Construct 3.
This may sound annoying, but you might have to make the gray scale effect a sprite, and then use the object masking. you can automate that in gdevelop though using the screenshot extension, it allows to take a screenshot of your game and then set it to the sprite of an object.
true, but seems like a way roundabout way of doing it.
According to this post, GDevelop uses PixiJS witch from the looks of it have the src_out option. soo is there any way with code I can make that a filter for a sprite?
I’m not too familiar with the filters but there are layer filters, object filters, some objects like sprites have both tint and blend modes. Plus as you said there’s masking and there might be other helpful extension.
The only issue is I believe some filters require a lot of process time.
You might be able to do it as you envision. You might need to adjust your strategy. Maybe mask the background or some other method and then add/remove the color on the entire object.
Unfortunately, you.cant create negative mask not that I know if that would help. Athough, the Marching Squares extension somehow creates irregular masks. There are marching square examples. They might help. IDK.
Java and javascript are not the same thing. GDevelop uses Javascript.
Object Masking is already a javascript extension that does what you want, there would be no point in writting a whole new extension just to realize that it acts the same as Object Masking, you probably did not know how to setup your events to achieve that effect, but it is possible and not hard.
Once the game loads up, all uncolored objects will create and apply a link to a colored version of them with a ZOrder of "NotColor.ZOrder() - 1 " (meaning that they will be created behind the uncolored objects)
Once the red circle enters in collision with an uncolored object, it takes the color object it is linked to, and move its ZOrder + 1, meaning that they will be displayed above the uncolored object.
Then, it applies the object masking using the red circle as the mask, so the colored object is only visible through the red circle.