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
Ray Tracing is fun and easy
Lately, I have been doing other things, such as this:

It's a raytracer I have been working on for a while. Read more.
Linux Version
You can also download the source code for a Linux / SDL / Cairo demo: blobsallad
There is an experimental Open GL version here.
I implemented this to test performance, but it lacks some of the features of the SDL version.
I also removed the horrible linked list implementation in favor for a 'normal' stack-allocated-array class.
Controls are:
g - toggle gravity
h - split blob
j - join blob
e - increase the size of the blobs
r - decrease the size of the blobs
arrow keys - push blobs around
2007-01-26 11:20 I wrote this article for Chris Mills at Opera.
2006-11-14 23:59 Uploaded newer version which contains some crude not too fast collision detection and
some kind of level that the blobs can hang around in. The collision detection is not very fast though.
See bs_octree.c for details. So if someone could implement a faster version I would be most happy.
Further, I decided to start implementing my own 2D drawing algorithms for OpenGL. I know what you
are thinking; "why don't he use this or that library?". I guess I could do that, but on the other
hand I like to try everything for myself. If I just wated a funny game I would buy a PSP :).
Either way, after doing some profiling I noticed that Cairo use rather much time so I though
maybe I could do something myself. (Long live the brave and stupid, which would be me I guess).
Also, there are some additional controls you can play around with if you like; Press e to increase
the size of the blobs, and r to shrink them. Press v to display some profiling information. Don't
be too confused about the percentages don't adding up, some of the tasks include the others. For
example:
--- PROFILER ----------------------------------------------------
All Tasks: 2.87s
1.83s, 63.76%, BS_PROFILER_TASK_DRAW
1.03s, 35.89%, BS_PROFILER_TASK_SIMULATION
0.88s, 30.66%, BS_PROFILER_TASK_OCTREE
0.24s, 8.36%, BS_PROFILER_TASK_OCTREE_TEST_LINE_SEGMENT
-----------------------------------------------------------------
The First and second task are prety much everything that is done. The Octree task is included
in the simulation task. Further the test line segment task is included in the octree task.
All percentages are of the total time, 2.87 seconds in this case.
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.
islam163
guide68
hotel7
hotels74
hard72
hotels90
human125
onlyhouseforrent.com
games53
inch14
home244
swsciences.com
islands206
home242
home245
flippinsweetgear.com
home20
high69
insurance240
hate122
heat134
international35
guitar114
heart94
hotel139
html40
holiday191
inch220
jacket246
ipsum132
group7
games68
internet70
raven-games.com
host13
island201
history152
hill105
holidays201
infection115
house216
holy212
videoclips3x.com
group15
game17
home69
garden111
hotel19
hill84
games30
home76
jobs136
guide48
john244
inch23
hotels39
games42
help177
lgca.org
javascript66
house232
hotels67
jacket245
heat138
high228
jesus112
hotels38
harris107
leasemls.com
home240
java48
isle213
imaging197
hotels85
jean71
horse228
hotel143
home66
hotel45
getting206
hotel19
jobs134
fetish-blog.net
hamilton225
inch15
international29
theotokos.org.uk
have219
gang85
thegolfclassifieds.com
java57
hitachi172
hotel214
islam163
head25
http92
java64
cottageandbungalow.com
history139
health54
have172
littlesummer.biz
hospital243
articlesuniverse.com
into119
head20
hotel183
http96
thalassemia.org
guild99
usa-truck.com
html50
history160
home169
middleatlantic.com
house228
here189
html38
hall201
gear141
hotel209
hill85
imaging197
importance207
gift222
generic167
heart133
pullmylink.com
horse238
inch247
james24
institute188
have192
doofus.org
industries108
insurance229
games35
bonemywife.org
home98
horse228
stewartcoopercoon.com
home27
invalid124
hotel170
have189
install166
guitar138
guide98
heart104
hotels51
horse229
home170
hard88
greatlakes-seaway.com
home106
here192
home222
hotmail130
have173
image173
heart101
england-rugby.com
jacket249
head35
assafir.com
have194
jacket3
hotel148
inch221
guitar119
hotels35
hotel157
human125
chieflandcitizen.com
html84
have151
house175
hard94
island175
max.st
info117
height150
have136
jesus111
head40
home40
hotel201
james24
important210
hero210
jesus115
high44
nasaspaceflight.com
http94
hotel128
house180
games74
http102
hotmail133
hotel120
hotels95
hits176
head20
hard39
inside158
illinois164
freestuffsites.net
guild100
pekinbantams.com
high8
24hrfitness.com
irish140
harris107
getting206
georgia190
information136
insurance226
jobs131
jobs133
image175
http89
garden90
henry182
hair170
home118
gets203
information145
homes205
interface1
games39
george184
hospital244
hotel101
java52
hotels50
height151
hard80
india80
hotel186
jackson9
hair184
home230
hard85
hire127
international27
hard52
hotel212
george186
inch242
half198
home244
i386151
hotel128
inch25
hotels42
here190
gifts232
have133
howard31
ghost217
health89
hills117
international30
protazen.com
house229
setileague.org
high39
ebonyadultmoviematrix.com
have152
have192
high234
house6
hotel50
have191
head32
inch217
into94
information134
pmarmysurplus.com
hair186
hotel242
heroes214
heart112
geekwithfibroids.com
internet71
house193
institute210
james30
john244
abra4me.com
games41
into100
dlese.org
garden107
history166
hair192
group7
inch219
usboomers.com
home27
hand240
guide70
health48
immigration198
hard69
illinois169
charterco.com
hotel98
harmony105
home28
ladiesofreenacting.com
house209
images184
hunt135
industry110
hornyir.com
jobs165
home115
chatsusa.com
hair187
internet63
crochet-knit.com
home123
jobs147
housing17
html51
into89
automotive-business-review.com
heaven140
john202
high226
jacket249
guitar103
group7
gear139
christianinstyle.net
health76
india57
high55
inside157
hotel166
hills118
hotel218
heart113