June Meetup

Jun 20, 2018 · Boulder, United States of America

Ouroboros: Building a Real-Time Peer-to-Peer Snake Game
Sienna Wood

Peer-to-peer architectures offer several intriguing advantages over the client-server model, but they also bring challenges. Ouroboros is a real-time, fast-paced, in-browser, peer-to-peer snake game that was created to explore solutions to the challenges of P2P gaming. Peer connections are established over WebRTC, and data is exchanged between peers using an unreliable, UDP-like protocol. To ensure eventual consistency of game state among peers, our game utilizes a state-based, conflict-free replicated data type (CRDT). Users broadcast snapshots of their local state to peers, who incorporate these snapshots into local data structures with a merge function that is idempotent, commutative, and associative. Our fast-but-unreliable transport protocol guarantees neither packet delivery nor packet order, so peer messages necessarily include data redundancy, making our CRDT a variation of a Delta CRDT. We further adapt our CRDT for our use case by purging old data, which can introduce discrepancies across peers but only in data that is no longer relevant to gameplay. Local predictions improve user experience when peer data is missing, but are not incorporated into the canonical game state, allowing fast convergence with minimal computation when predictions and peer data differ.

Agenda
6:00pm — Event begins with networking and pizza
6:30pm — Talk #1
7:15pm — Talk #2
8:00pm — Beers and drinks nearby (TBD)

Event organizers
  • Boulder JS

    We love JavaScript. If you even like JavaScript, or are maybe just interested in learning more, come here about the latest and greatest libraries and strategies in the world of JS! These are fascinating times for JavaScript development, and this group explores topics including, but by no means limited to: * the power of raw JavaScript;  * libraries like React, Redux, Angular, Ember, Elm, and beyond;  * techniques for building your own library;  * server-side JavaScript with Node.js;  * optimization techniq

    Recent Events
    More

Are you organizing June Meetup?

Claim the event and start manage its content.

I am the organizer
Social
Rating

based on 0 reviews