arcanine Posted May 10, 2015 Share Posted May 10, 2015 What's the best way to go about trying to make a liquid that drips and flows with gravity and collides with other objects in my 2d game? Quote Link to comment Share on other sites More sharing options...
alex_h Posted May 10, 2015 Share Posted May 10, 2015 Normally you make a set of balls in a physics environment then use some kind of filter or blend mode to draw them as one big blob. I've seen it done in flash by using a blur filter to extend the area then a threshold effect to restore a hard edge. It'll depend what renderer you are using as to the best way to do this in canvas. If you're using webgl then you'd want to write a shader to do it. [Edit] This was the flash example I had in mind: http://www.patrickmatte.com/?p=29 Quote Link to comment Share on other sites More sharing options...
icp Posted May 11, 2015 Share Posted May 11, 2015 Take a look here : http://gamemechanicexplorer.com/#fluid-1 .However its performance on mobile is pretty low.Works fine if you are targeting PCs . frenetikm 1 Quote Link to comment Share on other sites More sharing options...
TimHamilton Posted June 6, 2015 Share Posted June 6, 2015 Wherever and whenever I see 'fluid simulation' and 'html5', I post this link: https://haxiomic.github.io/GPU-Fluid-Experiments/html5/?q=High And yes, its runs fine on mobile if you bump the particle count down. Here: https://haxiomic.github.io/GPU-Fluid-Experiments/html5/?q=Low Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.