Jump to content
  • Advertisement
Alexander Nazarov

Unity How to create water flowing throw pipes in Unity?

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!