Simple Flash Ecosystem

// September 14th, 2008 // Experiments, Source code & tutorials

Since I still don’t have a car, I spend this Friday more than 4 hours traveling to a client by train. Some people read a book or watch the landscape, I decided to create life.

The creatures I created are quite simple, they get born, swim around randomly, rest sometimes , eat green dots, breed and finally they die. With my first tests, the creatures didn’t do well, they breed to much and soon there where to many, or they died to fast and got extinguished. So I added 2 simple rules:

  1. You live longer if you eat.
  2. You have to eat before you breed.

And that did the trick. The result is a fine balanced ecosystem.

You can download the source as an FDT project, but you have to compile it with the Flex SDK, and use the SWC to access the graphics (I lost most of the graphics by a Flash crash, the last saved version of the fla is  in the source )

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

10 Responses to “Simple Flash Ecosystem”

  1. walter says:

    Very funny, and nice to watch

  2. [...] and my computer bing’s at me… I have new mail and in this mail there is a link…. So i go on this site, and have a look at what it is. I find it very interesting. It is a ecosystem [...]

  3. Jonas says:

    Some nice experiments. But the link of the source got lost. Would it be possible to find it again? I could learn a lot from how you handled this ecosystem programming. Thx a lot. I appreciate it very much.

  4. Kris says:

    hi Jonas,
    The link is fixed :)

  5. Jon says:

    It would be really cool if there were plants that grew, herbivores, omnivores and carnivores in one ecosystem but that might be too complicated.

  6. Flash User says:


    What a nice experiment! Very mesmerizing.

    One thing though, it is not exactly a fine balanced ecosystem… I left the experiment running all night and in the morning there were no more creatures left; they all died at one point. Now all I see are 40 green dots. It would be nice to have a couple of user selectable variables to try to get a real perfect balance.

    Nevertheless, Kudos!

  7. daxibalbaid says:

    the credit for:‘s_Game_of_Life

  8. Nathan says:

    It`s a great expeariment. I think if you add a few user-adjustable variables would make it that much better. I think that good variables would be: creature lifespan, creature rate of reproduction, rate of food apperance, start number of creatures, and start number of food. I do find it confusing how the creatures wander off the area and then seem to reapear somewhere else. Could you do something about it (posibley a wall)? Otherwise I love it. Thanks

  9. Tim McIntyre says:

    Hi Kris,

    I came here via YouTube interested in your PID controller, then found your 6-axis robot, I’m hooked on the Cube, and now I’ve found all these little gems in your software projects… They are truly amazing and unique.
    I find myself checking YouTube every week for an update to your projects and simply can’t get enough of them!
    Good work and keep up the progress.