Outburst 3D

978 views

Published on

Our presentation about Outburst 3D that was our entry for Node Knockout 2011.

  • Be the first to comment

Outburst 3D

  1. 1. Outburst 3D Node Knockout 2011
  2. 2. The teamAri Þór ArnbjörnssonFlash Developer at RovioEiríkur Heiðar NilssonWeb Developer at GagnavarslanSveinn BjörnssonStudent at MargmiðlunarskólinnÆgir ÞorsteinssonWeb Developer at Landsbankinn
  3. 3. Our missionReal time multiplayer game3D in the browserShare code between server and clientHave fun!
  4. 4. DEMO
  5. 5. WebGLHTML 5 Canvas elementOpenGL ES 2.0ShadersNo support in IE
  6. 6. THREE.JShttps://github.com/mrdoob/three.js/
  7. 7. ModelsMaya OBJ JSON JSON
  8. 8. MultiplayerNodeJS Server - Websocket
  9. 9. Best Practices …in 48 hoursAuthorative ServerClient shares server code to predictmovementLag compensation on serverCompression
  10. 10. The packets Input state – 25 p/sec Client Server World state – 25 p/secInputs and gameplay are evaluated 50 times per second
  11. 11. Input packet
  12. 12. World packet
  13. 13. Shared codeServer (NodeJS) and client (browser) runJavascript… or rather CoffeeScript
  14. 14. Player stateShared codeInput state New player state
  15. 15. Lag compensation
  16. 16. Packet sizesFor a single player: Input: 137 bytes World: 2093 bytes25 times per second is ~50 kibi/sec
  17. 17. Simple delta compression
  18. 18. Compression resultsWorld: 2093 => 691 bytes 33% of original sizeInput: 137 => 35 bytes 26% of original sizeBandwidth: ~50 => ~20 kibi/sec
  19. 19. Future optimizationsRound floating point numbersDelta optimize the derivative of somefieldsBinary JSON (when browsers addsupport)
  20. 20. ConclusionWeb Standards are awesomeCoffeeScript on server and client is awesomeSheep are awesomeV8 is awesomeReal time multiplayer is hard48 hours go by FAAAST…

×