0 Members and 1 Guest are viewing this topic.
So i was just fooling around the other day and i made this little fun fluid simulator It uses some very basic rules but it ended looking quite realistic (for a calculator that is) and it runs quite fast up to about 200 pixels of water Sometimes it acts weird though, so it might be considered more of a sand simulator than a water simulator.
Heh that might be possible, although it would use a different engine. What i have here is more of a fluid simulation, where as waterworks is more like a pinball simulation. That and the lack of mouse control might make it a bit weird. But it would be soooo coool ^^
:.B:[F09090F0000000000060600000000000→Pic1::20→X→Y::For(A,0,399:0→{L1+A:End:Pt-On(X,Y,Pic1:Repeat getKey(15):Pt-Change(X,Y,Pic1:.For(Z,0,1:X+getKey(3)-getKey(2)→X:Y+getKey(1)-getKey(4)→Y:.End:If getKey(48):Pt-On(X,Y,Pic1+8:End:If getKey(55):Pt-On(X,Y,Pic1+8:Pt-Change(X,Y,Pic1+8:End:If getKey(54):0→A:While (A<300) and ({L1+A+1}≠0):A+2→A:End:If A<301:X+1→{L1+A}:Y+4→{L1+A+1}:End:End:::For(A,1,299:If {L1+A}:!If pxl-Test({L1+A-1},{L1+A}+1::{L1+A}+1→{L1+A}:Else:rand^2*2-1→B:!If pxl-Test({L1+A-1}+B,{L1+A}:{L1+A-1}+B→{L1+A-1}:Else:!If pxl-Test({L1+A-1}-B,{L1+A}:{L1+A-1}-B→{L1+A-1}:Else:.IT HASN'T MOVED:{L1+A}-2→{L1+A:::End:End:End:If {L1+A}>60:0→{L1+A}→{L1+A-1}:Else:Pxl-On({L1+A-1},{L1+A}:End::A+1→A:End:End:Pt-Change(X,Y,Pic1:DispGraph:For(A,0,298:If {L1+A+1}>60:0→{L1+A+1}:End:If {L1+A+1}:Pxl-Off({L1+A},{L1+A+1}:End:A+1→A:End:DispGraph::End