pause simulation
resume simulation
Move around Blob with arrow keys or mouse.
Split blob with h.
Join blobs with j.
Turn gravity on / off with g.
Written by: bjoern.lindberg@gmail.com
Javascript Source Code
Get FireFox
You can also download the source code for a Linux / SDL / Cairo demo: blobsallad
Controls are:
g - toggle gravity
h - split blob
j - join blob
arrow keys - push blobs around
2006-10-15 23:34 Removed support for X11 and GTK since this is never used and defunct.
2006-10-15 22:51 Code clean up in blob collective
2006-10-14 16:43 Implemented faster collision detection, which reduce collision detection effort
from 16000 computations per blob to just 40. Less is more. The only problem is that this solution
is less visual appealing due to incorrect computation of the blobs radius. So if I can fix that
I suppose it's gonna look alright. Another benefit from this approach is that the blobs doesn't
get stuck inside each other.
2006-10-11 23:16 Implemented first collision detection so that blobs now bounce of each other.
This use up a lot of CPU since two colliding blobs are deformable and penalty forces are applied
iterative. Now this is not so good since I would like to implement some other stuff like a world
in which the blobs can do stupid blobish stuff, and I suppose I could use CPU for that. So high prio
is to speed this up
I have started to harass people I know for game music. If you're interested in creating music
do game design, graphics and stuff like that just send me a mail. If you wanna code you're also
welcome of course.
2006-10-03 20:44 Fixed stability problems, model will no longer behave like a drunk sailor.
2006-10-02 21:56 I made some changes in the blob model. First I got a nicer looking blob.
Also, I gave up using breizeir curves for drawing the blob. Now every blob is 40 line segments.
It have some interesting stability problems. Turn of gravity and see what I mean.
I have also noticed that the cairo library seems to be quiet a bottle neck.
To test this, comment out all meaningful code in bs_blob_collective_draw, then spawn
blobs like crazy and notice that you can create quiet a few before any substantial
frame drop begins.
You need Cairo to compile the source.
Cairo comes with most main distros such as Debian and Ubuntu.
If you have any questions just send me a mail. I am NOT an evil programmer.
Screenshots
Don't tell those guys that did that game ...
Here is how the blob is made. A lot of pointmasses connected
thogether with joints. Each joint allows for some flexibility
which makes the whole thing blobish. A pointmass turns blue to
indicate that the pointmass is inside some other blob. Once the
pointmass is inside the other blob a penalty force is applied
which force the point outside the other blob. I figured another
possibly much faster way to implement collision detection in which
two blobs are separated by a line. Points passing over the other side
of the line are put back again, hence blobs repell each other but
this should be conciderably faster and allows for fast discrimination.