Hacker News new | past | comments | ask | show | jobs | submit login

Hi Kanaka! Good question regarding sample rate. We auto-scaled the sample rate based on number of occupants. It is currently at 1000ms top peak because there are so many of you! If there were only a few, it would go to 50ms.



Yeah, we actually made the decision to cap the number of users so that the connected users would get a good experience with low latency and high interactivity. We figured that people who really wanted to see it would come back (or look at the video).

Oh, and also since I'm personally paying for the bandwidth and my wife would be unhappy with a big bill at the end of the month paying for a game for other people :-)


Is it possible to divide the world into multiple channels?

So I only see updates from those in my area. Then change channels as you move?

And start users in different spawn points when usage is high?


Hi JTxt! Yes this is possible! Just update the channel value in this line here from "/xkcd" to "/whatever_you_want" and you can take on new parallel worlds. The source code is here that you need to change: https://github.com/pubnub/pubnub-xkcd/blob/master/network.js...


Thanks for responding!

I'm talking about dividing the map into multiple channels so that users only receives updates from those around them, and hopefully make it more responsive.

So for 1000x1000 areas, if I'm at "x":3033521.3,"y":-3025356.4, my client subscribes to /xkcd_x3033_y-3025

And adjoining area/channels if they're close to a border. (but only sends updates to the current area/channel.)

...IF it's easy enough for the client to dynamically change channels, and be subscribed to multiple (up to 4) channels.

Then combine this with multiple spawn locations at other interesting locations when demand is high. But they can still explore and meet others.

So it should more responsive and less data sent than everyone getting updates from everyone.


Hi JTxt, This is a fantastic idea for resource saving. Also streaming all the data to the clients, while possible with PubNub slows down the clients as they are busy downloading the streams from all player movements on the screen. Would you be able to work with us and coordinate a way to work this? Here is the starting line to segregate channel data - https://github.com/pubnub/pubnub-xkcd/blob/master/network.js... see the "xkcd2" at the end. This is the CHANNEL ID. You can take that and change it based on the Region of the world. You can even use the names of the world splices such as http://www.pubnub.com/static/pubnub-xkcd/images/1n1e.png - 1n1e "1 north 1 east". So the channel name would be "1n1e".


Sure, I'll try to play with it this weekend. I'll have some questions for you if I can work on this. Thanks!


It definitely makes sense to split the world up into multiple channels. That's what the guys who built http://wordsquared.com/ did. As you scroll you unsubscribe from channels that are out of view and subscribe to channels that are moving into view. You could think of it in a similar way to how Google Maps tiling works.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: