🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

How to create water flowing throw pipes in Unity?

Started by
2 comments, last by Kaetemi 4 years, 10 months ago

I want to create a game like Water Pipes (see below). As you can see, water flows through pipes. These games use frame-by-frame animation for passing water, which creates a huge number of different pictures and, accordingly, memory leaks.

How can I create the same game on Unity without frame-by-frame animation? What tricks can I use to do what I want?

 

Video of the game which I wanna write in Unity

 

 

185x145_1-148729.jpg

8.png

Advertisement
37 minutes ago, Alexander Nazarov said:

which creates a huge number of different pictures and, accordingly, memory leaks

Memory leaks don't just happen, and are not linked to the amount of images/files you have.

You can have a memory leak with 1 file, and you can have 0 memory leak with 10,000 files.

Hello to all my stalkers.

You just need 1 water bitmap for each tile with a gradient following the flow direction as alpha channel. Render with alpha test on the alpha channel, and animate the alpha test value depending on how much water you want in the pipe section.

Add some particle effects for decoration.

This topic is closed to new replies.

Advertisement