Joined: Tue Nov 17, 2009 7:38 pm Posts: 909 Location: France
Dynamic water [V6: optimization/pressure]
Hi,
This small mod is designed to add low lag dynamic water to the game, it is still buggy and slow but it works, to add water in a game use the TDExplosive called Molotow Cocktail.
There are two versions, with 12 and 24 px water particles, if you have a slow computer use the 24 version, otherwise use the 12:
File comment: Less laggy, less realistic WaterV4-24.rar [5.48 KiB]
Downloaded 320 times
Here is a video of an old version of this:
Last edited by Mehman on Fri Jan 13, 2012 4:42 pm, edited 2 times in total.
Tue Jan 03, 2012 11:25 pm
weegee
DRL Developer
Joined: Thu Jun 11, 2009 2:34 pm Posts: 966 Location: Moscow, Russia
Re: Dynamic water
Spectacular. Even flooded brain cave when I dug through reservoir
Tue Jan 03, 2012 11:37 pm
Miggles
Data Realms Elite
Joined: Mon Jul 12, 2010 5:39 am Posts: 4558
Re: Dynamic water
Mehman I honestly want to know why you don't work for Data Realms yet. Amazing. Just amazing.
Wed Jan 04, 2012 2:11 am
The Fat Sand Rat
Joined: Sun Apr 15, 2007 5:56 am Posts: 1191 Location: outside the shithole called the University in the Forest
Re: Dynamic water
Intriguing. I assume you've already tried using smaller blocks and found them lagtastic?
Wed Jan 04, 2012 5:08 am
Mehman
Joined: Tue Nov 17, 2009 7:38 pm Posts: 909 Location: France
Re: Dynamic water
weegee wrote:
Spectacular. Even flooded brain cave when I dug through reservoir
Thanks
Miggles wrote:
Mehman I honestly want to know why you don't work for Data Realms yet. Amazing. Just amazing.
Because they didn't ask me to, and thanks.
The Fat Sand Rat wrote:
Intriguing. I assume you've already tried using smaller blocks and found them lagtastic?
Indeed.
Thu Jan 05, 2012 12:44 am
ryry1237
Joined: Sun Dec 25, 2011 7:23 am Posts: 269
Re: Dynamic water
Have you ever tried using round or triangular sprites for your water?
Or maybe roundish triangular sprites?
edit: also, what exactly does changing the mass of an object to negative do to said object?
(yea I know this isn't the mod making forum, but I'd just like to ask an experienced person)
Last edited by ryry1237 on Thu Jan 05, 2012 1:59 am, edited 3 times in total.
Thu Jan 05, 2012 1:52 am
Miggles
Data Realms Elite
Joined: Mon Jul 12, 2010 5:39 am Posts: 4558
Re: Dynamic water
Considering that the water doesn't overlap (at least I don't think so..), that would cause it to look really weird.
Thu Jan 05, 2012 1:54 am
Shakatuko
Joined: Mon Oct 10, 2011 12:50 am Posts: 75 Location: Look behind you... Haha I tricked you, I am in Brazil.
Re: Dynamic water
You can't make it become particles instead of glows? Because glows are the most laggy thingies in my CC. It doesn't matter how many particles, but glows ruin my game. It doesn't matter how many "lag updates" you make, it always stay laggy.
Thu Jan 05, 2012 12:54 pm
ModTester
Joined: Sun Nov 13, 2011 11:26 pm Posts: 11
Re: Dynamic water
Really good mod, just one small question: after the water has spawned is there any way of removing it?
Thu Jan 05, 2012 7:03 pm
carriontrooper
Joined: Mon Apr 13, 2009 12:27 pm Posts: 813 Location: Yogyakarta, Indonesia. A slice o' paradise.
Re: Dynamic water
Shakatuko wrote:
You can't make it become particles instead of glows? Because glows are the most laggy thingies in my CC. It doesn't matter how many particles, but glows ruin my game. It doesn't matter how many "lag updates" you make, it always stay laggy.
Well, problem is, particles won't have transparency, and could sometimes stick to terrain (just look at rocket smokes/explosions, sometimes it stays on the terrain and can't be removed). It's probably because of the terrain-sticking that Mehman chose glows instead of particles or mosrots.
You could just replace the glows with a 1x1 one if you want, it'll probably reduce lag but won't be as visible. Alternatively, make the glow image smaller or something.
Fri Jan 06, 2012 4:22 pm
whitty
Joined: Sat Jun 16, 2007 2:31 am Posts: 2982 Location: Texas
Re: Dynamic water
Shakatuko wrote:
Because glows are the most laggy thingies in [my] CC
NO THEY ARENT
Shakatuko wrote:
It doesn't matter how many particles, but glows ruin my game.
NO IT DOESNT
Shakatuko wrote:
It doesn't matter how many "lag updates" you make, it always stay laggy.
FALSE
Sincrerely, Whitty, King of Glows.
Anyways, Nice mod OP.
Sat Jan 07, 2012 7:02 am
Mackerel
Joined: Thu May 05, 2011 1:30 am Posts: 2876 Location: Rent free in your head. Vacation in your ass.
Re: Dynamic water
Quote:
Sincrerely, Whitty, King of Glows.
I'll vouch for you on that.
Sat Jan 07, 2012 5:29 pm
Shakatuko
Joined: Mon Oct 10, 2011 12:50 am Posts: 75 Location: Look behind you... Haha I tricked you, I am in Brazil.
Re: Dynamic water
whitty wrote:
Shakatuko wrote:
Because glows are the most laggy thingies in [my] CC
NO THEY ARENT
Shakatuko wrote:
It doesn't matter how many particles, but glows ruin my game.
NO IT DOESNT
Shakatuko wrote:
It doesn't matter how many "lag updates" you make, it always stay laggy.
FALSE
Sincrerely, Whitty, King of Glows.
Anyways, Nice mod OP.
I'm talking about MY computer. Not YOUR computer. I'am a poor guy with a poor family, When we get money we just pay bills, we don't just go and buy a new computer so then my CC can run this mod. Dude, I really like your mods, but I didn't knew you were like that, insulting poor people. Well, if you tell me you are not insulting poor people, sorry, because to me, that was some insult.
Thu Jan 12, 2012 12:59 am
nicolasx
Joined: Sun Mar 13, 2011 6:17 pm Posts: 646
Re: Dynamic water
This isn't going to come across how I mean it, are you dumb? I mean have you ever played his mods? It's an inside joke with some of us who have actually played his mods... Play them please before you start making accusations.
If you still don't get it its because he likes to put glows in his mods... in the best modders forum he was voted most likely to be on drugs while modding.
Sorry for rant. Awesome mod mehman, although I hope to see some new support for new types of coding possibilities in the new builds, this is very nice until then
Thu Jan 12, 2012 2:51 am
xenoargh
Joined: Fri Dec 30, 2011 3:33 am Posts: 276
Re: Dynamic water
Took a look at this.
Seems like a really expensive way to do this. There's a lot of math being run each frame for this and it spawns a plethora of managers, when there should only be one, ever. Just making sure that only one manager ever exists should speed things up considerably.
But mainly I'm not sure that this is taking on the issues in an efficient way. Water in a 2D world is pretty simple stuff.
Each water pixel should just follow some simple rules:
If velocity < some threshold... If air below, move down a pixel. If air beside, small chance to move sideways. If air beside and water beside, strong chance to move in direction away from water.
Else do nothing, let the physics engine handle the behavior, because somebody just shot it or is swimming or whatever.
Doing stuff like waves would get really complex, of course, and so would any complex attempts to model fluid dynamics, but none of that is necessary for a reasonable sense of basic water.
Should pretty much cover it, really; actors can then displace it, if the mass per pixel is kept really low, shots can displace it, and a lot of the math goes away. If it's vaporized, it should just respawn; if it leaves the map edge, then it's permanently lost.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum