About Water Effect (Warp mask Or Shader)

its Possible to do that effect Underwater in GDevelop?
I think I could put it into my game if its possible.
Anyone know how to do that distortions ?

It isn’t possible “as is”, but if you know JavaScript you can add a JS event and create a displacement filter from an image, then attach this filter to the renderable GD objects you want to distort.

Any example or Clue how i do this?

Not really, if you know JS you can easily access the PIXI renderable object from the GD object: github.com/4ian/GDevelop/blob/m … ct.js#L282
And read some PIXI to know how to create the filter: pixijs.download/dev/docs/PIXI.filters.html

but, it will distort the sprites or tiles near?
cus i want to make the thing more realistic.

sorry im too noob with game development.
I dont even cant understand nothing about java

And im using Gdevelop 4, so it doesn’t have a javascript option.
Or it does?

If it’s a web project, yes, you can use JavaScript. If it’s a native project then there is no filters option.
Also, with JavaScript you can add filters to a single object, a layer, a scene or to the entire game. But I’ve no time to do it, so if you don’t know JavaScript I guess there is no way right now :frowning:

4ian did added to the roadmap to implement filters to choose from. Maybe, could be useful if someone with reputation would express the importance of filters. Pixi.js support so many filters out of the box without need to write our own shaders, it is a shame none of them implemented in GD :cry:
Except Construct 2 I don’t know any other 2D engines out there that offer effects and filters to choose from out of the box, it could make GD really neat even among coders as many people know how to code gameplay don’t know how to code shaders and visual effects.

Yeah, that would be awesome, but who??? :stuck_out_tongue:

I would think of someone who has published a complete may even commercial game with GDevelop or someone contribute to the development of GD with a significant amount of work. I would think (hope) the opinion of someone with such background has more weight and make 4ian to take it in to consideration :unamused:

In C++ is possible to do filters or shaders like this?

The problem is that the C++ code event is not as powerful as the JS one, it allows you to control some properties of the objects but not all of them, also you can’t decide the libraries to link so if what you need is not already linked forget it. Finally, the way GD works (all your events >> render all) doesn’t allow you to do “activate water shader >> render water >> deactivate water shader >> render all the other objects”.

Maybe I’m wrong, but I bet for it to be almost impossible :frowning: