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

Martin Splitt (Archilogic), Frontend Multiplay...

CodeFest
January 31, 2018

Martin Splitt (Archilogic), Frontend Multiplayer WebVR, CodeFest 2017

https://2017.codefest.ru/lecture/1165

Thanks to WebGL we've got interactive 3D content with the ease-of-use and the openness of the Web. Add WebRTC on top of that and we'll see interesting collaborative applications that play out in three-dimensional space right from within our browsers. Paraphrasing the movie Tron: “But then, we got in”. WebVR allows us to hook up the browser to a new universe of VR hardware and immersive experiences.

Let's explore what we can do together by combining the technologies to create a universe that we can explore together and what is yet uncharted land that we can discover.

CodeFest

January 31, 2018

Transcript

35 slides
  1. Today’s journey... 1. VR - what’s it good for? 2.

    WebVR - What & How 3. Multiplayer WebVR 4. Wrap up
  2. VR - what for? • Education • Healthcare • Construction

    / Architecture • Design / Arts • Journalism / Entertainment • Marketing
  3. The spectrum of VR Oculus $599* Vive $799 Gear VR

    $99* Daydream $79 Cardboard $5 Position tracking Room scale tracking Controls 2x 2x Touchpad 1x Button Mobile
  4. Why WebVR? 2/2 Responsiveness • VR available: Show VR content

    • 3D available: Show 3D content • Neither available: Show classic web content
  5. Data per player Per player: X 12.34 Float32 Y 98.76

    Float32 Z 45.67 Float32 Yaw 67.89 Float32 Roll 23.45 Float32 Pitch 19.56 Float32
  6. Data per player Per player: X 12.34 Float32 Y 98.76

    Float32 Z 45.67 Float32 Yaw 67.89 Float32 Roll 23.45 Float32 Pitch 19.56 Float32 32 * 6 bit = 192 bit
  7. Network messages Header Uint8 2 bit type 6 bit Player

    ID Position Float32[3] X, Y, Z Rotation Float32[3] X, Y, Z
  8. Network messages Type (binary) 00 01 10 11 Meaning Player

    moving Unused Player connect Player disconnect Payload Position / Rotation Unused Position / Rotation -
  9. Network overhead ws-frame = frame-fin ; 1 bit in length

    frame-rsv1 ; 1 bit in length frame-rsv2 ; 1 bit in length frame-rsv3 ; 1 bit in length frame-opcode ; 4 bits in length frame-masked ; 1 bit in length frame-payload-length ; either 7, 7+16 or 7+64 bits in length frame-payload-data ; n*8 bits in length, where n >= 0 Our packet = 216 bit (27 byte) in total
  10. “If the computer is the bicycle for our mind, then

    VR is the teleporter.” - Martin Splitt

More Decks by CodeFest

Other Decks in Technology