Hello, “plungers”!
Today's devlog will be hosted by me - one of the "lads" working on Plumber Simulator - because we're going to dive into the design side of the game. And what better topic to start with than the one thing no plumber could ever work without? That's right - water. More specifically, we'll take a look at how we designed our water system to account for all the different plumbing setups that you, the players, will be able to create.
Before we begin, let's quickly go over a few basic plumbing terms that will help explain how our system works (simplifying them for the purpose of the game):
Pressure – the force that drives water through the pipes
Flow Rate – the amount of water passing through a pipe per unit of time
Volume – the amount of water that can be contained inside a pipe
Resistance – how much pressure is lost as water travels through the pipes
These four concepts form the foundation of our simulation.
Our first goal was to answer one important question: how should the way you build your pipe network affect water flow? We wanted the system to behave as realistically as possible while avoiding complex calculations that would make your PC work harder than your plumber.
So, how did we design our water system? The biggest trick is that our water doesn't actually flow through the pipes physically. Well, each pipe fitting and pipe triggers the corresponding water VFX only at the points where water flows out. Thanks to this trick, we avoid complex, difficult calculations without sacrificing realism.
To clearly communicate changes in flow, we designed the water effects so that stronger flow produces a more powerful stream. Our goal was to make these transitions feel both realistic and responsive to every change in the plumbing system.

So what actually affects the flow? Our simulation currently takes several factors into account:
Pipe length and diameter – the longer and narrower the pipe, the more pressure is lost along the way. In pipes with the same flow rate water moves faster through a narrower pipe.
Fittings – every bend in the system introduces additional pressure loss.
Vertical movement – as it overcomes the difference in elevation, the water loses some of its available pressure.
Branches – the available flow is divided between active pipe branches.
Using all of these, our simulation calculates the final flow values and updates the water effects accordingly.
So what does that look like in practice?
Here we have a system where the pipes run upward but use only a few fittings. The result? A stronger flow on the water outlet.

Here, the pipes also run upward, but this time there are significantly more fittings. The result? A weaker flow.

Of course, it wouldn't be Plumber Simulator without... Leaks. After all, if nothing leaked, there wouldn't be much for a plumber to repair.
Our system also analyses a variety of situations that can result in leaks:
Disconnected pipes
Cut pipes
Loose pipe or fitting connections
Pipes that haven't been properly crimped
Various failures such as punctured pipes, corroded copper pipes, or damaged compression rings (we'll cover these in a future devlog)
For example, imagine a system where the crimp rings haven't been secured properly and two pipe sections aren't fully connected. In that case, you'd see a strong jet of water escaping from the open connections, along with smaller leak effects around the loose fittings.

You may also have noticed the shut-off valve in that GIF. It acts as the source of water - and therefore the source of flow - for the entire plumbing system. Before cutting into any pipes, you'll first need to locate such a valve and shut it off. Unless, of course, flooding the entire bathroom is part of your plan ;)
Finally, to make the plumbing system feel more alive during normal gameplay, we also implemented working faucets. Whenever you come across a sink, you'll be able to interact with the faucet, turn it on, and let the water flow. We wanted the motion of turning the faucet to feel as intuitive and as natural as possible.

But how is the faucet actually connected to the plumbing system? And how does it respond to changes in water flow? We'll save that for the next devlog. 😉
See you next time, plungers!
