Search Unity

2D Water for Platform Game

Discussion in '2D' started by bored-player, Apr 8, 2014.

  1. bored-player

    bored-player

    Joined:
    Mar 24, 2014
    Posts:
    2
    Hi guys,
    How are you?

    Hope your fine.

    Im trying to build a system of platform water for my 2D platform game.

    How you do it? Theres a better way? Theres some good patterns/pratices?
    To simulate water density i was thinking about use a HitTest system with Player and Water to decrease the player speed while Player is colliding with water.

    But for other things, i still have several doubts about how to execute this:
    1) What are the best pratices/patterns to create the little bubbles which appears when someone jumps in the water. (or even move through the water)
    2) What are the best pratices/patterns to create the water sprite itself, should it be an one piece block, or several little blocks aligned side by side?
    3) How should i simulate waves on these sprites? Theres some Mathematical logic for doing this?
    4) If the best pattern is to create several little blocks of water aligned side by side, how could i simulate the waves using several blocks. Its easier, difficult?

    I dont want anything in the "spoon-feed" way, all that i need is a light to go!

    I appreciate your help.
    ][`s
     
  2. DalerHakimov

    DalerHakimov

    Joined:
    Mar 14, 2014
    Posts:
    302
  3. bored-player

    bored-player

    Joined:
    Mar 24, 2014
    Posts:
    2
    Its a great tutorial, thanks, i have not found that im my first research!
    I had also found another tutorial from this same website, which is this one:

    http://gamedevelopment.tutsplus.com...sh-with-dynamic-2d-water-effects--gamedev-236

    I dont know, i may be wrong, but in this tutorial above, it seems to be too much complexity for something that could be simplier.

    And what i really wanted is to do that using pixelart, and im afraid i cant reproduce this effect using meshes.

    ][`s
     
  4. litos

    litos

    Joined:
    May 23, 2015
    Posts:
    1
    Hey! I'm following this tutorial. I want to create a plataform that seats on top of the water, where I will pile boxes. How do I do that?
     
  5. Gruguir

    Gruguir

    Joined:
    Nov 30, 2010
    Posts:
    340
  6. ravingbots

    ravingbots

    Joined:
    Aug 20, 2015
    Posts:
    44
    If you need a ready-to-use solution, then you might be interested in this 2D cartoon-style water: http://u3d.as/o75 - it has animated waves, a refractive (glass) shader, some splash FX, and an example of buoyancy physics.

     
  7. cfnptr

    cfnptr

    Joined:
    Jul 10, 2017
    Posts:
    2
    Hi if you need water physics like in terraria, it may help you - http://u3d.as/Snm