Presentation is loading. Please wait.

Presentation is loading. Please wait.

Applying Real-time Simulation to Real-time Collaboration Bart Miller.

Similar presentations


Presentation on theme: "Applying Real-time Simulation to Real-time Collaboration Bart Miller."— Presentation transcript:

1 Applying Real-time Simulation to Real-time Collaboration Bart Miller

2 Overview Motivation Real-time multiplayer simulation Real-time collaboration GroupDraw Application GroupDraw Protocol Demo/Questions

3 Motivation Multiplayer action games provide responsive, fair simulations across unreliable networks User experience critical for adoption of real-time collaboration Can I apply techniques taken from simulation to collaboration?

4 Real-time Multiplayer Simulation Create a shared environment Environment affected by user input User expects to provide input and see the result of that input rendered onto screen

5 Real-time Multiplayer Simulation Entities o Player vs. non-player o Set of metrics (Position, Health, Ammo) Rules o Movement o Damage Divide time into discrete intervals, Ticks World State, Client State Action

6 Real-time Multiplayer Simulation Client-server design (Synchronous model) o Client simulation loop 1. Gather input, Send input as Actions 2. Receive World State information from server 3. Update Client State 4. Graphically Render World State o Server simulation loop 1. Receive Actions from Clients 2. Consolidate Actions from Clients Conflict resolution 3. Simulate world (generates World State) 4. Send World State snapshot to each Client

7 Real-time Multiplayer Simulation Problems with Synchronous Model o Network interface is the constraining resource  Bandwidth, latency o Latency is unpredictable  Unfair Solution o Buffer input and network traffic o Loop becomes a set of timers  Network send (lowest frequency)  Poll input (in-between)  Simulate (highest frequency)

8 Real-time Multiplayer Simulation

9 Real-time Collaboration Allows multiple users to edit a single file simultaneously Manage access to the file using a Journal Storage System o Server becomes Journal Storage Manager  Log version history of the file Set of Actions  Commitment process resolves conflicts Text data o Series of fixed-length character values o Action data contains location, character buffer

10 GroupDraw Application Client-server program Written in C# Clients share a common canvas Action contains o Player Id o Tick Number o Point Data (X,Y) Timer Periods o Send: 50ms o Input: 33ms o Simulate: 15ms (~67TPS)

11 GroupDraw Protocol Hybrid Protocol o TCP for reliability, latency independent information o UDP for data stream, lowest latency  Reliability, ordering handled by the application, snapshot data acknowledged by the client  No fragmentation TCP Methods o Connect, Disconnect o Join, Leave UDP Methods o AddData, ReceiveData, FullUpdate

12 Demo/Questions Any Questions?


Download ppt "Applying Real-time Simulation to Real-time Collaboration Bart Miller."

Similar presentations


Ads by Google