Hey,
I'm looking for a tutorial for a very simple game like the one where you have to cleanup the screen touching it, like the games for the kids where, for example, you have to rub a finger over the screen to remove all the mud from a cat, or something like that. I'm not sure how this kind of games are called, I've tried "cleaning game" or similar but no luck so far. Anyone has some reference for a good tutorial?
Thanks!

That sounds like painting with your finger, but it's erasing instead of painting?

How much experience do you have with programming and with Godot?

Here are a couple of relevant manual sections:
https://docs.godotengine.org/en/3.5/classes/class_inputeventscreentouch.html
https://docs.godotengine.org/en/3.5/tutorials/2d/custom_drawing_in_2d.html

This might be a useful example:

2D GD Paint Demo
GD Paint is a simple image editor made using Godot and GDScript. It supports different types of "brushes": a basic pen/pencil and eraser, as well as a rectangle and a circle brush.

https://godotengine.org/asset-library/asset/517

[The above links are for Godot 3.5.]

    DaveTheCoder thanks for your answer, yes exactly, it's like a painter with your finger but instead of "paint" something over the screen you have to remove a portion of an image.
    I have a good experience with programming and I've developed some mini games with Godot, but 2D platforms and Pixel-Art top-down game like Zelda (for hobby not for work).
    I'm going to try the 2D GD Paint asset for sure, maybe it is exactly what I'm looking for.

    Thanks 😉

      Esarca Unfortunately the 2D GD Paint library does not fit what I need, basically the eraser is a "fake" erase, they just draw a line using the background color instead of the one selected by the user.
      My scenario is:

      • two layers
        • one background image
        • one foreground image that completely cover the background one
          Using the finger the player should be able to erase the foreground image in order to display the background one
          Thanks

      You could paint a black and white buffer and use it as an alpha mask of sort.

        Megalomaniak really thanks for your suggestion. Could you provide me more info or some references to the documentation about this approach?

        I'm not sure there's a tutorial per say for it in the docs(or anywhere really), but you can follow the link provided by DaveTheCoder for custom drawing to learn how to draw a line, given the end result is either a black on white or vice versa you can then grab a screen buffer copy (via viewport) and use that.

        There are ways to make godot draw a window without decorations(that is the window borders and titlebar) and you should be able to set the application clear color('BG color') to be essentially transparent. So idea would be you'd have a full rect anchored Color- or TextureRect(a fully screen filling rectangle) acting as your fake application background color you could then 'erase' by painting it's alpha value.

        All of this however applies to desktop environments, I have no idea about mobile that is android and iOS. They run everything fullscreen so a very different ballgame. I can clearly see the borderless window settings hint say it doesn't apply to mobile platforms.

        If there are any mobile apps doing something like this, I expect they fake it by asking the OS to take a screenshot of home screen and perhaps polling the host system for the setting value to find the clean image that is applied as the BG image/wallpaper. Then using those.