DonationCoder.com Forum

DonationCoder.com Software => DC Member Programs and Projects => Topic started by: timns on March 10, 2008, 04:00 PM

Title: timns' Wobbly Blobby bits
Post by: timns on March 10, 2008, 04:00 PM
Evening all,

I just uploaded some old old code that I wrote which models blobby things bouncing around and merging / splitting. Think amoeba or those old lava lamps.

I'm putting it on DC because I always wanted to use this effect in a game but lacked the imagination to come up with anything. The source code is freely available to anyone who asks, in the hope they will be able to do something clever with it where I could not!

http://timns.dcmembers.com/Blobs.html

[ You are not allowed to view attachments ]

timns
Title: Re: timns' Wobbly Blobby bits
Post by: f0dder on March 10, 2008, 07:53 PM
Oooh, sqrt(x) blobs? :)

Why not post the source public for everybody?
Title: Re: timns' Wobbly Blobby bits
Post by: timns on March 11, 2008, 02:34 AM
Yes, sort of.  Have you written something similar then? I'd love to see it.

The algorithm I used treats each blob as a circular field - when 2 or more blobs get close enough, the fields add up to (or beyond) a trigger value, after which I assign a colour based on the sum of the fields' strengths. I dug the idea out of Foley and Van Damme a long time ago... probably when most of the readers of this forum were still sperm.

Anyway, I'll provide the source when someone asks for it, by all means. I'm trying to get interactive here, man!  :D

timns
Title: Re: timns' Wobbly Blobby bits
Post by: f0dder on March 11, 2008, 08:07 AM
It's been quite a while since I played with this stuff, probably around ~1998 or so. I remember initially using the distance formula (including sqrt(x)), and then realizing that since I didn't need to, like, print a correct value to an end-user, there wasn't really any good reason for the sqrt. With a few adjustments, the distance value could be kept squared, and that gave a pretty big speed increase :)

Don't have the source (or binary, for that matter) anymore, though.