making (console) games in the browser

114
Making (console) games in the browser MIKE ACTON (INSOMNIAC GAMES) TWITTER @MIKE_ACTON

Upload: mike-acton

Post on 19-Aug-2014

3.205 views

Category:

Entertainment & Humor


3 download

DESCRIPTION

From HTML5 Developers Conference (22 May 2014) Making (console) games in the browser Insomniac Games has been making AAA console games with an in-house suite of browser-based tools for the last few years. This talk will be a whirlwind review of the architectural choices, lessons learned and and other tidbits picked up along the way in supporting multiple large production teams and titles. Talk will include notes on server design, mixing native code and javascript, asset databases and real boots-on-the-ground production trade-offs.

TRANSCRIPT

Page 1: Making (console) games in the browser

Making (console) games in the browserMIKE ACTON (INSOMNIAC GAMES)TWITTER @MIKE_ACTON

Page 2: Making (console) games in the browser
Page 3: Making (console) games in the browser

Started 2010…

Page 4: Making (console) games in the browser

Why?

Page 5: Making (console) games in the browser

Why?Native

VsBrowser

Page 6: Making (console) games in the browser

1. Inevitability

Page 7: Making (console) games in the browser

1. Inevitability2. UX and UI

Research

Page 8: Making (console) games in the browser

1. Inevitability2. UX and UI

Research3. Forcing function

(data separation)

Page 9: Making (console) games in the browser

…but mostly a

bet on the future

Page 10: Making (console) games in the browser

How do we use the browser?

Page 11: Making (console) games in the browser
Page 12: Making (console) games in the browser
Page 13: Making (console) games in the browser

Chrome only--harmony (ECMAScript 6)

Page 14: Making (console) games in the browser

Chrome only--harmony (ECMAScript 6)

:(

Page 15: Making (console) games in the browser

Model Editor

Page 16: Making (console) games in the browser

Vault

Page 17: Making (console) games in the browser

Anim Driver Editor

Page 18: Making (console) games in the browser

Build Monitor

Page 19: Making (console) games in the browser

Particle Editor

Page 20: Making (console) games in the browser

Material Editor

Page 21: Making (console) games in the browser

Script Editor

Page 22: Making (console) games in the browser

Run Game

Page 23: Making (console) games in the browser

Curve Editor

Page 24: Making (console) games in the browser

cinematic2

Page 25: Making (console) games in the browser

cinematic2game view (it *is* the game – running all update code)

Page 26: Making (console) games in the browser

cinematic2the outliner – shows everything in the cinematic

Page 27: Making (console) games in the browser

cinematic2sound panel – search / create favorites / audition events

Page 28: Making (console) games in the browser

cinematic2properties panel (for currently selected thing)

Page 29: Making (console) games in the browser

cinematic2timeline and playback control

Page 30: Making (console) games in the browser

cinematic2shots list (can be edited and rearranged)

Page 31: Making (console) games in the browser

cinematic2tracks list

Page 32: Making (console) games in the browser

performance editor

Page 33: Making (console) games in the browser

performance editor 3d view

Page 34: Making (console) games in the browser

performance editor clips in the performance set

Page 35: Making (console) games in the browser

performance editoranimation palette (expressions + gestures)

Page 36: Making (console) games in the browser

performance editor phoneme -> viseme map

Page 37: Making (console) games in the browser

performance editor timeline

Page 38: Making (console) games in the browser

performance editor phonemes (automatically generated)

Page 39: Making (console) games in the browser

performance editor expressions

Page 40: Making (console) games in the browser

performance editor gestures

Page 41: Making (console) games in the browser

What libs do we use?

Page 42: Making (console) games in the browser

What libs do we use?

Jquery (less and less)

Page 43: Making (console) games in the browser

What libs do we use?

Jquery (less and less) Angular.js (directives good; complexity/obfuscation bad)

Page 44: Making (console) games in the browser

What libs do we use?

Jquery (less and less) Angular.js (directives good; complexity/obfuscation bad) Q.js (good)

Page 45: Making (console) games in the browser

What libs do we use?

Jquery (less and less) Angular.js (directives good; complexity/obfuscation bad) Q.js (good) Require.js (good)

Page 46: Making (console) games in the browser

What libs do we use?

Jquery (less and less) Angular.js (directives good; complexity/obfuscation bad) Q.js (good) Require.js (good) Bootstrap (OK)

Page 47: Making (console) games in the browser

What libs do we use?

Jquery (less and less) Angular.js (directives good; complexity/obfuscation bad) Q.js (good) Require.js (good) Bootstrap (OK) WebGL? (no)

Page 48: Making (console) games in the browser

How do we put it together?

Page 49: Making (console) games in the browser
Page 50: Making (console) games in the browser
Page 51: Making (console) games in the browser

LunaServer

Native Application (C++) – mongoose server

Page 52: Making (console) games in the browser

LunaServer

Native Application (C++) – mongoose server RESTful (*ish) API

Page 53: Making (console) games in the browser

LunaServer

Native Application (C++) – mongoose server RESTful (*ish) API File I/O

Page 54: Making (console) games in the browser

LunaServer

Native Application (C++) – mongoose server RESTful (*ish) API File I/O P4 integration

Page 55: Making (console) games in the browser

LunaServer

Native Application (C++) – mongoose server RESTful (*ish) API File I/O P4 integration Session management

Page 56: Making (console) games in the browser

LunaServer

Native Application (C++) – mongoose server RESTful (*ish) API File I/O P4 integration Session management Undo/Redo

Page 57: Making (console) games in the browser

LunaServer

Native Application (C++) – mongoose server RESTful (*ish) API File I/O P4 integration Session management Undo/Redo File/Asset save/edit/revert

Page 58: Making (console) games in the browser

LunaServer

Native Application (C++) – mongoose server RESTful (*ish) API File I/O P4 integration Session management Undo/Redo File/Asset save/edit/revert System and configuration information

Page 59: Making (console) games in the browser

LunaServer

Native Application (C++) – mongoose server RESTful (*ish) API File I/O P4 integration Session management Undo/Redo File/Asset save/edit/revert System and configuration information Crash proofing

Page 60: Making (console) games in the browser
Page 61: Making (console) games in the browser

LunaServer (JSON)

Page 62: Making (console) games in the browser

LunaServer (JSON)

Page 63: Making (console) games in the browser

LunaServer (JSON)

Page 64: Making (console) games in the browser

DDLC

Compiler -> JSON, C++, etc.

Page 65: Making (console) games in the browser

DDLC

Compiler -> JSON, C++, etc. Node.js script (ejs)

Page 66: Making (console) games in the browser

DDLC

Compiler -> JSON, C++, etc. Node.js script (ejs) (used to be native application)

Page 67: Making (console) games in the browser

DDLC

Compiler -> JSON, C++, etc. Node.js script (ejs) (used to be native application) ddl.js (captures communication to lunaserver)

Page 68: Making (console) games in the browser

Vault

Page 69: Making (console) games in the browser

Delta JSON

Page 70: Making (console) games in the browser

Delta JSON

Page 71: Making (console) games in the browser

Delta JSON

Page 72: Making (console) games in the browser

Delta JSON

(undo/redo)

Page 73: Making (console) games in the browser

Model Editor

Page 74: Making (console) games in the browser

Data change -> ddl.js-> delta json

Page 75: Making (console) games in the browser

/api/save/asset/{assetType}/{assetId}

Page 76: Making (console) games in the browser

Current state, undo queue

Page 77: Making (console) games in the browser

Canonical asset change

Page 78: Making (console) games in the browser

Picks up change(triggers builder)

Page 79: Making (console) games in the browser
Page 80: Making (console) games in the browser

Requests native built file

Game (as client)

Page 81: Making (console) games in the browser

Polls for changes

Page 82: Making (console) games in the browser

What’s newer?

Page 83: Making (console) games in the browser

Node.js scripts

Page 84: Making (console) games in the browser
Page 85: Making (console) games in the browser

Shared code betweennode.js and browser

Page 86: Making (console) games in the browser

Node.js scripts

Game (JsonRPC)

Page 87: Making (console) games in the browser

Node.js scripts

Game (JsonRPC)

Game (RESTful server)

Page 88: Making (console) games in the browser

Node.js scripts

Game (JsonRPC)

Game (RESTful server)

Page 89: Making (console) games in the browser

Node.js scripts

Game (JsonRPC)

Game (RESTful server)

Game (as client)

Page 90: Making (console) games in the browser

FAQ#1File-backed vs DB assets

Page 91: Making (console) games in the browser

FAQ#2WebSockets

Page 92: Making (console) games in the browser

UI (javascript) guidelines

Page 93: Making (console) games in the browser

UI (javascript) guidelinesCustom controls

Page 94: Making (console) games in the browser

DDL (specific)

Custom controls

Page 95: Making (console) games in the browser

DDL (specific)

ddl.js

Custom rules specific to data (constraints)

Custom controls

Page 96: Making (console) games in the browser

DDL (specific) Control (Source)

ddl.js

Custom rules specific to data (constraints)

Custom controls

Page 97: Making (console) games in the browser

DDL (specific) Control (Source) Control (Widget)

ddl.js

Custom rules specific to data (constraints)

Custom controls

Page 98: Making (console) games in the browser

DDL (specific) Control (Source) Control (Widget)

Custom Control

Custom Control Group (Manager)

ddl.js

Custom rules specific to data (constraints)

Custom controls

Page 99: Making (console) games in the browser

DDL (specific) Control (Source) Control (Widget)

Custom Control

Custom Control Group (Manager)

ddl.js

Custom rules specific to data (constraints)

Custom controls

Page 100: Making (console) games in the browser

DDL (specific) Control (Source) Control (Widget)

Custom Control

Custom Control Group (Manager)

ddl.js

Custom rules specific to data (constraints)

Custom controls

Page 101: Making (console) games in the browser

DDL (specific) Control (Source) Control (Widget)

Custom Control

Custom Control Group (Manager)

ddl.js

Custom rules specific to data (constraints)

Custom controls

Node.js

Page 102: Making (console) games in the browser

UI (javascript) guidelinesEditing DOM

Page 103: Making (console) games in the browser

Editing DOM

#1 Minimize editing DOM!

Page 104: Making (console) games in the browser

Editing DOM

#1 Minimize editing DOM! Group DOM edits into AnimationFrame callback

Page 105: Making (console) games in the browser

Editing DOM

#1 Minimize editing DOM! Group DOM edits into AnimationFrame callback Minimize jquery

Page 106: Making (console) games in the browser

Editing DOM

#1 Minimize editing DOM! Group DOM edits into AnimationFrame callback Minimize jquery

jQuery accesses the DOM all the time

Page 107: Making (console) games in the browser

Editing DOM

#1 Minimize editing DOM! Group DOM edits into AnimationFrame callback Minimize jquery

jQuery accesses the DOM all the time Store selector results if you must use a selector

Page 108: Making (console) games in the browser

Editing DOM

#1 Minimize editing DOM! Group DOM edits into AnimationFrame callback Minimize jquery

jQuery accesses the DOM all the time Store selector results if you must use a selector

Minimize angular

Page 109: Making (console) games in the browser

Editing DOM

#1 Minimize editing DOM! Group DOM edits into AnimationFrame callback Minimize jquery

jQuery accesses the DOM all the time Store selector results if you must use a selector

Minimize angular When does it create the DOM?

Page 110: Making (console) games in the browser

FAQ#3Control Libraries?

Page 111: Making (console) games in the browser

UI (javascript) guidelinesComplexity

Page 112: Making (console) games in the browser

UI Complexity / CostDon’t underestimateit!

Page 113: Making (console) games in the browser

2010…2014+

Page 114: Making (console) games in the browser

Q&A