Water Physics

Hi Guys

I’m start to use corona and I’m loving to work with corona, I’ll do a interactive handout for schools here at Brazil.

I need to do a physics demo using water like a panana canal.

So I need water like this game: http://www.youtube.com/watch?v=___ynsUztE0

Do you think that is possible using Corona? Some one have a template or a guide to do it?

Thanks
Eros [import]uid: 93280 topic_id: 16020 reply_id: 316020[/import]

The easy and uneffective way is to create tons of small balls with physics and blur. The hard way is to create your own liquid physics engine. There is tons of pdf with algorithms on web but you have to be really good at math and have good programming skills (to do algorithms like closest neighborhood for example). [import]uid: 12704 topic_id: 16020 reply_id: 59452[/import]

http://www.patrickmatte.com/stuff/physicsLiquid/

interesting [import]uid: 79135 topic_id: 16020 reply_id: 59536[/import]

That demo works surprisingly well, too bad we can’t yet do that with Corona. [import]uid: 5833 topic_id: 16020 reply_id: 59552[/import]

No, it’s not. Look at the code Graham. 7/8 part of this liquid is just solid block and 1/8 is particles. Whole body of “liquid” is just blured. So first of all we can do it in Corona but its works only for vertical bottle. If you tilt it whole effect just gone :slight_smile:

BTW. This is much better: http://hakim.se/experiments/html5/wave/03/ [import]uid: 12704 topic_id: 16020 reply_id: 59579[/import]

Hi anddrewscott, I liked it, but Is possible apply this effects and create bitmaps using corona?

Thanks a lot
Eros [import]uid: 93280 topic_id: 16020 reply_id: 59582[/import]

Sorry, I meant “surprisingly well, for what it is.” Chances are some of the times you wouldn’t actually need real water simulation, you might just want something simple and in that case this would probably be enough. [import]uid: 5833 topic_id: 16020 reply_id: 59583[/import]

as far as I’m aware, there is no way to access bitmapdata yet. It’s been on the Corona Roadmap for a while though, so it’s on their radar.

I’d assume once bitmap data is available, there will be quite a number of other improvements to follow. [import]uid: 49447 topic_id: 16020 reply_id: 59588[/import]

Yea I know Graham but he want liquid physics like in Where’s My Water?" game. So it can’t be done with “physics” like this.

BTW. liquid engine is on Corona roadmap but lots of people asking for this feature. So maybe some paid version of external library? I still don’t have enough time for this and finish my own game because my personal life :confused:
Best regards [import]uid: 12704 topic_id: 16020 reply_id: 59589[/import]

Yea I know Graham but he want liquid physics like in Where’s My Water?" game. So it can’t be done with “physics” like this.

BTW. liquid engine is on Corona roadmap but lots of people asking for this feature. So maybe some paid version of external library? I still don’t have enough time for this and finish my own game because my personal life :confused:
Best regards [import]uid: 12704 topic_id: 16020 reply_id: 59591[/import]

Whoops, somehow I managed to completely skip past the video link. [import]uid: 5833 topic_id: 16020 reply_id: 59600[/import]