Godot Version
Godot 4.4
What I am building
I am building a pipes game where water begins flowing through a pipe tile and the player gets to add new pipe tiles to expand the room the water has to flow. If the water spills out of the pipe the game is over.
Question
What are my options for animating the water through the pipe?
I am working with a sprite sheet (thanks to Kenney.nl) that has many different shapes of pipes. Each type of pipe has both an empty and a full representation of this pipe. A few ideas that I had but not sure what else is possible:
- Use an animation player to animate the water from the “full” pipe sprite over the top of the “empty” pipe sprite. - This works for the straight pipe but not for the curved ones.
- Use a Polygone2D shape over the “full” pipe sprite to mask a section of the pipe then somehow animate this along the path the water should flow.
- Create a Path2D over each sprite and create a different type of water sprite to follow this path. -This may have issues with some of the pipes that have two or more paths.
- Use an image editor outside of Godor to create multiple versions of the “full” pipe where the water progresses from empty to full in each version. Then Animate these like a normal sprite sheet