outburst 3d

21
Outburst 3D Node Knockout 2011

Upload: agir-borsteinsson

Post on 13-Jul-2015

772 views

Category:

Technology


0 download

TRANSCRIPT

Outburst 3DNode Knockout 2011

The team

Ari Þór ArnbjörnssonFlash Developer at Rovio

Eiríkur Heiðar NilssonWeb Developer at Gagnavarslan

Sveinn BjörnssonStudent at Margmiðlunarskólinn

Ægir ÞorsteinssonWeb Developer at Landsbankinn

Our mission

Real time multiplayer game

3D in the browser

Share code between server and client

Have fun!

DEMO

WebGL

HTML 5 Canvas element

OpenGL ES 2.0

Shaders

No support in IE

THREE.JShttps://github.com/mrdoob/three.js/

Models

Maya OBJ JSON

JSON

MultiplayerNodeJS Server - Websocket

Best Practices …in 48

hours

Authorative Server

Client shares server code to predict

movement

Lag compensation on server

Compression

The packets

Client Server

Input state – 25

p/sec

World state – 25

p/sec

Inputs and gameplay are evaluated 50 times per second

Input packet

World packet

Shared code

Server (NodeJS) and client (browser) run

Javascript

… or rather CoffeeScript

Player state

New player

state

Shared code

Input state

Lag compensation

Packet sizes

For a single player:

Input: 137 bytes

World: 2093 bytes

25 times per second is ~50 kibi/sec

Simple delta compression

Compression results

World: 2093 => 691 bytes

33% of original size

Input: 137 => 35 bytes

26% of original size

Bandwidth: ~50 => ~20 kibi/sec

Future optimizations

Round floating point numbers

Delta optimize the derivative of some

fields

Binary JSON (when browsers add

support)

Conclusion

Web Standards are awesome

CoffeeScript on server and client is awesome

Sheep are awesome

V8 is awesome

Real time multiplayer is hard

48 hours go by FAAAST…