[Solved] Marching Squares Size of Fill outside

Hi, i’m new to Gdevelop, and starting to cook something, i was looking for a way to make a Fog of war thing (all black, being discovered by the player when he walk in) i found, Marching Squars, it does the job i want like a charm.

My only problem, is i would like it to fill outside my Vision field UP TO my border of playing area, at the moment i can only manage for it to fill to my screen size and then zoom in.

This is the edge of my 1920*1080 size, i would like it to expend further, up to a limit i would decide.
Is there anyway to do it ? or should i found another way to make a fog of war ?

Also, i create Object based on a timer and they are visible, is there a way to hide them like other object ?

image

Edit:
image
I would like a system that will allow me to reveal area while destroying rock
Here each rock got a fill inside.
What i’m looking for is when a rock is delete, it reveal the area around himself.
Any advice are welcome.

Edit edit :slight_smile:
Pathing
I achieve that, by adding a black block on rock, and delete it / change opacity based on distance.
I’m not sure this is the best way, i’m still open to any recommandation.

Thanks a lot

I’m not familiar with the fog of war. Try searching the forum for either marching squares or fog of war.

This seems similar.
https://forum.gdevelop.io/t/how-do-i-make-a-boundless-fog-of-war-like-in-some-of-the-best-isometric-and-top-down-rpgs/53955/6

I’m not familiar with the fog of war. I know a little about the marching squares. If not all of the objects are hidden, I’m wondering if they’re either not on the right layer or maybe the z-order needs to be changed. Again, I’m not familiar but it sounds like that could be the issue.

1 Like

In FogOfWar example you can see that VisionField shape painter
Is placed on separate layer which is above base layer
Which would fix your issue with some objects being above fog

Thanks both of you for your answer.

I totally the way i will make it work, but i will still try your solution, for maybe other usage.