Frostydown's water collision 2!
You have your tiles, 32x32 pixels. brown = ground, blue = water.
Just say the water that was placed on this block is 32 pixels.
Have this tile *shrink* it's tile height as it loses water so, we place down the water tile then we check lef, right, down, not up because we don't want to go up.
We could add a particle to show the direction it's moving, THEN the tile that gains 1 pixel extends 1 pixel and the original tile loses 1 so in this case because of the left and right spare space we lose 2 pixels.
It would recheck where a tile is and move down if it has no base!
You then get it moving off the edge if there was a left and right and bottom tile we would stop falling!
And this is how you do pixel 'flowing' water. I don't think there's a better idea other than some cosmetic stuff.
Also you don't have to redraw the tile, only at it's destination, run a particle system to deal with this.
Reminds me of Terrarias its water physics.
ReplyDelete