⏩ Making Liquids Spread FASTER

/wave Hello!

I’ve been playing around with liquids recently and I came up with a way to make liquids spread MUCH much faster.

I did a 100 block spread test with petrol and I made it able to spread 266% faster! (55 seconds down to 15 seconds)

Check out my video on the “Liquid Accelerator” ← Coolest name I could think of :joy:

20 Likes

is it reliable? same time always ?

2 Likes

Awesome! Love your videos @Ovis :grin:

2 Likes

sometime always works

2 Likes

70% of the time, It works every time!

/

7 Likes

@Apt Yup, at least according to my numerous tests :slight_smile: For example, water will spread the full 8 blocks (accelerated) by the time a normal stream of water will spread 3. However, when the liquid passes to the air block, before falling down a block, its not accelerated, so the equation isnt as simple as 8:3

@Spoodle Thanks dude, appreciate it:smile:

3 Likes

That’s interesting. Nice find. :+1::+1:.

1 Like

Guessing its a side-effect of making liquids have consistent flows…

minecraft has a behaviour with liquids where the final flow is dependent on the order that you make things happen in… like you can get water to fall in a particular direction, but changing the world around it then makes it flow in another direction " as well " even though if you remove the source and put it back, it would then only flow in a single direction again (as though the liquids have a “memory” (they dont, its just that it doesnt update them fully consistently), you can get the opposite to happen as well in minecraft where liquids dont flow in directions they would if you replaced the source again)…

but I put a lot of effort in to ensure the liquids always flow to the same final result no matter the order that changes to the world occur in, as otherwise regeneration would end up being able to produce infinite cycles of liquid flowing, then regenerating away, then flowing again etc.

part of that, is that liquids can adjust their flow based on the liquids flowing into that space, rather than only a liquid flowing “out of a space” causing changes (so in the minecraft example; in boundless the “magic” flow would adjust itself to dissapear based on the parent bit of water adjusting its behaviour). In this case in your video, I believe its what is allowing it to flow faster, as the existing lower-height bits of liquid would adjust themselves based on the new higher liquid up-stream before the new higher liquid even gets a chance to flow into them which wont happen without the existing liquid being there.

It could probably be fixed to prevent this… but I don’t see that we’d make any changes unless the behaviour becomes widely abused and starts causing performance problems (I doubt it would cause problems in practice)

12 Likes

@georgegroeg Cheers dude :+1: :+1:

@lucadeltodecso Ooh thats super interesting, good to hear it won’t be fixed unless it results in problems :ok_hand: I do love the way liquids are ‘smart’, I remember having a lot of trouble in minecraft with water not updating where I’d want it (but of course a lot of fun abusing that mechanic) Cheers for the explanation, I always appreciate it when you open the curtain on the technical stuff :smile:

4 Likes

@Ovis,

Great find thanks for the info!

…but then again, no thanks because now I have to update my rice farm…lol!

1 Like

Haha sorry and thank you :laughing:

Wow that’s a beast, how long does it take for all the water to spread?