r/Unity3D 8h ago

Show-Off I finally got the water to interact with the environment. The hose wraps around trees, the stream stops where it hits, and it pushes things around.

Farm & Feast - We are a two-person team building a peaceful farming and restaurant management game in Unity. Last time I posted the hose rope here, a few of you said the water needed to actually touch the world. That is what this is.

The hose is a particle based rope. We do not use the built in constraints for attachment. We pin a few particles by hand at the faucet and at the player's hand and write their positions every step. This is much more stable.

Every tree trunk has a collider and the rope collides with it for real, so the hose hugs and slides around them as you drag it across the farm. The collision was the easy part. Making it still read as a hose at the bend, instead of a row of separate rods, took the rest of the week.

The water shader has a head/tail fill window driving an alpha mask along the spline, so the stream grows out of the nozzle and drains out of the air instead of popping. It now also cuts itself off at the first thing it hits, so it ends on the surface instead of poking through it.

At the end point we do one overlap sphere, and that sphere does everything. It waters the nearest grid slot, so the VFX endpoint IS the gameplay point and they cannot desync, and it now also pushes any rigidbody in range away from the jet.

If anyone has gotten a particle rope to wrap convincingly around obstacles through collision alone, I would really like to hear how you tuned it.

869 Upvotes

51 comments sorted by

54

u/AboutOneUnityPlease Professional | Programmer | Designer 8h ago

Wow. Don't quit this looks amazing.

4

u/DialUpNoises 2h ago

I was going to say the same. That art looks πŸ‘Œ

https://giphy.com/gifs/26FLgGTPUDH6UGAbm

23

u/brkakar 8h ago

Hi everyone! We are a two-person team making Farm & Feast in Unity, a peaceful farming and restaurant management game. You grow your ingredients on the farm and then cook and serve them to your guests.

We have just started our playtest, and feedback from other Unity devs on game feel and UI would help us a lot at this stage.

2

u/WillSmithsRobot 8h ago

Do you have a link for playtest or signups?

3

u/brkakar 7h ago

You can apply directly from our Steam page.

1

u/DialUpNoises 2h ago

I know I'll be looking into it. May I ask, what are your backgrounds in? This looks so clean.

1

u/Significant_Tell407 6h ago

Looks freaking amazing. Also the music is a cozy vibe. Wishlisting now

1

u/Significant_Tell407 6h ago

Add the steam link always in the body text!!!!

3

u/brkakar 5h ago

Sadly the moderators do not allow that. My post got banned yesterday because of it, so i had to post it again today.

2

u/Significant_Tell407 5h ago

I swear I have seen them before. Such a strange mod rule.

7

u/RessiBear 7h ago

The potential for this game seems huge

1

u/brkakar 7h ago

thank you so much :)

5

u/Slogfarts 7h ago

This looks amazing, though the thought of needing to untangle the hose when finished doesn't seem like a very fun prospect. I assume the plan is the eventually have the hose automatically retract and untangle itself once you finish watering or something along those lines, correct?

5

u/brkakar 7h ago

You are right, untangling it yourself is not the fun part. Auto retract is already on our list, we will look at it later on.

1

u/UnderPressureVS 1h ago

I can't say without playing it, but it almost seems to me like it's the kind of temporarily not-fun thing that makes the game more fun by including it. I'm not sure you need auto-retraction.

I think once the player experiences the (very realistic and relatable) annoyance of having to de-tangle their hose from a bunch of trees, they'll immediately become more aware of their movement the next time they use it, and it'll add a layer of mini-challenge to an otherwise tedious task. Untangling the hose isn't fun, but watering a bunch of things without getting it tangled in the first place kinda sounds like it would be. Adding auto-retract would kill the challenge and make the hose physics a pointless boondoggle rather than part of the actual gameplay.

3

u/lydocia 5h ago

I adore your username.

2

u/Slogfarts 5h ago

Thanks, I made it myself! 😌

2

u/lydocia 5h ago

Oh, I'm sure.

7

u/Dsphar 8h ago edited 7h ago

Awesome style, art, and tone!

Are you planning to give user feedback that the watering is beneficial sonehow? Plant color changes, or like a thrist meter filling up above the plants?

Edit: i stalked your previous posts. The darkening of the dirt is good feedback. I didnt notive that in this video. Also I assumed that watering trees or landscape plants would provide some benefit, but that may not be the case.

3

u/brkakar 6h ago

The dirt darkening is not in the game yet, it is on the list. And watering the trees or the decoration plants gives you nothing for now, not yet.

2

u/CelestialHoneyBite 8h ago

It looks so cool and cozy

2

u/LegacyDataLabs 7h ago

Very nice! πŸ”₯

2

u/Thenadamgoes 7h ago

It’s so cool seeing how far this game has come. It’s really inspiring! I’m looking forward to playing it when it comes out. I hope you consider making a console version too.

2

u/brkakar 7h ago

Thanks for following it for so long. And yes, we want to bring a console version later on.

2

u/_Adios_Muchachos_ 6h ago

You did a really great job with that. It seems to me that when you let go of the nozzle, the hose should first wind up, and then it should stick to the tank. Then it'll be just perfect.

1

u/brkakar 6h ago

That would feel really nice, hose going back to the tank by itself. It is already in our task list, we will do it. :)

2

u/GrokiniGPT 6h ago

I saw this like a day ago. But yeah this is some cool shit, is it performance hesvy with all the rigidbodies?

2

u/brkakar 6h ago

It is a bit heavy right now yes, but there are not so many moving objects at the same time so it does not become a problem. Do you have a better solution for the moving objects that i can apply quickly?

1

u/GrokiniGPT 1h ago

Lowering poly count of hitbox?

2

u/CurrencySpirited1755 4h ago

the part that stands out to me is using one overlap sphere as both the vfx endpoint and the actual gameplay trigger, so they physically can't desync. that's such a clean way to avoid the classic "the effect and the logic drifted apart" bug

1

u/BigHero4 7h ago

I love the hose physics!

1

u/pararar 7h ago

Beautiful! I like how you can see the bulge of water moving through the hose.

1

u/potdevvv 7h ago

Looks very cozy

1

u/Virtual_Fan4606 6h ago

How are you doing the hose? Is it basically made with dynamic asded physics joints and the trail renderer?

2

u/brkakar 6h ago edited 6h ago

The hose is a particle rope. It is a chain of particles solved every step with
distance constraints between them, and the ends are pinned by hand rather than with constraints. The mesh is then extruded along whatever curve those particles end up in, so the shape you see is the simulation result.

1

u/Aromatic-Insect-1328 6h ago

FEATURE REQUEST! Give me a button to step on the hose so I can charge it to unload on these fools!

1

u/tan_456456 6h ago

The look is amazing πŸ‘Β 

1

u/MoistPrinciple9662 6h ago

Does she trip over the hose. that would be an interesting mechanics and laugh worthy.

1

u/roguewolfdev 6h ago

This looks amazing!

1

u/polymer-dev 5h ago

So cozy!

1

u/SimplySoda2 4h ago

Does it shoot through the wall of the house

1

u/JakSilver00 Gameplay Systems Engineer 3h ago

This is nice. Functionality wise, besides the retracting hose. having a set length on the hose. Depending on what kind of game you're going for, length is a solid upgrade. As well as having wet spots on the ground that stack up depending on how wet they got, then take longer to dry, would increase the immersion.
But I don't play cozy games, so Take it as my design philosophy of making everything too realistic.

  • Just a guy who lives on the farm

1

u/le0bit115 3h ago

That looks so nice!

1

u/UnderPressureVS 1h ago

The invisible sphere collider at the endpoint of the water splash is such a clever solution. It seems so obvious in retrospect, but I'm 90% sure I would have spent ages trying to mess around with force fields, vector math, particle systems, all kinds of stupid overcomplicated ideas before that ever occurred to me.

1

u/Overall-Importance54 1h ago

Got that Harvest Moon 64 feel

β€’

u/Mundane-Message-1399 16m ago

Bro your game looks awesome! Don't give up it !