Xkcd HTML5 Canvas MMO WebSocket Scaling With PubNub

515 views
396 views

Published on

We notice a new MMO was released by n01se and xkcd yesterday (September 26th, 2012) with multiple users flying around with a balloon figure. If you got stuck, you can click your balloon guy and turn into a ghost to seamlessly move through the landscape unhindered by mortal barriers like trees and hills. There was a problem however with the scaling of users on the system. The max concurrency could only be 20 users at a time leaving many wonder where the MMO part of the MMO was.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
515
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Xkcd HTML5 Canvas MMO WebSocket Scaling With PubNub

  1. 1. Xkcd HTML5Canvas MMOWebSocketScaling withPubNubby Stephen Blum
  2. 2. Hello all hackers. We notice a new MMO was released by n01se and xkcd yesterday (September26th, 2012) with multiple users flying around with a balloon figure. If you got stuck, you can click yourballoon guy and turn into a ghost to seamlessly move through the landscape unhindered by mortalbarriers like trees and hills. There was a problem however with the scaling of users on the system.The max concurrency could only be 20 users at a time leaving many wonder where the MMO part ofthe MMO was.Click here to join the live MMO game Powered by PubNub.
  3. 3. We saw an opportunity to save the day and scale using PubNub’s real-time cloud based globalinfrastructure. This allows the concurrency to scale easily. Note that in order to do this in a short timeframe, we excluded some important security precautions. However we hope you play nice in this real-time MMO that actually scales.Game Instructions1. Click to Move1. Type to Talk1. Press Enter to Clear1. Type “I am YOUR_NAME” and Press Enter
  4. 4. Note that in order to switch from the non-scaled Node.JS server to PubNub, we had tocome up with a solution to replace the serverside with a full 100% client side solution.Therefore, we built an RFC 6455 WebSocketClient that works with all users andbrowsers. By doing this, you are actuallyconnecting to a PubNub Edge Node nearestyour location, creating a fast, low latencyconnection. Now you can relax, sit back andplay a real MMO courtesy of PubNub.Watch the video on the right to see xkcdHTML5 Canvas MMO WebSocket Scaling withPubNub in action.
  5. 5. Credits1. Homage to n01se and xkcd, especially 1110.2. No server required courtesy of PubNub.3. RFC 6455 Support for WebSocket Client Specification Written by Stephen Blum.4. Port from original author written by the PubNub Team.5. Download/Clone Source Code Repository: GitHub Source Code.As a follow up to this article, we wanted to note and proclaim our thoughts and feedback on the original source. Thankyou 1110 and n01se for the creativity and JavaScript. One thing we wanted to change was the animation style youused for network coordinate relays. The Animation would animate based on Vectors and current X, Y coordinates.However since the game had little interactivity between players, the better method would be something we at PubNubare well versed in which we call Dead Reckoning with Deterministic Lockstep at a single step buffer. This methodprevents jitter and jumping of the avatars on the screen. If we were to upgrade the animation engine, we wouldimplement this method first. You can see this style of network tweening on our Home Page of PubNub.com click thetab that says “PubNub In Action”. Looking forward to seeing you in the game today!

×