Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Creating Augmented Reality Apps with RubyMotion

Lori M Olson
November 18, 2019

Creating Augmented Reality Apps with RubyMotion

Augmented Reality (AR) is the new cool. But did you know you could write AR apps (and games!) using Ruby(Motion, that is)? Come and escape normal boring reality with us, as we create a native AR app using RubyMotion.

Lori M Olson

November 18, 2019
Tweet

More Decks by Lori M Olson

Other Decks in Programming

Transcript

  1. Creating Augmented Reality
    Apps with RubyMotion
    Lori Olson

    WNDX School

    View full-size slide

  2. Why RubyMotion?

    View full-size slide

  3. Why RubyMotion?
    Because it’s Ruby, duh.

    View full-size slide

  4. But it’s mobile *native*
    development, so why not use…

    View full-size slide

  5. Why Not…
    • I’ve used it

    View full-size slide

  6. Why Not…
    • I’ve used it
    • Syntax is ugly and hard to read

    View full-size slide

  7. Why Not…
    • I’ve used it
    • Syntax is ugly and hard to read
    • It’s the old, uncool language

    View full-size slide

  8. Why Not…
    • Language has been evolving *very* fast

    View full-size slide

  9. Why Not…
    • Language has been evolving *very* fast
    • Every new version (5 so far) breaks
    backward compatibility

    View full-size slide

  10. Why Not…
    • Language has been evolving *very* fast
    • Every new version (5 so far) breaks
    backward compatibility
    • although last release was better

    View full-size slide

  11. Why Not…
    • Language has been evolving *very* fast
    • Every new version (5 so far) breaks
    backward compatibility
    • although last release was better
    • 5 years they’ve managed to raise the
    language to a level of complexity that
    rivals the much older Java

    View full-size slide

  12. Why Not…
    • Language has been evolving *very* fast
    • Every new version (5 so far) breaks
    backward compatibility
    • although last release was better
    • 5 years they’ve managed to raise the
    language to a level of complexity that
    rivals the much older Java
    • That’s not a compliment

    View full-size slide

  13. Why Not…
    • Language has been evolving *very* fast
    • Every new version (5 so far) breaks
    backward compatibility
    • although last release was better
    • 5 years they’ve managed to raise the
    language to a level of complexity that
    rivals the much older Java
    • That’s not a compliment
    • I will say the syntax is nicer than ObjC

    View full-size slide

  14. Why Not…
    • I’m sorry

    View full-size slide

  15. Why Not…
    • I’m sorry
    • No, I’m not that sorry

    View full-size slide

  16. Why Not…
    • I’m sorry
    • No, I’m not that sorry
    • I really hate Javascript

    View full-size slide

  17. Why Not…
    • I’m sorry
    • No, I’m not that sorry
    • I really hate Javascript
    • And it’s not really native, so there’s that

    View full-size slide

  18. Why Not…
    • I’m sorry
    • No, I’m not that sorry
    • I really hate Javascript
    • And it’s not really native, so there’s that
    • Besides, every mobile app you really
    hate was probably created with
    Javascript

    View full-size slide

  19. Quick Intro to
    RubyMotion

    View full-size slide

  20. Quick Intro to
    RubyMotion
    DragonRuby

    View full-size slide

  21. Why did I chose
    RubyMotion?
    WIMBY
    Wells In My Back Yard
    wimby.ca

    View full-size slide

  22. Tried Objective C

    View full-size slide

  23. Tried Objective C
    Still disliked it

    View full-size slide

  24. Tried Objective C
    Still disliked it
    Context Switch was brutal

    View full-size slide

  25. Difficult
    ‣ Lack of *good*, *deep* examples

    View full-size slide

  26. Difficult
    ‣ Lack of *good*, *deep* examples
    ‣ Constant need to translate from
    Objective C

    View full-size slide

  27. Difficult
    ‣ Lack of *good*, *deep* examples
    ‣ Constant need to translate from
    Objective C
    ‣ And now from Swift examples to
    figure stuff out

    View full-size slide

  28. Difficult
    ‣ Lack of *good*, *deep* examples
    ‣ Constant need to translate from
    Objective C
    ‣ And now from Swift examples to
    figure stuff out

    View full-size slide

  29. Why not teach?

    View full-size slide

  30. I love teaching,
    but..

    View full-size slide

  31. I love teaching,
    but..
    Live teaching is exhausting

    View full-size slide

  32. What about online?
    And WNDX School was born

    View full-size slide

  33. What about online?
    And WNDX School was born

    View full-size slide

  34. But the AR, Lori…
    Where’s the Augmented Reality we were promised?

    View full-size slide

  35. New cool APIs like ARKit
    Apple WWDC

    View full-size slide

  36. Need to create new
    AR examples!

    View full-size slide

  37. Start Somewhere

    View full-size slide

  38. Augmented Reality
    Hello World

    View full-size slide

  39. LIVE CODING ALERT

    View full-size slide

  40. LIVE CODING ALERT

    View full-size slide

  41. Augmented Reality
    Hello World

    View full-size slide

  42. Other tutorials
    like Ray Wenderlich

    View full-size slide

  43. Places Of Interest

    View full-size slide

  44. Live POI AR Demo

    View full-size slide

  45. If you don’t find this example compelling

    View full-size slide

  46. If you don’t find this example compelling
    • Make it your own.

    View full-size slide

  47. If you don’t find this example compelling
    • Make it your own.
    • Don’t need to use Google data or
    get a Google API key

    View full-size slide

  48. If you don’t find this example compelling
    • Make it your own.
    • Don’t need to use Google data or
    get a Google API key

    View full-size slide

  49. If you don’t find this example compelling
    • Make it your own.
    • Don’t need to use Google data or
    get a Google API key
    • Check your local government (civic,
    state, or federal) Open Data.

    View full-size slide

  50. If you don’t find this example compelling
    • Make it your own.
    • Don’t need to use Google data or
    get a Google API key
    • Check your local government (civic,
    state, or federal) Open Data.
    • Download some data with precise
    GPS locations, and go crazy

    View full-size slide

  51. How about a real example?

    View full-size slide

  52. How about a game?

    View full-size slide

  53. How about a game?

    View full-size slide

  54. SurvivAR
    Flaming demons

    View full-size slide

  55. SurvivAR
    Use the shooting sight

    View full-size slide

  56. SurvivAR
    Mini-map to see behind

    View full-size slide

  57. SurvivAR Project / Rakefile

    View full-size slide

  58. But there’s a twist
    to this story

    View full-size slide

  59. Well sort of

    View full-size slide

  60. Well sort of
    I helped

    View full-size slide

  61. My Intern built these apps

    View full-size slide

  62. First year Comp Sci

    View full-size slide

  63. First year Comp Sci
    • Derek

    View full-size slide

  64. First year Comp Sci
    • Derek
    • Done a little web programming

    View full-size slide

  65. First year Comp Sci
    • Derek
    • Done a little web programming
    • Learned Java in 1st year

    View full-size slide

  66. How does a first year student
    do this?

    View full-size slide

  67. 1. Learn Ruby

    View full-size slide

  68. 2. Choose Your Own
    Adventure

    View full-size slide

  69. 2. Choose Your Own
    Adventure
    He chose ARKit

    And a game

    View full-size slide

  70. 3. Reviewed all the MiM
    videos

    View full-size slide

  71. Amir helped, too

    View full-size slide

  72. So why tell you all that.

    View full-size slide

  73. Not enough diverse apps
    out there

    View full-size slide

  74. More diverse app creators needed

    View full-size slide

  75. More diverse app creators needed
    • To see the problems
    others don’t see

    View full-size slide

  76. More diverse app creators needed
    • To see the problems
    others don’t see
    • To create the apps to
    solve those problems

    View full-size slide

  77. WNDX School is
    here to help you
    To help you, Ruby Developers,
    get those app ideas out of your
    heads and into the App Store.

    View full-size slide

  78. So do me a favour, and get out
    there and build YOUR app!

    View full-size slide

  79. So do me a favour, and get out
    there and build YOUR app!
    Or help someone build an app to solve THEIR problem.

    View full-size slide

  80. Thanks for coming!
    Find your on-ramp for RubyMotion Development with FREE Getting
    Started guides here:
    https://wndx.school/p/rubyconf
    Pssst. There’s stickers. Find me for questions after this talk.

    View full-size slide