Coding realistic water physics into roblox…

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] right [Music] here you can see it yeah it kind of spills I can just that's so cool look at that oh no the the flood is [Music] here so I'm trying to make realistic water which uh includes like everything about it like it falls it spreads out and uh it kills people if it if it like they like drown and it so I already got started on it I have some code inside of this water Handler script so if I run this it should play what I have already like whoa see that was a little fast let me slow it down there's a bunch of configurations so I can make the the fall speed a little less quick I can slow down the spread a bit so let's do that let's run that uh okay yo I can't wait to deploy a several mile long block of water onto a city once it's done but uh there's still a few things left I have to work on like if it uh encounters a wall like this for example it cannot spread into it so if I play again if I uh if I play it again you'll you'll notice it has some Strange Behaviors yeah it shouldn't be able to do that it should push up against the wall instead of spreading through it so I still need to fix that but yeah I'm surprised I haven't seen something like this already the main behavior for it right here wasn't too hard to make it just uses Rays to see if there's a floor under it and if there is it will uh diffuse so I still got a long way to go though I need to add drowning and uh yeah just the behavior needs to be added to a bit so uh I'm going to go mess with some stuff and I'll be back soon all righty so there's some uh pretty cool changes so I added this GUI where you can uh modify how large you want the water so let's say I want it to be 50 studs above me so I'll put uh 50 now let's say I want it to be a really small drop of water right well we can do that just one one and one and uh we can place it and look um you're you're not supposed to see the Ray I should have made that invisible but you get the idea it's a it's a little drop but uh something really cool I added was water uh o obeys the laws of physics so it can't go through this anymore which as dumb as it sounds it's actually pretty cool for this game engine so if I make a Sixx 6x6 water block it will not pass into here see look it stopped itself but it did spread out that way so I'll use a bigger block for example there we go look it it won't go into the wall Isn't that cool it just spreads out into that direction so we're getting closer and closer to reality with this water and uh that means that uh it has to kill people if they're under it for too long so that'll that'll be really fun cuz I can just rain down these hold on let me turn this speed up so right now the water uh speed uh essentially that's the physics of it is at only two let's just uh let's just make that a little higher same with this fall speed you know let's just times that by 10 you know it's kind of boring right now so can I just flood the oh no oh no uh that's that's a little bit I can just that's so cool look at that that's actually so satisfying it just levels out what if I make tick speed like oh no oh okay it has a limit it won't just instantly cover the whole world but that that's still cool nonetheless well I'm going to go make it more realistic if you know what I mean so uh bye all right so there's this uh interesting physics realism tab I added which basically at the expense of your game in it makes the spilling mechanics more realistic so if I set it to 10 which is pretty high we can like deploy some water let's do it like right here you can see it yeah it kind of spills more realistically oh also it evaporates like that that's pretty cool this uh this makes me kind of curious uh of how much my computer can handle what if I just make like a really large um really realistic uh pool of water fall down oh no what um okay this is not behaving quite as I thought it would why is it green okay it it gets a little weird once you go high enough with that if you just want a big block of water and you don't want it to be that physically accurate you can just dump that with no lag but you you'll see it kind of doesn't act that realistic uh obviously you just set it to one so that is done now and that's pretty cool so on to the drowning Okay so there's drowning now but also other mechanics like uh if the water is too large and too fast it can uproot anchored parts and buildings like uh oh no oh no the the flood is here oh God I know it's kind of hard to tell but I did drown a bit you can see my health is a little lower it takes a while to fully drown but you can uh configure that of course you can set the drown rate right here too higher but yeah uh buildings don't really stand a chance to larger floods like oh no oh no the roads they they kind of act like tsunamis in a way they just push away uh any any parts that get in their way so bad things can happen to your town if you uh let the water run ramp it well uh you know the drill time to go into a real Lobby this is actually so cool whoa don't worry you can still Place smaller cubes of water without any consequence like look at that see it's fine don't start any uh crazy floods and the uh the buildings will be okay but yeah so let's go find some real players oh gosh we're in okay we got a fresh batch of uh innocent kids to uh dump water on so let's uh damn it they've already caught on okay well uh I I don't know exactly what this guy means by this but I'm want to I want to create like a wave so I'm thinking I do like this this and this so that just creates you know a little wave that dilutes out so are you guys ready to survive a tunami we're just going to drop this message I hope it doesn't alarm them too much but I just want to give them like a fair heads up you know oh um uh sorry Leila I'm sorry to hear that but unfortunately my daughter is nine please no it's okay Lila your daughter should be unaffected by this except for the massive amounts of building debris that will be flying around okay so let's see if this works so let's do like this and uh let's just let's just place this oh God the trees no the school oh it it went away uh uh I think I need to make the evaporation rate a little bit longer maybe let's uh let's just do that okay that that might make the water last a bit longer okay round two we got another fresh batch right here this time I'm not going to alert them about the about the unfortunate thing that's about to happen to them they're in the chat OMG hi can we have money you know what actually I will talk to them would you like a large amount of water let's see what they have to say yes okay uh no you you're not actually allowed to change your answer the tsunami is here oh no so uh the the first half of the town is uh struggling a bit but uh the H the houses are um not doing too well but I don't know maybe they'll live the water's spreading out slowly I think I set the tick rate to pretty small so it's going to take a bit the game is not doing so well these poor souls are drowning nearly instantly H this is quite the pickle uh we can only hope this town recovers from this oh thank goodness the water finally evaporated the the town isn't actually that damaged I think they'll rebuild uh he's actually completely ruined at the same I feel bad let's just let's just rain like a few drops just a little sprinkle of water you know just got to take it easy on these guys they they've been through a lot let's make a really realistic uh water okay that's actually cool look at that okay uh This Server might be Beyond saving I think I need to end it I uh I felt bad for uh ending this Man's family so I'm trying to financially compensate him right now he seems to be content with this well uh this was a very fun video I love reworking like core Roblox stuff like fire and water and stuff and uh testing it on people so I'm probably going to do more of that in the future and remember to subscribe because it's free and you're really cool if you do it and also join the Discord to be a test subject I guess okay bye
Info
Channel: Cone
Views: 246,393
Rating: undefined out of 5
Keywords:
Id: qfABeP4ghDE
Channel Id: undefined
Length: 8min 49sec (529 seconds)
Published: Thu Dec 28 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.