Guest Post: The Magic of Multilayered Physics

Guest Post: The Magic of Multilayered Physics

To celebrate the second issue of 10Finger’s CoronaPaper, Linda Ettehag writes on a brand-new physics discovery that will “wow” Corona developers. The magazine is centered around all things Corona – from offering awesome tutorials, to API news to interviews with star developers and Corona team members.

10Fingers is offering CoronaPaper for free from January 31 – February 4, 2013! Don’t miss your chance to experience the latest and greatest Corona tutorials, app reviews, news on APIs, and more.

CoronaPaperWe at 10Fingers wanted to make a world with multilayered physics. Think of it like this: one layer with bouncing balls with the “bounce factor” set to 1, and another layer behind it with more bouncing balls, but with the bounce factor set to 2.

We were able to achieve this using mask bits (collision filters), but it didn’t feel fluid, and that presented limitations on how many layers we could have. We truly wanted a fluid solution and a limitless number of layers.

Oskar, one of our developers, sat down to meditate until he had a brilliant idea. His idea was to make all layers “independent” and give them physics properties of their own, making objects move smoothly between them — and on top of that, producing a 3D illusion.

Was it possible? He rushed to his keyboard and typed furiously. Blood, sweat, and tears were shed and hours passed — could he succeed? Later that day, a masterpiece was born! We didn’t think this was possible, but now we can share this information with you so you can explore a new world with the physics engine. We like to think that anything is possible — sometimes you just have to try harder. With that in mind, you can see a sample of the Oskar’s solution below.

Oskar’s demo will be presented in the January 31, 2013 issue of CoronaPaper.

This second issue of CoronaPaper centers around physics. In addition, if you like to add sound effects to your games, you will drool over our Heavy Game Audio article. Also, you’ll get a chance to meet Corona ambassador David Roulin and discover how he works with Corona Education. For those who love prizes, you’ll enjoy the Code Less, Play More Contest; if you send us your best entry, you’ll be entered to win an iPad Mini.

We hope you enjoy CoronaPaper!

Linda Ettehag, CoronaPaper

inna
8 Comments
  • J. A. Whye
    Posted at 15:27h, 31 January

    Wow, cool promo video. Can’t wait to learn the details. It’s great to see people pushing Corona SDK past the most obvious “limits.”

    Jay

  • Paulo Dichone
    Posted at 19:41h, 31 January

    AMAZING!! This is why Corona SDK is the best! And thank you for sharing this awesome promo video. I am definitely going to get CoronaPaper 🙂

  • Future-Spark
    Posted at 15:41h, 01 February

    CoronaPaper’s choice in output format…is less than ideal for code.

    • Stian Saunes
      Posted at 04:30h, 04 February

      We’ll be uploading all code examples to the web, starting with the next issue. We’re really sorry about this. We assumed it would be easier to copy/paste stuff from JooMag’s reader.

      Stian, CoronaPaper.

  • ng
    Posted at 23:02h, 02 February

    I enjoyed the paper. But should have links to source files, or at least a way to copy and paste code out so I don’t have to write it all out.

    🙂

  • Ed Johnson
    Posted at 07:40h, 03 February

    By far the best demo using Corona SDK physics engine to date! Thanks to all the 10Fingers’ Corona Paper authors on their advanced usage with good examples! This issue is not to be missed.

  • Vova S
    Posted at 01:08h, 06 February

    Hi
    Someone managed run Car Physics code from coronapaper 2 ?