Implementing a Rewindable Instant Replay System for Temporal Debugging. Mark Wesley Lead Gameplay Programmer 2K Marin

Similar documents
Digital Audio and Video Data

GPU Architecture. Michael Doggett ATI

DVR GUIDE. Using your DVR/Multi-Room DVR WAVE-123 wavebroadband.com

Q. Can an Exceptional3D monitor play back 2D content? A. Yes, Exceptional3D monitors can play back both 2D and specially formatted 3D content.

Multi-GPU Load Balancing for Simulation and Rendering

Recent Advances and Future Trends in Graphics Hardware. Michael Doggett Architect November 23, 2005

Introduction to Final Cut Pro 7 - Editing Basics

What games are available for streaming?

Technical document. Group 3 Mate Tomin Pieter van Ede Raymond Weijermars Daniel Faustino Stefan Hospes

Beginning Android 4. Games Development. Mario Zechner. Robert Green

NetVu. App for Android TM. Installation & Usage Guide

Video Game Programming ITP 380 (4 Units)

Shader Model 3.0. Ashu Rege. NVIDIA Developer Technology Group

Storing Measurement Data

Introduction Computer stuff Pixels Line Drawing. Video Game World 2D 3D Puzzle Characters Camera Time steps

Cross-channel protection GSelector s exclusive cross-station protection prevents the same song from playing at the same time across your stations.

Hauppauge Capture. Copyright 2013 Hauppauge Computer Works

Welcome to JT Fibre. All you need to know about your new next generation Broadband

Guideline for stresstest Page 1 of 6. Stress test

CS 4620 Practicum Programming Assignment 6 Animation

Grid Computing for Artificial Intelligence

Wednesday, March 30, 2011 GDC Jeremy Ernst. Fast and Efficient Facial Rigging(in Gears of War 3)

PRODUCING DV VIDEO WITH PREMIERE & QUICKTIME

Video, film, and animation are all moving images that are recorded onto videotape,

Using Impatica for Power Point

Develop Computer Animation

Big Sandy Broadband DVR Guide

a basic guide to video conversion using SUPER

Dazzle. Digital Video Creator 100 User s Guide

Using Text & Graphics with Softron s OnTheAir CG and OnTheAir Video

Moxi Whole Home HD DVR QUICK REFERENCE GUIDE

Fundamentals of Real-Time Camera Design. Mark Haigh-Hutchinson Senior Software Engineer Retro Studios, Inc.

CAs and Turing Machines. The Basis for Universal Computation

Getting Started with the Skillsoft Learning App

Using Windows Movie Maker a simple guide

Anime Studio Debut vs. Pro

RingCentral for Desktop. UK User Guide

Optimizing AAA Games for Mobile Platforms

VidyoDesktop Media Player Quick Reference Guide

Test Specification. Introduction

Bachelor of Games and Virtual Worlds (Programming) Subject and Course Summaries

Pattern Insight Clone Detection

Fundamentals of Computer Animation

SweetPea3R-200 User Guide Version 1.1

Digital Video Recorder Client and Network Manual V1.1 Table of Contents

Temporal Sampling and Interpolation

Game Development in Android Disgruntled Rats LLC. Sean Godinez Brian Morgan Michael Boldischar

Narrow Bandwidth Streaming Video Codec

The Car Tutorial Part 1 Creating a Racing Game for Unity

Set up and using the WinTV v7 application with HD PVR 2

Quick user guide for the Vista Quantum 960H range of DVRs, models included

Moven Studio realtime. streaming

Intro to the Art of Computer Science

How is EnSight Uniquely Suited to FLOW-3D Data?

Choosing a Computer for Running SLX, P3D, and P5

MEDIA SHARE Set Up Guide for PCs with Windows XP

Lesson 0 - Introduction to Playstation 3 programming

Rational Application Developer Performance Tips Introduction

Getting the Complete Picture on SQL Server Database Performance

What s New in Centrify DirectAudit 2.0

TechniSat HDFS Satellite HD Digital Receiver. USB Recorder Instructions

Rethinking SIMD Vectorization for In-Memory Databases

VRM Monitor. Online Help

File System Management

U.Rahamathunnisa 1, S. Pragadeeswaran 2 *Assistant Professor, SITE, VIT University, Vellore. **MS(SE) Student, SITE, VIT University, Vellore.

SMS (Server Management Software) Digital Video Recorder. User s Manual

Manual Tester s Guide to Automated Testing Contents

Blender 3D Animation

Getting Started With the Multi-Room DVR System

MP3 Player CSEE 4840 SPRING 2010 PROJECT DESIGN.

Copyright Kinoma Inc. All rights reserved.

Local Playback Software User Manual (V2.0)

Broken Shard. Alpha Report. Benjamin Schagerl, Dominik Dechamps, Eduard Reger, Markus Wesemann. TUM Computer Games Laboratory

Data Analysis Software

SHOOTING AND EDITING DIGITAL VIDEO. AHS Computing

IMGD 1001: The Game Art Pipeline

WEB, HYBRID, NATIVE EXPLAINED CRAIG ISAKSON. June 2013 MOBILE ENGINEERING LEAD / SOFTWARE ENGINEER

Lazy OpenCV installation and use with Visual Studio

NEC s SonicView IP Recorder Release Notes. Version 1.2. Release Notes

What is LOG Storm and what is it useful for?

ACADEMIC TECHNOLOGY SUPPORT

Christopher Seder Affiliate Marketer

Frequently Asked Questions: EMC UnityVSA

Technical Overview of Morae : Usability testing software with insight you can share

Game Design From Concepts To Implementation

SQL Server 2008 is Microsoft s enterprise-class database server, designed

x64 Servers: Do you want 64 or 32 bit apps with that server?

After Effects CS4. Getting Started. Getting Started. Essential Training Introduction

Page 18. Using Software To Make More Money With Surveys. Visit us on the web at:

Fusion's runtime does its best to match the animation with the movement of the character. It does this job at three different levels :

ivms-4500 (Android Tablet) Mobile Client Software User Manual (V3.0)

NetClient software user manual

Release Notes LS Retail Data Director August 2011

Transcription:

Implementing a Rewindable Instant Replay System for Temporal Debugging Mark Wesley Lead Gameplay Programmer 2K Marin

Talk contents: What is a Rewindable Replay system? How to implement one for debugging How to use it How to make it shippable Questions

But first, a quick intro to me I ve worked on a bunch of games

Several of those included Replay of some form Mysterious Current Project

Some as a feature in the final game. Burnout: Rewindable Crash Replays Deterministic Race Replays Skate Trilogy: Rewindable Video Replays

Some as a non-shipping feature added purely to aid development. Mysterious Current Project

What is Rewindable Replay It s Rewindable It is NOT determinstic Replay Requires no determinism, therefore: It is extremely robust It is far more useful

What is Rewindable Replay Video-style replay As seen in many sports games Like a VCR/PVR attached to your game. BUT you can: Move the camera around Enable debug info

If a picture paints a 1000 words Then how about a video? Note: I cannot show our game at this time Ported code back to Unreal 3 in 1 hour http://youtu.be/x1rgetc3btc

Sounds expensive to make? To make it shippable, yes But for a dev only version, no For internal use only Doesn t have to be pretty Easier to find some spare memory

Development time Basics can be done in 2 days Debug Draw and Persistent Entities A complete version in just 1-2 weeks Skeletal meshes, Temporary Entities Will pay for itself very quickly

Implementation (Recording) Circular Buffer of frames (e.g. last 900 frames =30s @ 30fps) Store all debug draw In minimal form E.g. As a Sphere or AABB not as lots of lines Store data on relevant game entities

Minimize Memory Usage Use compressed / compacted structures: Store 3D vectors as 3 floats (not SIMD Vec4s) Store orientations as compressed quaternions Store debug text in 8 bit (not wide) chars Store bools as bitfields / bitmasks Pack everything together A Bit Stream read/writer can be handy

Storing Debug Draw Merge nearby 3D text into paragraphs Clamp max debug draw per frame But flag the frame as being overbudget Keep large static stuff out of replay E.g. Navmesh, Collision meshes, etc. Just draw them live

Storing Entities For relevant entities: Need a fast way of iterating over these Store: A unique ID (e.g. { Ptr, SpawnTime }) 3D Transform Bones for skeletal meshes (optional) Any other important display info (e.g Damage )

Store Game Camera In-game camera transform Useful for debugging camera Shows game from user s perspective Allow use of manual cam too

Implementation (Playback) Pause the game simulation For the current frame: Render that frame s debug draw Use the stored transforms for each entity Allow scrubbing / rewind / fast forward

Implementation (Playback) Entities (re-use those in paused sim): Render using data from the replay For sub-frame blending: Find matching entity in neighboring replay frame Interpolate data as appropriate Slerp quaternions Lerp vectors

Short Entity Lifetimes (1) Entity didn t exist at 1 st frame of replay? Was spawned during replay Exists at end (so in current simulation) If not stored in current frame - don t draw it

Short Entity Lifetimes (2) Entity unspawned before end of replay: There s no entity to reuse Show a debug draw representation Re-create entity (using the same mesh) Harder if you already unloaded the assets Re-use a similar asset?

Replay what is it good for? Combine with good in-game diagnostics E.g. Lots of Debug Draw Temporal Debugging Anything that occurred in the past Understanding how things change over time

Replay what is it good for? Temporal Debugging examples: AI decision making, pathfinding, etc. Physics collisions / reactions Gameplay actions Animation Multiplayer replication

Vs. Traditional debugging tools Visual Studio etc. Good for low-level debugging Terrible for higher-level debugging Slow to get a bigger picture view Only show the now Very unfriendly for non-programmers Particularly poor with optimized code

Vs. Traditional debugging tools Log Files / TTY Provide a partial history of what happened Hard to: Parse hundreds of pages of these Visualize game state in 3D Associate with in-game

Gameplay debugging advice Use higher level tools / viewers! E.g. a Video Replay System.

Debugging Example http://youtu.be/juptgeszm4o

Memory usage Anything > 1MB can give a useful replay To find more memory: On PC you probably have plenty. On Consoles Use the extra devkit memory Only store a small buffer, stream the rest to disk or over the network to your PC.

If you re still short of memory Store less stuff Compress / Quantize data Store only every N frames Can be variable, and on a per entity basis Does add a lot of complexity

Useful Extensions Debug draw channels E.g. AI, Physics, Animation Always stored, but only displayed as required Serialize entire entity Less reliant on debug draw Can allow for lower-level debugging too

Useful Extensions Continued Save / Load replays Attach to bug reports etc. Great for hard/slow to repro issues Export replays live to an external viewer Provide a better GUI outside of game

If you wanted to ship it Someone will always request this It is quite a lot more work Replaying everything (particles + audio) Fitting in retail memory Robust manual camera (with collision) Nice GUI

If you still wanted to ship it Design it in from the start Use stateless parametric particle effects Plan for the memory overhead Plan for how you spawn / unspawn entities Plan for how you stream assets Plan for how you submit your render data

Replaying Particles If you don t have a parametric system Fake it by: Storing start and end markers Playing effect forwards by abs(deltatime) http://youtu.be/bzwdpokp80k

Any Questions? Slides and contact information available at: www.markwesley.com