Author |
Message |
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Why Water Wont Work
Courtesy of whitty, note the MSPF readingFeel free to bump lifetimes in the devices index for beefy computers, but seriously, unless its implemented into the engine in something faster than CC's Lua, water will never happen and you will have to face that. the entire script below: Code: function Create(self) self.LagTimer = Timer() self.name = math.random(20000)..math.random() if not water then --if theres not a water table water = {} --make one table.insert(water, self) else --otherwise table.insert(water, self) --put ourselves in it end end
function Update(self) if self.LagTimer:IsPastSimMS(math.random(50,150)) then for k,v in pairs(water) do --do some comparisons based on the other water particles if v.name ~= self.name then --if not ourself local vect = (v.Pos - self.Pos) --local vect = SceneMan:ShortestDistance(self.Pos, v.Pos, true) --seems to be floored <_< grif was right if vect.Magnitude < 3 and vect.Magnitude > 0 then --and if theyre close, push yourself away self.Vel = self.Vel + (vect / -((vect.Magnitude + .2) ^ 2)) if math.floor(self.Pos.Y) == math.floor(v.Pos.Y) or math.floor(self.Pos.X) == math.floor(v.Pos.X) then self.Vel = self.Vel + Vector(math.random(-2,2), math.random(-2,2)) --this bit prevents horrible lineups end end end end self.LagTimer:Reset() end self.ToSettle = false end
function Destroy(self) for k,v in ipairs(water) do --when we vanish, remove ourselves from the water table to prevent stupid errors if v.name == self.name then table.remove(water, k) break --no more comparisons needed end end end Things that could be done Surface tension simulation (prevent the hilarity that is the random splashes for no reason in a body of water) Effects Optimisation - possibly a clumping system could be used, but hey, its a CC mod so anything logical will probably break it. Also the usual local r = math.random and such could save a few extra lookups, which could make the difference with giant tables. NOTES: The whole mod should have been in the index, but I'm used to setting up .rtes so theres a file link. Sorry for the extra .01 sec wait. The Name system is probably needless now, as I thought a bug was related to straight MO-MO comparison but was very likely just particles settling. Still, it works, though with the anti-/0 clause later on even not comparing against yourself is probably unnecessary. The whole thing is lazy and halfassed. If something could be done better, and you do it, I may add it to the OP, but this is meant to be a proof of the lag issue more than anything rather than a test of skills. Attachment:
File comment: Dependencies on Coalition.rte and Base.rte NOTE: MOD IS SMALLER IN FILESIZE THAN THE SCREENSHOT.
water.rte.zip [2.41 KiB]
Downloaded 590 times
Now, Someone put some pretty MOSP effects on the collisions and bubbles under GetAltitude conditions and hey some actor gravity damping and really get it lagging like a ♥♥♥♥♥, hahah. Oh wait, no we shouldn't, we should make mods that are actually fun. This mod took time out of '10 and sleeping to prove a point I don't even care about. ♥♥♥♥.
Last edited by Geti on Sat Mar 06, 2010 10:53 pm, edited 1 time in total.
|
Fri Mar 05, 2010 12:43 pm |
|
|
Dauss
A HUMAN BRAIN, SAFELY INSULATED FROM THE TERRORS OF HYPERSPACE
Joined: Sun Jan 28, 2007 8:54 pm Posts: 1070 Location: Somewhere beyond the endless sea of hyperspace, fighting for your right to call a planet home.
|
Re: Why Water Wont Work
Personally I think this should go in mod making as it's more like a 'mod theory' or something then an actual game mod. Want me to move it or leave it be? I'm good either way.
|
Fri Mar 05, 2010 1:49 pm |
|
|
LowestFormOfWit
Joined: Mon Oct 06, 2008 2:04 am Posts: 1559
|
Re: Why Water Wont Work
Dang Geti. Rikimaru must have gotten a rise out of your or something to merit you doing all this to prove a point.
|
Fri Mar 05, 2010 1:54 pm |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
Re: Why Water Wont Work
Or just boredom/procrastination.
|
Fri Mar 05, 2010 2:15 pm |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: Why Water Wont Work
Well if you need/desire it moved let me or another mod know.
|
Fri Mar 05, 2010 2:56 pm |
|
|
Miles_T3hR4t
Joined: Mon Jun 04, 2007 5:55 am Posts: 1627 Location: Ohio
|
Re: Why Water Wont Work
Geti wrote: Well if you need/desire it moved let me or another mod know. um... My computer is crap but I wanna really see this in action, could you kindly do me a favor. your good enough with lua, it should be no problem, its just a matter of the time it takes to do it. settings.ini, mess with the delta time enough that you can use this without loosing frames or speed (beyond the delta time fiddling). make a short lua script that takes screencaps at regular intervals (if possible, otherwise it'd have to be manual or something) and make some good gifs of this things function. and yes, for comparison, include your delta time fiddling to show just how much it would lag. Yes, I'm doing this myself (not the gif part, but the delta time fiddling with it) but I really do have a crap machine, its 512mb ram, and my system reads it as 510, which can't be good, (missing 2mb wtf?) and honestly I'm afraid I'd somehow nuke my computer doing this.
|
Sat Mar 06, 2010 3:19 am |
|
|
TorrentHKU
Loose Canon
Joined: Sun Mar 29, 2009 11:07 pm Posts: 2992 Location: --------------->
|
Re: Why Water Wont Work
Miles_T3hR4t wrote: and honestly I'm afraid I'd somehow nuke my computer doing this. Nuclear Depth Charge.
|
Sat Mar 06, 2010 3:29 am |
|
|
rikimaru509
Joined: Sun Feb 07, 2010 10:33 am Posts: 96
|
Re: Why Water Wont Work
WOOT WOOT!!!!! I finally got someone to actually atleast try to prove me wrong!!! Thank you geti!!! All this time ive been trying to get someone to atleast give it a try. And you did it! God im impressed with geti. All this time everyone was just arguing with me but you actually showed proof of how it wont work. I wish i could hug you! Im so happy at your acheivement of proving me wrong(unlike the other people who posted on that thread.)
|
Sat Mar 06, 2010 4:37 am |
|
|
dragonxp
Joined: Wed Sep 09, 2009 3:16 am Posts: 3032 Location: Somewhere in the universe
|
Re: Why Water Wont Work
rikimaru509 wrote: WOOT WOOT!!!!! I finally got someone to actually, at the least, try to prove me wrong!!! Thank you geti!!! All this time I've been trying to get someone to atleast give it a try. A and you did it! God I'm impressed with geti. All this time everyone was just arguing with me, but you actually showed proof of how it won't work. I wish I could hug you! I'm so happy at your acheivement of proving me wrong(unlike the other people who posted on that thread.) Atleast = At Least im = I'm ive = I've Edit: Unnecessary amount of work Geti just exhibited just to prove a point the whole community already knew.
|
Sat Mar 06, 2010 6:49 am |
|
|
rikimaru509
Joined: Sun Feb 07, 2010 10:33 am Posts: 96
|
Re: Why Water Wont Work
Shut up and i dont care about it
|
Sat Mar 06, 2010 7:03 am |
|
|
dragonxp
Joined: Wed Sep 09, 2009 3:16 am Posts: 3032 Location: Somewhere in the universe
|
Re: Why Water Wont Work
So, you don't care that Geti went through all this work to prove a point that everyone told you was already proven. My, when will you learn.
[P.s many others, including me, have learned the fall down hard way.]
|
Sat Mar 06, 2010 7:17 am |
|
|
Foa
Data Realms Elite
Joined: Wed Sep 05, 2007 4:14 am Posts: 3966 Location: Canadida
|
Re: Why Water Wont Work
rikimaru509 wrote: Shut up and i dont care about it He actually has a point, they disproved it like three times before this needless turd burger was made. Geez, your skull is freaking thick, but you FINALLY get it, now don't say anything about water, again, ever.
|
Sat Mar 06, 2010 7:51 am |
|
|
rikimaru509
Joined: Sun Feb 07, 2010 10:33 am Posts: 96
|
Re: Why Water Wont Work
Water is awesome. It should be made into aa mod. Hows that for not mentioning it.
|
Sat Mar 06, 2010 8:11 am |
|
|
whitty
Joined: Sat Jun 16, 2007 2:31 am Posts: 2982 Location: Texas
|
Re: Why Water Wont Work
Oh God, really, why do you even post?
|
Sat Mar 06, 2010 8:13 am |
|
|
rikimaru509
Joined: Sun Feb 07, 2010 10:33 am Posts: 96
|
Re: Why Water Wont Work
Cause i think its freakin hilariuos to say its possible. I dont see why you even try to argue with me when i give small hints towards a funny joke. Im just kiddng with yall and i know that its not possible.
|
Sat Mar 06, 2010 8:16 am |
|
|
|
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
|
|