DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: timns' Wobbly Blobby bits  (Read 11,662 times)

timns

  • Veni, vidi, debuggi
  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • Participated in NANY Challenge Four Times
timns' Wobbly Blobby bits
« on: March 10, 2008, 09: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

[attach]

f0dder

  • [Well, THAT escalated quickly!]
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
    • Participated in NANY Challenge Once
Re: timns' Wobbly Blobby bits
« Reply #1 on: March 11, 2008, 12:53 AM »
Oooh, sqrt(x) blobs? :)

Why not post the source public for everybody?
- carpe noctem

timns

  • Veni, vidi, debuggi
  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • Participated in NANY Challenge Four Times
Re: timns' Wobbly Blobby bits
« Reply #2 on: March 11, 2008, 07: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

f0dder

  • [Well, THAT escalated quickly!]
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
    • Participated in NANY Challenge Once
Re: timns' Wobbly Blobby bits
« Reply #3 on: March 11, 2008, 01:07 PM »
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.
- carpe noctem

Original address: https://www.donationcoder.com/forum/index.php?topic=12598.0