Fancy Fluids in Flash by Sam

Every now and then I like to code something just for the fun of seeing what I can create. Recently I’ve been working on a 3D water sim in flash. Check it out below. If you’re curious as to how the water in Minecraft or Dwarf Fortress works, this is for you.

[SWF]/wp-content/uploads/2010/10/FancyFluids.swf, 600, 400[/SWF]

The tech is inspired by that of Dwarf Fortress (which you can read about here), with a couple of my own additions. It is based on two core concepts. Firstly, water always falls down; if there is an empty cell below a cell of water, move that water down. Secondly, if a cell of water is connected to an empty cell somewhere below, teleport the water there.

One of my more interesting additions is that water ‘prefers’ to move consistently in one direction, as opposed to whichever direction is easiest. This means you can get jets of water that spurt out of high pressure areas. Take a look at demo 2 to see that in action.

If you’re curious, the image used in the demo is my display picture from the TIGSource forums. Also the GUI stuff is by BIT-101.

If theres anything you would like to know in more detail, or if you have any suggestions leave a comment below!

You can download the source here, but be warned: it ain’t pretty.


  1. stevie says:

    you are a genius sam. destined for great things

  2. Wang says:

    i like it =]
    while i was watching it was just trying to find use for it in a game,
    maybe something like pipe dream (i think that was the name) but way more awesome, and in 3D!!

  3. This is a great display of programming skills! I’m sincerely impressed!

  4. Excellent work! I was doing a small experiment with papervision3d, which ended up looking a lot like minecraft. I’m not going to remake it or anything, but this reminds me of it!

  5. Pretty nice post. I just stumbled upon your blog and wanted to say that I have really enjoyed browsing your blog posts. After all I will be subscribing to your rss feed and I hope you write again soon!

  6. It’s really a great and helpful piece of info. I’m happy that you simply shared this useful info with us. Please keep us informed like this. Thank you for sharing.

  7. I’ve read several good stuff here. Definitely value bookmarking for revisiting. I surprise how so much attempt you place to make this kind of magnificent informative website.

  8. When I originally commented I clicked the -Notify me when new comments are added- checkbox and now each time a comment is added I get four emails with the same comment. Is there any way you can remove me from that service? Thanks!

  9. Hi, this weekend is pleasant in support of me, since this point in time i am reading this impressive informative piece of writing here at my house.

  10. Very good website you have here but I was wondering if you knew of any discussion boards that cover the same topics discussed here? I’d really like to be a part of online community where I can get advice from other experienced people that share the same interest. If you have any suggestions, please let me know. Bless you!

  11. But a smiling visitor here to share the love (:, btw outstanding style and design. “Better by far you should forget and smile than that you should remember and be sad.” by Christina Georgina Rossetti.

  12. I’ll immediately clutch your rss as I can not to find your email subscription hyperlink or newsletter service. Do you have any? Please let me recognise so that I could subscribe. Thanks.

  1. amazon reviews linked here

    [... Every now and then I like to code something just for the fun of seeing what I can create. Recently I've been working on a 3D water sim in flash. ...]

Prev CommentsMore Comments

Leave a Comment