View unanswered posts | View active topics It is currently Mon Jul 08, 2024 3:04 pm



Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
 Terraria Style Water. 
Author Message
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post Re: Terraria Style Water.
Sims_Doc wrote:
Ah, Thank you Geti. for giving me the infomation need to kill any intressed in this topic. Dynamic Water in Cortex Command Not Possible.


As has been stressed about 9001 times before.


Sun May 29, 2011 8:42 am
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Terraria Style Water.
Sims_Doc wrote:
for giving me the infomation need to kill any intressed in this topic.


You don't have to kill your interest, you just have to start thinking outside the box, and maybe put a little more effort into what you're posting :) As a forum we did a lot of work trying to get water working but unless it's a static solution (read - no flow) we haven't found a way to get around the issue of slow script execution leading to horrible horrible lag.

Fluid simulation is a bad algorithm when executed in series as it has O(n^2) complexity in its simplest form (each water particle comparing itself to every other water particle). Threaded lua execution would fix that but we all know that isn't going to happen (especially as then you'd have to deal with it asynchronously - removing water particles could easily cause horrible crashes).

Long story short it's an interesting problem, and if you can find a way to logically cut down on the number of comparisons needed then you might be on the road to finding a solution but it's very likely to be very complicated :)

In fact, here's a potential cut to the massive lag problem - it essentially scales the lag by some arbitrary constant by locating water particles within a certain area. There's overhead because then each particle has to find their location in terms of the water array to put themselves into the right "slot", but that should cut down on the cost. I think Lord Tim was looking into using quadtrees for something like this but never did it - I think the paged solution is better because it allows control over the "resolution" of the solution - which lets the modder choose what they want in terms of accuracy.

The funny thing here is that more accuracy (-> larger boxes) means less tables, and less accuracy means more tables, so there's a point where having less accuracy actually means having more lag (or at least larger memory cost).

Anyway - here's the image:
Attachment:
File comment: Quick mockup with some scribbly terrain
Water.jpg
Water.jpg [ 107.13 KiB | Viewed 1083 times ]


My aim isn't to kill creativity here, Sims_Doc - it's just that you need to know what you're doing before you can make realistic suggestions. You might want to start smaller (say, getting a good explosion emission system going, with a primary explosion, maybe some secondary clusters and debris with smoke trails) and put more effort into your thinking - making sure you've thought long and hard about whether what you're suggesting is plausible and maybe making some attempts at implementation yourself - rather than just typing whatever and hitting post. If you want to be creative, you have to put some work in :)


Sun May 29, 2011 9:47 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 17 posts ]  Go to page Previous  1, 2

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.033s | 15 Queries | GZIP : Off ]