I've been curious as to how the game Sushi Cat was made.
So I typed in squishy box2d into google, and came across this:
http://cowboyprogramming.com/2007/01/05/blob-physics/
I figured that the cat in sushi cat probably was a mass spring system, so then I tried making one myself using BorisTheBrave's AS3 controller grab pack:
http://personal.boristhebrave.com/proje ... -grab-pack
I should probably say that I'm only familiar with Box2D in AS3.
So I made myself a circle within a circle with all the same structure as the mass spring system blob shown earlier
Download my AS3 source files here:
http://www.gpstudios.com/temp/Squishy.rar
It looks quite similar to the blob on the mass spring system web page.
However it is completely unstable. It is very flacid and gets destroyed very easily.
This is clearly due to the springs being so weak, but I find changing the 3 variables(k, damping and length) only make it weaker.
I've tried using revolutejoints in conjunction with springs, and while this is much better and more stable, it still breaks quite easily.
Check out my files, TestSpring in the testbed is where it's all at.
I hope someone can enlighten me on how to make a perfect blob, because i've got a pretty cool idea for myself if I get this working.
Thanks.
Edit:
I've just discovered that springy joints are possible without the controller pack, I didn't realise you could set a Distance Joint to stretch like a spring.
I've replaced all the revolute joints/springs with distance joints.
The ball is nice and bouncy, however, it still breaks very easily. It collapses in on itself and the joints never reset.
It looks as though the joints have complete freedom of rotation, allowing them to get comfy when inverted.
Take a look:
http://www.gpstudios.com/temp/PhysTest.swf
The link to the source files have also been updated.
You can increase stability by removing the comment at line 75. This will add diagonal joints going counter-clockwise.
I've looked all over the box2d forums and there is no absolute solution to the issue of squshy/soft bodies.
Many people have managed to do it, yet there are no published step-by-step instructions on how to achieve this exactly.
So I typed in squishy box2d into google, and came across this:
http://cowboyprogramming.com/2007/01/05/blob-physics/
I figured that the cat in sushi cat probably was a mass spring system, so then I tried making one myself using BorisTheBrave's AS3 controller grab pack:
http://personal.boristhebrave.com/proje ... -grab-pack
I should probably say that I'm only familiar with Box2D in AS3.
So I made myself a circle within a circle with all the same structure as the mass spring system blob shown earlier
Download my AS3 source files here:
http://www.gpstudios.com/temp/Squishy.rar
It looks quite similar to the blob on the mass spring system web page.
However it is completely unstable. It is very flacid and gets destroyed very easily.
This is clearly due to the springs being so weak, but I find changing the 3 variables(k, damping and length) only make it weaker.
I've tried using revolutejoints in conjunction with springs, and while this is much better and more stable, it still breaks quite easily.
Check out my files, TestSpring in the testbed is where it's all at.
I hope someone can enlighten me on how to make a perfect blob, because i've got a pretty cool idea for myself if I get this working.
Thanks.
Edit:
I've just discovered that springy joints are possible without the controller pack, I didn't realise you could set a Distance Joint to stretch like a spring.
I've replaced all the revolute joints/springs with distance joints.
The ball is nice and bouncy, however, it still breaks very easily. It collapses in on itself and the joints never reset.
It looks as though the joints have complete freedom of rotation, allowing them to get comfy when inverted.
Take a look:
http://www.gpstudios.com/temp/PhysTest.swf
The link to the source files have also been updated.
You can increase stability by removing the comment at line 75. This will add diagonal joints going counter-clockwise.
I've looked all over the box2d forums and there is no absolute solution to the issue of squshy/soft bodies.
Many people have managed to do it, yet there are no published step-by-step instructions on how to achieve this exactly.