Code Carnival

by Matt Jones

Alas, it's not the year 2066 yet. But it will be, one day.


New -- Dawkins-style biomorphs!
Videos of spotted skunks

Flash: Spotted skunks are smart

Michal: efuturysta (Polish blog)
Biomorphs

SVG Biomorphs

biomorphs.svg (Firefox and Opera only)

Those of you who are Richard Dawkins fans may have come across descriptions of a "biomorph" program. This program breeds symmetrical, biological-looking shapes by mutating from a parent and allowing the user to choose one to breed further. It's a simple program -- my implementation of it uses less than 200 lines of JavaScript -- and yet it can produce some pretty interesting results.

The version I've implemented uses JavaScript and SVG, and works only in the Firefox and Opera web browsers. (It may actually work in other browsers or SVG viewers, but I haven't tested it there and I'm making no promises.) "SVG" stands for "Scalable Vector Graphics". It's been around for a while, but browser makers have been taking their time in supporting it. Firefox and Opera now support a large part of it, enough for me to write this program.

The way the program works is simple. There are 9 squares. The middle blue square is the parent and the grey squares surrounding it are children with slight changes. To breed a child, you just click on its square. It can take several seconds to go through the breeding process.

Note that there are some occasions when a square seems to be empty, or contain just a tiny dot. That just means the morph is really small. You can still click on those squares to breed them, and hopefully get some bigger morphs. If you start out with nothing but tiny ones and want bigger ones, you can click the "reset" button to get a new range of morphs.

That should be enough to get started. So start breeding some creatures!