View unanswered posts | View active topics It is currently Wed May 15, 2024 7:02 am



Reply to topic  [ 36 posts ]  Go to page 1, 2, 3  Next
 Dynamic water [V6: optimization/pressure] 
Author Message
User avatar

Joined: Tue Nov 17, 2009 7:38 pm
Posts: 909
Location: France
Reply with quote
 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:

Attachment:
File comment: Laggy, sorta realistic
WaterV6-12.rar [5.94 KiB]
Downloaded 920 times

Attachment:
File comment: Less laggy, less realistic
WaterV6-24.rar [5.95 KiB]
Downloaded 751 times


Old:


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
Profile
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post Re: Dynamic water
Spectacular. Even flooded brain cave when I dug through reservoir :)


Tue Jan 03, 2012 11:37 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Mon Jul 12, 2010 5:39 am
Posts: 4557
Reply with quote
Post 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
Profile WWW
User avatar

Joined: Sun Apr 15, 2007 5:56 am
Posts: 1191
Location: outside the shithole called the University in the Forest
Reply with quote
Post Re: Dynamic water
Intriguing. I assume you've already tried using smaller blocks and found them lagtastic?


Wed Jan 04, 2012 5:08 am
Profile
User avatar

Joined: Tue Nov 17, 2009 7:38 pm
Posts: 909
Location: France
Reply with quote
Post 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
Profile
User avatar

Joined: Sun Dec 25, 2011 7:23 am
Posts: 269
Reply with quote
Post 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
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Mon Jul 12, 2010 5:39 am
Posts: 4557
Reply with quote
Post 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
Profile WWW
User avatar

Joined: Mon Oct 10, 2011 12:50 am
Posts: 75
Location: Look behind you... Haha I tricked you, I am in Brazil.
Reply with quote
Post 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
Profile

Joined: Sun Nov 13, 2011 11:26 pm
Posts: 11
Reply with quote
 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
Profile
User avatar

Joined: Mon Apr 13, 2009 12:27 pm
Posts: 813
Location: Yogyakarta, Indonesia. A slice o' paradise.
Reply with quote
Post 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
Profile YIM WWW
User avatar

Joined: Sat Jun 16, 2007 2:31 am
Posts: 2982
Location: Texas
Reply with quote
Post 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
Profile
User avatar

Joined: Thu May 05, 2011 1:30 am
Posts: 2875
Location: Rent free in your head. Vacation in your ass.
Reply with quote
Post Re: Dynamic water
Quote:
Sincrerely,
Whitty, King of Glows.


I'll vouch for you on that.


Sat Jan 07, 2012 5:29 pm
Profile WWW
User avatar

Joined: Mon Oct 10, 2011 12:50 am
Posts: 75
Location: Look behind you... Haha I tricked you, I am in Brazil.
Reply with quote
Post 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
Profile
User avatar

Joined: Sun Mar 13, 2011 6:17 pm
Posts: 646
Reply with quote
Post 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.



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
Profile

Joined: Fri Dec 30, 2011 3:33 am
Posts: 276
Reply with quote
Post 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.


Thu Jan 12, 2012 6:52 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 36 posts ]  Go to page 1, 2, 3  Next

Who is online

Users browsing this forum: No registered users


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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.052s | 18 Queries | GZIP : Off ]