As I supposed, it did not take long before some ideas posted in the forum become reality in the blog.
I am talking about the post about soft body engine that I recommend you to read before continuing with this post.
From Wikipedia: Soft body dynamics is an area of physics simulation software that focuses on accurate simulation of a flexible object. That is, the object is deformable, meaning that the relative positions of points of the objects can change.
I received an email from Jack Hopkins, that wants to share with us two examples of a soft body engine
Dear Emanuele,
I have noticed some qualms about a Softbody Engine on your forum, so…I went ahead and made one,
i’ve included it here, its annotated and if you want to distribute it on your blog for the people that want one I would be honoured to let you.
from Jack Hopkins (Noddybear)
Jack sent me two versions of the engine… the first one is his “work in progress” while the second one is almost all API
In both versions you control the “blob” with arrow keys, but in the second one you can “jump” pressing mouse button and your blob will react to movie edges.
First one
Second one
And source codes.
Enjoy, and thank Jack Hopkins
Want to learn more? Learn by example!
Get the full commented source code of an actual commercial cross platform HTML5 game!!
Comments 8
Thanks emanuele!
Ive been watching your blog for a year now and i just wanted to contribute something!
Thanks again
http://www.bit-101.com/base.html
Check out May 21-24, 2003.
Source in http://www.bit-101.com/flafiles/ by date: yymmdd.fla, ie. 030521.fla is may 21. :)
Hi there.
Really great engine, it’s very handy, and very useful.
I found a bug. When you get close to the border, you get flat, as you should. But if you keep holding the down key, you’ll still move. Not visible, but when you’re going up again, it takes plenty of time to move. Except that: Great engine!
Cheers Frederik J
I think the problem with the blob become flat when moving into the sides is that the center of the blob isn’t pushing away from the points of the blob. It’s just the points of the blob, pushing away from the center.
Matt – To do what you ask would be possible but would use a hellova lot more CPU
Fred – Thanks Fred! I didnt have time to fix the glitch but its because the softbody follows an MC,
the softbody cant leave the stage, but the MC can.
If you could do something with it I would be very grateful!
You could just move the m, and it’s width out of the stage. When it reach it’s place, you could stop it – Like it hits a wall. :-)
I’ll have a go at it.
I’ll post it on the forums
what’s the use of this engine,
will you be using it in the future?