Filling and emptying a water tank

Hi, guys. I’d like to make a mini game where the player would have a water tank being filled with water and it has an outflow in which he controls it. He will be able of increase or decrease the amount of water coming out of the tank.
I looked for it yet and not found anything. If you, guys, give me a light, I’ll be thankful.

The way I would do it is to use a cube with the origin at the base and scale it up and down to fill the space of the tank. You could then add animated textures and shape keys to the water later on to make it more realistic or stylized.

Basic Demo (.blend)
Controls: Up & Down Arrows to raise and lower water

Also added a water stream that is only visible when the tank is being filled.

using shape keys is an option.

Do not think about liquids. No 3D engine supports that.

Think about how it looks like (surface). Then model this surface e and animate it as you want it to look like.

If it is a water tank think about what the viewer should see. You do not need to care what is not visible.

Regarding the amount of water, this is pure virtual e.g. it can be just a number in a property. Animate the water accordingly to this value.

I hope this gives you an idea.

Thank you, guys. You helped me a lot.