+1 vote

I've been tinkering for 2 weeks with this, hoping someone might chime in with some ideas.
I have a Node called water.... it's currently an Area2D with rectangle collision and a 32x32 sprite. The game is top down like Rimworld.

I am trying to do some procedural generation of maps. I can flood the map with water, and have given the water a bit of behavior to flow around a bit, gather and come to a stop.
So far so good. The area2D knows it was entered (by other water at this point) and the flow slows down until it stop.

I'm having trouble 'settling' it or reorganizing it after it generates and flows together - where is ends up all bunched together. Once it's stopped moving, what I would like is for it to snap to the nearest 32x32 point.

I don't have a tilemap in play at all, but in hindsight, I think maybe I should have used one, and done the procedural generation there instead of just free flowing nodes.

Can anyone give me some advice on this? Is there a way without a tile map to tell the Area2D 'water' not to touch each other and to snap to the nearest 32x32 position?

enter image description here

in Engine by (133 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.