User Tag List

Results 1 to 5 of 5

Thread: Flowing Water

  1. #1
    No Products Registered

    Join Date
    Aug 2010
    Location
    United States, Pennsylvania
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Flowing Water

    I'm currently creating a 2D Minecraft clone made with Multimedia Fusion 2, and I need some help with the water. I want to make it spread, kind of like this ---> http://www.youtube.com/watch?v=6mxeKZzt5MU&feature=channel_video_title You'll see what I mean when it reaches 0:49

    If somebody knows how to do this, please tell me!
    No example file is nessesary, but it would be nice.

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Flowing Water

    It's actually quite simple really - it depends on your engine for the best way to do it though. If you're using an array of sorts to store the terrain (eg how high each tile is/if it's fillable), then it'd be even easier, but if all you have is ground tile/no tile you'll need a detector.

    If you could explain your engine a little better I might whip up an example...

    Basically you just test to see if the detector is overlapping ground/water. If it's not, create water at that grid position. Then test for that water's edges overlapping ground/water (using the detector or the array) and if not make another water and test that... etc etc.

    Basically, you create a water. You test for it's internal flag 0 being off (which it is by default), you run a loop on it (4 times) to test for each edge, in each loop you position the detector, and at the end of each loop you test for it overlapping high ground or existing water - and if it's not, make a new water (which will start a new loop for THAT - oh boy.)

    Hard to explain. Easy to code.

  3. #3
    No Products Registered

    Join Date
    Aug 2010
    Location
    United States, Pennsylvania
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Flowing Water

    Well, i'm just trying to make the water flow down, left & right. Here is a file with the example, but it has severe lag (possibly from the 20000 objects flooding the frame!)

    http://www.mediafire.com/?n5hmq35b6dc7o6u

    Seriously, that's the best I could come up with /_\

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Flowing Water

    Instead of lots of objects, you could do it Terraria-style and have each water one block, and then if the water level need to be lower, change the water frame to a lower water level or resize it. Also, in the future upload to mfa.aquadasoft.com.
    Working as fast as I can on Fusion 3

  5. #5
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    gkinfinity's Avatar
    Join Date
    May 2011
    Location
    USA
    Posts
    282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Flowing Water

    Basically you need to do what Ricky or LB said. One of the reasons there's so much lag with the example you used Matt is because your code has it create blocks of water over top of existing blocks of water. Since every square of water creates 3 more blocks around it every second, many duplicates are created that aren't needed. The first square of water (for example) creates 3 blocks of water every second when each square should really only create more squares one time each (and only in directions that don't have water already).

Similar Threads

  1. Is this water possible to do in MMF?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 13th July 2014, 08:40 PM
  2. Guide the water
    By boeikaas in forum Android Released Games & Apps
    Replies: 2
    Last Post: 17th July 2013, 04:10 PM
  3. Overlay+xlua flowing lava
    By Algul in forum File Archive
    Replies: 5
    Last Post: 4th July 2009, 11:16 AM
  4. Flowing clothes (coded)
    By Crossbones in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 6th January 2008, 01:36 AM
  5. Flowing water of particles :)
    By Blizna in forum File Archive
    Replies: 4
    Last Post: 23rd January 2007, 06:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •