Volumetric lighting and realistic water in fully 2D game

Discussion in 'Game Development (Technical)' started by Janusz, Dec 20, 2016.

  1. Janusz

    Janusz New Member

    Nov 1, 2016
    Likes Received:
    This is a short article without details that can help to create realistic phisical effect in 2d game. I use Java, so I'm writing about it, but I belive that in other language/libs it may be useful.

    Concerning water reflection
    The effect of wavy reflection is result of a few non-afine transformation, let call two first of them T1, T2. Then
    stand1.png --(T1)--> F1.gif and stand1.png --(T2)--> F2.gif ,
    finally composition of T1 and T2 and inverting with some gradient alpha chanel (let them call T):
    stand1.png --(T1)--> F1.gif --(T2)--> F1_2.gif --(T)-> result-water reflection

    All transrormation were made with affine transforms of Java SE.

    Concerning volumetric lights
    The game engine naw can produce the volumetric light whit is very tricky and still fully 2D effect. It's result of drowing a lots of character copies one next to another along light rays with AlphaComposite.DEST_OUTrule of drowing which is actually slightly erasing the image of light rays. See the effect on two videos below:

    #1 Janusz, Dec 20, 2016
    Last edited: Dec 20, 2016

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer