How do i make water move like minecraft?

0 favourites
  • 8 posts
From the Asset Store
This is a code so you can see the same skin on all screens (peers). Each peer gets a skin, in addition to 4 directions t
  • hi everyone,

    i have been on the forums on and off for the past few days trying to figure some stuff out about 2d water.

    so far i have had a low success rate on finding topics that match my game style.I have block tiles that are 32x32 in size and i wanted to know how do i make a single tile act like water?I am hoping that someone has some info on how i can make this happen.thanks everyone i hope to get some feedback about this

  • Maybe it's just me, but what would it mean for a tile to "behave like water"?

    What I mean is, what do you expect the tile to do?

    Could you tell me what actions the tile should have on what conditions, maybe if you break the expected "behaviour" down into little pieces it becomes clearer how to set up the events.

  • LittleStain I would like the water to flow until it is blocked by a solid,the game im making this for is a sandbox/platformer/sidescroller.

    Terraria and Minecraft are my best references to what im trying to do,I apollogize about the lack of information

  • Check this thread and search for the keyword "Fluid physics" at any date in advanced search.

  • Thank you Kyatric i have been trying to figure this out for awhile now,I did check out the link you posted but the type of water effects that are being used will cause way too much performance loss and i can almost guareentee that it will cause lag.

    I was hoping to find a less powerful way of completing this.

    Minecrafts water dosnt update everytick it is a slower updating system it i just cant figure out how. Thanks again guys i will check the keyword.

  • Kyatric I think the way Notch approached water/lava in MineCraft doesn't require a lot of CPU, as he didn't go for ultra-realistic.

    He has source blocks that water/lava can flow from, with a maximum distance of 8 squares from the source block.

    If you have MineCraft, put a source block near the edge of the terrain, and you'll see that there is no limit to the drop, and that it either continues the 8 count or restarts it when it hits land (I forget which).

    Also, it doesn't update every tick.

    Far from it.

    Water seems to update a few times a second when it's spreading, and lava seems to update every few seconds.

    So it's not down to masses of computations, but more down to clever logic with timed updates.

    And of course, you only need to update the flow of a source block if it's surrounding terrain changes.

    It shouldn't be too difficult to get it working in 2D, but will probably take quite a bit of tweaking when in place (as Notch had to).

  • There are a few examples for tile-based water like that...maybe they were in CC. Will search around.

    Yep. scirra.com/forum/how-to-make-minecraftlike-lavawater-physics_topic41488_page1.html

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thats where i got the quote from in my last reply,Thank you for posting this it did help,I have downloaded construct classic to see how some things operate.They still have great tutorials and examples to learn from.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)