How to Integrate liquidfun with cocos2dx?

How to Integrate liquidfun with cocos2dx?
0.0 0


Today i came across an awesome physics engine (based on box2D) liquidfun.

Can we use liquidfun engine along with cocos2dx for multiplatform development. Has anyone sucessfully integrated it with the framework?


it is an extension to Box2D I dont see why you could not use it.


I’m also looking for tutorials how to add this engine…
It would be nice if the team can post a tutorial how to update box2d or incorporate other 3rd party APIs so we can do it ourselves…
guys…? anyone…?


Jason Slack-Moehrle wrote:

it is an extension to Box2D I dont see why you could not use it.

maybe you can post a how-to?


Yup a mini tutorial on integrating liquid-fun and cocos2dx box2d would be great! :slight_smile:


I just found this, haven’t tried it yet.


Very good information xD
There anyone who has gotten into the link posted JGod?
I tried entering the link “LiquidFun with Cocos2D-X” does not work. :frowning:


I did run :slight_smile:
You just have to download the custom version of Cocos2dx called Cocos2dx-liquidfun.
You should do the same procedure with Cocos2dx.
There is only a problem of compatibility between the two versions.

Eclipse gets confused when you display the contents of the “Classes” folder

To solve this problem. Just simply right click on the “Classes” folder and follow the following step:

  1. Resource->Edit
    3)Find the “Classes” folder in the path of Cocos2dx-liquidfun.
    5)Enjoy :slight_smile:


That’s awesome :smiley: I’m more interested in adding it to my own version though. If you ever figure out how to include it in an easy way to an existing cocos2dx, instructions would be welcome.



I added two samples that show how to use LiquidFun and cocos2d-x: LiquidFun Testbed, and LiquidFun EyeCandy.

They are here:

And I also write an article that explains the technical details for the integration:

I hope you like them.


Here is how I integrate LiquidFun with Cocos2d-x 3.0:

1.- Copy/overwrite all .h/.cpp files from liquidfun/box2d to cocos2d-x/external/box2d (including the folders).
2.- Modify in cocos2d-x/external/box2d adding all files.

When you run cocos compile …. all the magic is done


Thanks ricardo and lfmingo, this is great!


I tried LiquidFun EyeCandy. It works well on android. But it could not show water part on win32. I don’t know why.


I will have to double-check it, but I think the app doesn’t work correctly on desktop computers. There was an issue with the shaders.


Hi everyone,

I follow instructions from @Ifmingo but, when i launch compilation with Visual Studio 2011, linker fail with this message :

4>libbox2d.lib(b2ParticleSystem.obj) : error LNK2019: extern symbol not resolved "public: class b2IntrusiveListNode * __thiscall b2FreeList::Allocate(void)" (?Allocate@b2FreeList@@QAEPAVb2IntrusiveListNode@@XZ) referenced in function "public: class b2ParticleHandle * __thiscall b2TypedFreeList<class b2ParticleHandle>::Allocate(void)" (?Allocate@?$b2TypedFreeList@Vb2ParticleHandle@@@@QAEPAVb2ParticleHandle@@XZ)

I spent 3 hours on this problem but i didn’t found anything, and there is no informations about this on Google. Anyone can help ?


Awesome! Thanks for samples and explanation!


I’ll double the Windows build tomorrow.
Currently I’m updating the samples to work with v3.4


Is this still being worked on? What would be a nice feature is to “dress” an elastic/soft body with a texture.