Peer-to-Peer Architecture

Similar documents
Centralized Server Architecture

Low Latency and Cheat-proof Event Ordering for Peer-to-Peer Games

CMSC 425: Lecture 23 Detecting and Preventing Cheating in Multiplayer Games

Local Perception Filter

Datakom II Seminar Lecture 2005 Erik Nordström

Distributed Slap Jack

Taking your game online: Fundamentals of coding online games

Efficient Methods for Improving Scalability and Playability of Massively Multiplayer Online Game (MMOG)

By Jeremy Brun, Farzad Safaei, and Paul Boustead NETWORKED GAMES

The Human Factors of Consistency Maintenance in Multiplayer Computer Games

SandBox Wars. Game Draft

Gaming Security. Aggelos Kiayias

the gamedesigninitiative at cornell university Lecture 10 Game Architecture

A Distributed Architecture for Massively Multiplayer Online Games

8 Frames in 16ms. Michael Stallone Lead Software Engineer Engine NetherRealm Studios

CS 354R: Computer Game Technology

Multiplayer Game Design and Development CSC 631/831. Lecture 1 Spring 2016

Efficient Methods for Improving Scalability and Playability of Massively Multiplayer Online Game (MMOG)

Play Patterns for Path Prediction in Multiplayer Online Games

Distributed Systems. Time Synchronization

Multi-Channel Charge Pulse Amplification, Digitization and Processing ASIC for Detector Applications

Stress Testing the OpenSimulator Virtual World Server

CS 457 Lecture 16 Routing Continued. Spring 2010

MATKA. Foreword. 1. Event Rules

Favorite problems from the UWM Math Circle. Gabriella Pinter Department of Mathematical Sciences University of Wisconsin-Milwaukee

Watchmen: Scalable Cheat-Resistant Support for Distributed Multi-Player Online Games

Game Server Selection for Multiple Players

Ultra-Low Duty Cycle MAC with Scheduled Channel Polling

CS649 Sensor Networks IP Lecture 9: Synchronization

Fairness and playability in online multiplayer games

Distributed Virtual Environments!

2 The Universe Teachpack: Client/Server Interactions

Saturday Morning Math Group October 27, Game Theory and Knowing about Knowledge PACKET A

Bellairs Games Workshop. Massively Multiplayer Games

ANT Channel Search ABSTRACT

AS-MAC: An Asynchronous Scheduled MAC Protocol for Wireless Sensor Networks

CS 787: Advanced Algorithms Homework 1

DESIGN AND IMPLEMENTATION OF OPTIMISTIC CONSTRUCTS FOR LATENCY MASKING IN ONLINE VIDEO GAMES

Chapter 4. Pipelining Analogy. The Processor. Pipelined laundry: overlapping execution. Parallelism improves performance. Four loads: Non-stop:

Match+Guardian: A Secure Peer-to-Peer Trading Card Game Protocol

Fine-grained Channel Access in Wireless LAN. Cristian Petrescu Arvind Jadoo UCL Computer Science 20 th March 2012

Mobile Multiplayer Real-time Games over Wireless Networks

EPISODE 478 [0:00:00.3] JM:

Today's Lecture. Clocks in a Distributed System. Last Lecture RPC Important Lessons. Need for time synchronization. Time synchronization techniques

HOW SELF-ASSERTIVE ARE YOU?

IMPROVING SCALABILITY IN MMOGS - A NEW ARCHITECTURE -

Fair Division Worksheet Day 3. Warm-up 1. To cut a string into 2 pieces, how many times must it be cut?

How to Design Your Coaching Program in 48 Hours or Less. Sean Mize

An introduction to software development. Dr. C. Constantinides, P.Eng. Computer Science and Software Engineering Concordia University

Programming with network Sockets Computer Science Department, University of Crete. Manolis Surligas October 16, 2017

Global State and Gossip

Ep #23: Cheat Days. Hi! How's it goin'? Great? Good. Then let's jump right into today's topic. Cheat days.

Ch. 11 Analyzing Playability vis a vis QoS Parameters

Programming Exam. 10% of course grade

CS 354R: Computer Game Technology

The Sorcerer s Chamber

Analysis and Implementation of Scalable Clock Synchronization Protocols in IEEE Ad Hoc Networks

Chapter 16 - Instruction-Level Parallelism and Superscalar Processors

FPGA-2012 Pre-Conference Workshop: FPGAs in 2032: Challenges and Opportunities

Consistency Maintenance for Multiplayer Video Games

MAKING IT HAPPEN YOUR HARBOR REGIONAL CENTER SERVICE COORDINATOR

Burst Mode Technology

Suggested Readings! Lecture 12" Introduction to Pipelining! Example: We have to build x cars...! ...Each car takes 6 steps to build...! ! Readings!

SETUP. Remove Extra Cards. Infect Wolf Zero. Set Aside Night Cards

Achieving Network Consistency. Octav Chipara

Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted from Hennessy & Patterson / 2003 Elsevier

Solution: Alice tosses a coin and conveys the result to Bob. Problem: Alice can choose any result.

Lecture on Sensor Networks

Comparison between Preamble Sampling and Wake-Up Receivers in Wireless Sensor Networks

CANopen Programmer s Manual Part Number Version 1.0 October All rights reserved

COMMONLY ASKED QUESTIONS About easyfreeincome.com system

Candidate Interview Preparation

Betsy Braziel Burkhart Communication and Media Director Contra Costa County November 2, 2016

CMP 301B Computer Architecture. Appendix C

A Study of Optimal Spatial Partition Size and Field of View in Massively Multiplayer Online Game Server

Age of Empires 2: Forgotten Empires Tournament Rules. by ForTheSwarm March 16, 2018

In this project, you will create a memory game where you have to memorise and repeat a sequence of random colours!

System Audit Checklist

Minecraft Redstone. Part 1 of 2: The Basics of Redstone

CS 4700: Foundations of Artificial Intelligence

RoboMind Challenges. Line Following. Description. Make robots navigate by itself. Make sure you have the latest software

Constructing Client-Server Multi-Player Asynchronous Networked Games Using a Single-Computer Model

Lecture 3: Modulation & Clock Recovery. CSE 123: Computer Networks Stefan Savage

olsr.org 'Optimized Link State Routing' and beyond December 28th, 2005 Elektra

Rules. Aim of the game For the villagers: to kill the werewolves. For the werewolves: To kill the villagers. The Cards :

Online Games what are they? First person shooter ( first person view) (Some) Types of games

PRODUCT DEMODULATION - SYNCHRONOUS & ASYNCHRONOUS

Channel Concepts CS 571 Fall Kenneth L. Calvert

The counterpart to a DAC is the ADC, which is generally a more complicated circuit. One of the most popular ADC circuit is the successive

Energy-Efficient Gaming on Mobile Devices using Dead Reckoning-based Power Management

Minnesota Department of Transportation Rural Intersection Conflict Warning System (RICWS) Reliability Evaluation

A digital story is a short digital video that combines your voiceover, photos, video clips, and music to tell a true story from your own life.

Frequently Asked Questions ConnexRF Products

Diffie-Hellman key-exchange protocol


No one ever complained about having too much fun.

Instruction Level Parallelism Part II - Scoreboard

5- STEP BEACHBODY CHALLENGE GROUP INVITATION PROCESS

BOOKED JOSH TURNER SUMMARY BY PAUL CLEGG

is Echo and I am just Except I come from a tiny purple planet called Fizzix, which is 100 light years past the Moon.

Transcription:

Peer-to-Peer Architecture 1

Peer-to-Peer Architecture Role of clients Notify clients Resolve conflicts Maintain states Simulate games 2

Latency Robustness Conflict/Cheating Consistency Accounting Scalability Complexity 3

Lower Latency No Single Point of Failure 4

MiMaze from INRIA, France 5

Age of Empire Series http://compactiongames.about.com/library/games/screenshots/blscreens-ageofkings.htm 6

Without a server with authority, we can easily get into inconsistent states. Player A Player B Player C 7

Problem: order of messages received are wrong. Player A Player B Player C 8

Idea: If we synchronize the clocks of all players and timestamp each message, we can know the right order of execution. Player A Player B Player C 9

Problem: When to execute? (Is there another message generated earlier than this that is still on its way here?) Player A Player B Player C 10

(old) Idea: Delay processing of messages 11

Bucket Synchronization 12

Make the game into a turn-based game.. 13

.. with very fast turns. 14

The game is divided into rounds (e.g. 25 rounds per second). Player A Player B Player C 15

Players are expected to send an update in each round (e.g. 25 updates per second). Player A Player B Player C 16

(and therefore is only suitable if we have a small number of players..) 17

Players are expected to send an update in each round (e.g. 25 updates per second). Player A Player B Player C 18

Every round has a bucket that collects the update messages. Player A Player B Player C 19

Messages generated in the same rounds goes into the same bucket of a future round. Player A Player B Player C 20

We know which rounds a message is generated based on time-stamp. Player A Player B Player C 21

When it is time to execute a round, the messages in the bucket is processed (in order of time-stamp). Player A Player B Player C 22

Which future bucket to go into depends on the latency among the players. (Hopefully not too far in the future else responsiveness will suffers). Player A Player B Player C 23

If messages from another player is lost (or late), we can predict its update (e.g. using dead reckoning) when possible. Player A Player B Player C 24

Inconsistency still arises due to prediction. 25

Alternative is to ensure every update is received before executing the bucket. Player A Player B Player C 26

Stop-and-Wait Protocol 27

Synchronized Simulations 28

Every player sees exactly the same states (but maybe at different time) 29

Players can tell each other their processing time and latency among players, so that turn length and lag can be adjusted. 30

Cheating 31

Look-Ahead Cheat 32

Player C (or a bot) can peek at A s and B s actions first, before deciding his/her moves. Player A Player B Player C 33

Dealing with cheaters: 1. Prevent cheats (hard) 2. Detect cheats (easier) 34

Detecting Look- Ahead Cheats 35

Mmm... player C always the last one that make its move 36

Time-stamp Cheat 37

Player C (or a bot) can put in an earlier timestamp in its messages. Player A Player B Player C 38

Suppress-Update Cheat 39

If dead reckoning is used, Player C can stop sending update and let others predict its position. C then sends an update at appropriate time to surprise other players. Player A Player B Player C 40

A C 41

C stops sending update. A predicts C s position. A 42

C stops sending update. A predicts C s position. A 43

C stops sending update. A predicts C s position. A 44

C sends an update and shoots A. A 45

Not me! My packets Cheater! were dropped.. 46

Cheat-Proof Protocol 47

Lock Step Protocol 48

One-Way Function f: Given x, we can compute f(x) easily. Given f(x) it s hard to find out x if x is random. 49

Lock Step Protocol 50

Two stages needed for each round of stopand-wait updates. Stage 1. Everyone decides on its move x, and send f(x) to each other. Player A Player B Player C 51

Stage 2. After f(x) from every other player is received, sends x to each other. Player A Player B Player C 52

How does lock-step prevent: look ahead cheat? timestamp cheat? suppress-update cheat? 53

f(x) is known as commitment to x. A player, once committed to its move, can t change it. 54

Problem: Lock-step protocol is slow. 55

Idea: Use Interest Management Players only engaged in lock-step protocol when they influence each other. Otherwise their games proceed independently. 56

This is known as Asynchronous Synchronization or Asynchronous Lock-step 57

Let s call the two stages in lock-step protocol as commit and reveal stages. Commit Reveal Player A Player B Player C 58

We may also stagger these two stages to improve responsiveness. Multiple commitments can be sent out before we reveal the actions. Player A Player B Player C 59

1. A player can reveal its action in round i once it receives all commitment of round i from other players. Player A C1,A M1,A Player C C1,C M1,C 60

2. A player can make p moves (send p commitments) without engaging in lockstep. C4,A Player A C1,A C2,A M1,A Player C C1,C C2,C M1,C C4,C 61

This is known as Pipelined Lock-step 62

lmax = maximum latency rmax = maximum frame (round) rate Lockstep Protocol 1/r = max{2lmax, 1/rmax} 63

lmax = maximum latency rmax = maximum frame (round) rate Pipeline Lockstep Protocol 1/r = max{2lmax/p, 1/rmax} 64

lmax = maximum latency rmax = maximum frame (round) rate We can pick optimal p as p = 2 lmax rmax 65

Cheating in Pipelined Lock-step 66

C makes its 4-th move after seeing the first p moves from A. A s first six moves is not based on C s move. C4,A Player A C1,A C2,A M1,A C4,C Player C C1,C C2,C M1,C 67

C makes its 4-th move after seeing the first p moves from A. A s first six moves is not based on C s move. C4,A Player A C1,A C2,A M1,A Player C C1,C C2,C M1,C C4,C 68

But it s fair if all players do the same. C1,A C2,A M1,A C4,A C1,C C2,C M1,C C4,C 69

Player C can t peek at extra moves if C4,C is received within 2lAC of sending M1,A 2lAC C1,A C2,A M1,A C1,C C2,C M1,C C4,C 70

We can detect late commit if we know the latency between players. 2lAC C1,A C2,A M1,A C1,C C2,C M1,C C4,C 71

lmax = maximum latency rmax = maximum frame (round) rate Pipeline Lockstep Protocol (without late commit) 1/r = max{lmax/p, 1/rmax} p = lmax rmax 72

Player can lie about latency! 73

C can pretend to be on a slow network when measurement of lac is done (e.g. using ping). Fake 2lAC Actual 2lAC C1,A C2,A M1,A C1,C C2,C M1,C C4,C 74

If fake lac is larger than lmax, then we increase p, limiting the cheat to one round. Fake 2lAC Actual 2lAC C1,A C2,A M1,A C1,C C2,C M1,C C4,C 75

You Are Here CS4344 Client/Server Architecture Synchronization Protocols Interest Management Peer-to-Peer Architecture Cheat-proof Synchronization Protocol 76