Replicating Chaos Vehicle Replication in Watch Dogs 2. Matt Delbosc Team Lead Programmer Ubisoft Toronto

Similar documents
Distributed Collision Detection. Tom Chen Project Presentation: Comp522 School of Computer Science McGill University December 13, 2008

Computer Graphics. Spring Feb Ghada Ahmed, PhD Dept. of Computer Science Helwan University

What s new in SketchUp Pro?

SPARTAN ROBOTICS FRC 971

Motion Capture & Simulation

Overview. Animation is a big topic We will concentrate on character animation as is used in many games today. humans, animals, monsters, robots, etc.

CS 480: GAME AI STEERING BEHAVIORS. 4/12/2012 Santiago Ontañón

CS 378: Computer Game Technology

Character Animation 1

Character Animation. Presented by: Pam Chow

Graphs, Search, Pathfinding (behavior involving where to go) Steering, Flocking, Formations (behavior involving how to go)

CS 387/680: GAME AI MOVEMENT

CS 387/680: GAME AI MOVEMENT

Technical Game Development II. [using materials provided by Mark Claypool] IMGD 4000 (D 08) 1. What is game physics and why is it important?

Positional Motion Profiling for FRC

Creating Loopable Animations By Ryan Bird

WHAT IS AN INTERNET BACKBONE? And what makes a good one?

Lecture VI: Constraints and Controllers

AND WHAT MAKES A GOOD ONE?

Designing a Self-Calibrating Pipeline for Projection Mapping Application. Kevin Wright Kevin Moule

Normal Maps and Cube Maps. What are they and what do they mean?

Cloth Simulations. 9.2 Physics - Cloth Simulations

Blending & State Machines. CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2017

Integrating Physics into a Modern Game Engine. Object Collision. Various types of collision for an object:

AN100 v1.4. EtherCAT network synchronization. Distributed clocks

A Protocol for Distributed Collision Detection

CS248. Game Mechanics

Networking Presented by: Marcin Chady

A Different Approach for Continuous Physics. Vincent ROBERT Physics Programmer at Ubisoft

Under the Guidance of

LET S FOCUS ON FOCUSING

Conemarching in VR. Johannes Saam Mariano Merchante FRAMESTORE. Developing a Fractal experience at 90 FPS. / Framestore

Introduction to Real-Time Communications. Real-Time and Embedded Systems (M) Lecture 15

ò Server can crash or be disconnected ò Client can crash or be disconnected ò How to coordinate multiple clients accessing same file?

Networked Virtual Environments and Distributed Rendering IGS HT Background and history. Background and history. Background and history

Improving autonomous orchard vehicle trajectory tracking performance via slippage compensation

NFS. Don Porter CSE 506

Selection and Integration of Sensors Alex Spitzer 11/23/14

CSE 123A Computer Networks

Zero Launch Angle. since θ=0, then v oy =0 and v ox = v o. The time required to reach the water. independent of v o!!

Data-Intensive Distributed Computing

Karen Liu associate professor at School of Interactive Computing. Murali Varma graduate student at School of Interactive Computing

Senior Project Write Up

13 Working with PID/PID2 blocks In this chapter

AVOID DISTRACTIONS WHILE DRIVING

2QWKH6XLWDELOLW\RI'HDG5HFNRQLQJ6FKHPHVIRU*DPHV

CS5412: TRANSACTIONS (I)

Traffic/Flocking/Crowd AI. Gregory Miranda

1. With respect to space, linked lists are and arrays are.

A simple example. Assume we want to find the change in the rotation angles to get the end effector to G. Effect of changing s

High-density Crowds. A masters student s journey to graphics and multi agent systems

Google File System, Replication. Amin Vahdat CSE 123b May 23, 2006

NoSQL systems: sharding, replication and consistency. Riccardo Torlone Università Roma Tre

Designing the look and feel for Smoke and Neon powers The creation of a new toolset and pipeline for I:SS Pros and cons from our new workflow and

game engines cisc3660 game programming fall 2012 lecture # IV.1

Animation. Itinerary. What is Animation? What is Animation? Animation Methods. Modeling vs. Animation Computer Graphics Lecture 22

Lecture VI: Constraints and Controllers. Parts Based on Erin Catto s Box2D Tutorial

Animation. Itinerary Computer Graphics Lecture 22

peer) Poorly-connected hosts subscribe to a forwarding server packet compression and aggregation altering visual and temporal perceptions

two using your LensbAby

T O B C A T C A S E E U R O S E N S E D E T E C T I N G O B J E C T S I N A E R I A L I M A G E R Y

Rendering: Reality. Eye acts as pinhole camera. Photons from light hit objects

Overview. Background: Sybil Attack. Background: Defending Against Sybil Attack. Social Networks. Multiplayer Games. Class Feedback Discussion

Technical Game Development II. [some material provided by Mark Claypool] IMGD 4000 (D 10) 1. computing motion of objects in virtual scene

Player 2 has joined the game

ROSE-HULMAN INSTITUTE OF TECHNOLOGY

CS 354 R Game Technology

IPv6 Neighbor Discovery (ND) Problems with Layer-2 Multicast State

Robotics (Kinematics) Winter 1393 Bonab University

A Longitudinal Control Algorithm for Smart Cruise Control with Virtual Parameters

DSRC Field Trials Whitepaper

DELTA TAU Data Systems, Inc.

Rigid Body Transformations

Cohda Wireless White Paper DSRC Field Trials

Game Development for

GPS/GIS Activities Summary

EDSMAC TUTORIAL. Description

E19 Final Project Report Liquid Pong Simulation. E.A.Martin, X.D.Zhai

Technical Game Development II. [some material provided by Mark Claypool] IMGD 4000 (D 11) 1. computing motion of objects in virtual scene

Robotics Project. Final Report. Computer Science University of Minnesota. December 17, 2007

8.3 Networked Application. History and Evolution. U.S. Department of Defense (DoD) SIMNET NSA. i. Object-Event Architecture

Distributed File Systems. Directory Hierarchy. Transfer Model

Pong in Unity a basic Intro

Coordinate System Techniques

Three Types of Probability

Animation. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 4/23/07 1

LECTURE 7. Announcements

Distracted Driving. Applicable Regulations. Introduction/Overview

Distributed Systems. 05. Clock Synchronization. Paul Krzyzanowski. Rutgers University. Fall 2017

Applications. Systems. Motion capture pipeline. Biomechanical analysis. Graphics research

Blender Animation Editors

LECTURE 6. Announcements

Advanced 3D Game Programming with DirectX* 10.0

Commercial Vehicle Safety Alliance DISTRACTIVE DRIVING

Bonus Ch. 1. Subdivisional Modeling. Understanding Sub-Ds

adobe after effects training. For the staff of CHUM Television, a recap of the after effects interface, from March 6th and 7th, 2006.

Big Data Infrastructure CS 489/698 Big Data Infrastructure (Winter 2017)

Thoughts on Quality of Service for NDN/CCNstyle ICN protocol architectures

Megastore: Providing Scalable, Highly Available Storage for Interactive Services & Spanner: Google s Globally- Distributed Database.

GFS: The Google File System

Transcription:

Replicating Chaos Vehicle Replication in Watch Dogs 2 Matt Delbosc Team Lead Programmer Ubisoft Toronto

Network architecture 4-player peer-to-peer No single server Lots of entities to replicate Distributed authority

Why are vehicles hard? They drive fast 100ms lag could mean 2-3m difference They collide with each other Lots of traffic in the Watch Dogs 2 open world The human eye is very sensitive to irregular velocities

What we will cover Debugging trajectories Standard techniques: Projective Velocity Blending ( with a twist ) Extrapolate and/or interpolate with Snapshot Buffers Dealing with collisions by blending with the physics simulation Some unsolved problems Future research directions

Trajectory Debugging Path Taken Snapshots Prediction

Projective Velocity Blending Maths from Wikipedia What this looks like

Turn Prediction Extrapolating a turning car with a straight line is not ideal We transmit the wheel steering angle But the vehicle physics simulation is complex Cannot predict an accurate turning trajectory from this We already transmit vehicle s position, velocity and angular velocity Use yaw from angular velocity to predict turn Doesn t work for drifting cars, but not an issue for our game

Snapshot Buffer Buffer snapshots and interpolate between last 2 Pro: More accurate trajectory Con: Rendering objects further back in time 5 Frames

Too much interpolation Rendering objects that are further back in time Master Replica Master Replica

Extrapolation vs Interpolation We don t have to interpolate Can still extrapolate from last received snapshot Introduce a time offset How far back in time do we render this car Look at (Current time) (Time offset): Time falls between received snapshots => interpolate Time ahead of last received snapshot => extrapolate Snapshots are timestamped

How it looks 3 Frames

Time Offset Choosing the time offset is not easy Too much interpolation causes missed collisions Too much extrapolation causes discontinuous trajectories Balance between the two Used (average measured lag) + (constant value) Damped Clamped at 300ms Constant value in the 100ms 200ms range Proportional to vehicle speed

Vehicle collisions Dead reckoned trajectories are now looking good Let s crash some cars

What happened? Both cars should stop, or push each other out of the way less forcefully Look at it frame-by-frame Internal tool to help with this

Can we solve this? The replica that pushed you doesn t know about the collision yet They will keep driving forward until a new packet arrives This is an unsolvable problem! No one has full authority over the collision Gee I wish I had a server

Physics Simulation Blending The collision has happened whether we like it or not Give local physics a chance to simulate the collision Then blend back into to the dead reckoned trajectory Tunable blend between two velocities: Velocity applied by the rigid body simulation Velocity to reach the dead reckoned position Representing something believable locally, then blend into snapshots that take the collision into account

Blend Factor Tuning Play out lots of collisions and choose what looks good Max blend factor to use while in a collision How quickly to go back to full dead reckoning afterwards 100% Dead Reckoned In Collision Car Bike 100% Local Physics 0 0.5 1 1.5 2 2.5 3 Elapsed Time (secs)

Collision Unpredictability Locally simulated collisions won t play out the same on both peers Blending replica out of locally simulated collision into dead reckoned trajectory could be jarring Before the collision starts, try to bring vehicles closer to their master positions Make them more likely to play out the same

Collision Prediction Predict imminent collisions and extrapolate more in those cases Unlikely to steer out of the way Use existing algorithm from AI systems

Unsolved Problems Some of many outstanding problems: Collisions with static geometry Time offset differences The uncanny valley

Static Collisions Static objects don t give way Trees are the worst! Some options: Stay out of position Soft physics collisions Teleport eventually Reducing jitters is the most important part

Different Time Offsets Pedestrians prefer interpolation Master Replica Replica Master Similar issue for breakables, but less gameplay impact

The Uncanny Valley Trajectories are correct, but it still doesn t feel right Minor weight shifts lost in replication Cars don t rotate around their centre of mass Human eye is sensitive to even minor inconsistencies Apply some post-process smoothing Smooth velocities and angular velocities, not positions / rotations Has to co-exist with Projective Velocity Blending

Future Investigations Machine-learning based algorithms Self-tweaking variables! Smoothing algorithms Kalman filters

Take-aways Debug your trajectories Record everything Somehow there is still a lot of art to this science

TODAY from 2PM to 3PM matt.delbosc@ubisoft.com