2d Cleaning Game: Styles and techniques [Help]

Godot Version

4.4.1 Stable

Question

I ended up here because apparently I wasn’t able to find (or couldn’t find because i don’t know their existence) any relevant tutorials, docs that shows how to make a 2d cleaning game in Godot, not even styles or techniques.

For reference, i’m trying to recreate the cleaning minigame in a game called “Pou”.

I’d really appreciate it if someone could point me out techniques or styles to get started with it, even more with relevant docs in godot. Thank you.

Can you post a link to a video showing this in action?

sure, please take a look at this youtube short, the first seconds demonstrate what I am trying to achieve → Cleaning Pou

Looks quite simple. The “dirt” is just a bunch of randomly scattered sprites with corresponding collision areas. The sponge is such a sprite as well. When sponge collides with a dirt sprite, the dirt sprite fades away.

If you don’t know where to begin with implementing this, I’d recommend going through 2d game introductory tutorial in Godot’s official docs.

what it looks to me is that whenever the soap or sponge is “rubbed” onto the character, it calculates something , maybe like some sort of rub meter, like it does not care which part exactly the soap gets rubbed on, dirt overall disappears anyway if you keep “rubbing” within the same
area

Then that’s even simpler then. It just accumulates “cleanliness” whenever the mouse is moved and sponge kept in collision with the character.

so which nodes, would fit best in this criteria, im not confident after reading collision shape 2d or area 2d for this specific use, unless im not understanding something or completely missing a new node

Two areas should be fine.

Agree with the above. From the reference it looks like to me:

  • Dirt variable accumulates over time (assuming the dirt isn’t there when you open the game). At certain levels a dirt sprite it spawned onto the character.
  • When the soap collides with the character, it reduces the dirt variable, which removes the sprites and leaves soap sprites in its wake.
  • When the shower water collides with the character, it removes soap sprites.

Assuming you are a beginner, I would recommend focusing on just the dirt and the soap, the shower can come later. So it would boil down to:

  • Dirt variable builds up over time, leaving dirt sprites on the character.
  • When soap collides with the character, the dirt variable goes down, and the sprites disappear.

Breaking that logic down into tasks, you would need to know how to:

  • Connect variables to time. This can either be a system clock or a certain duration, such as dirt going up every 10 seconds, every 10 minutes, etc.
  • Dragging nodes and detecting collisions.

The best way to approach this issue I think is instead of thinking “how do I make this whole system?” is to think of it in steps. Eg, “How do I drag and drop sprites?” Then when you know all the steps, you can connect them together.

If this seems like a lot, scale down your project so you are only learning one thing at once. For example:

  • Learn how to drag and drop nodes.
  • Create a character and a soap node (I would use Area 2D myself for both since the character isn’t doing anything, they are just a zone to collide with). Learn how to get the console to say “true” or “false” whenever the soap sprite collides with the character.
  • Create a dirt variable. Have it start at a high number/full, and make it so when the soap collides with the character, it counts down/decreases.
  • Create a system with time which counts the dirt variable up, capping at the maximum value.
  • Add a condition where sprites get added at certain points as the dirt variable fills up.

That’s how my brain would approach the problem. Hope this is helpful :slight_smile:

3 Likes