Hacker News new | ask | show | jobs
by Liongadev 4999 days ago
Extremly lagging. Let me guess, Node.js?
1 comments

TCP.

If you mouseover the tiny, hard-to-see lag meter in your colored square while playing a game you'll be able to see some stats about your connection.

I love this game. It is a themed copy of Hudson Soft's Bomberman game that I originally played on the SNES.

The creators have a blog entry about latency and websockets. With even a minimal amount of packetloss, TCP makes for really bad latency - http://blog.artillery.com/2012/06/websocket-performance.html

It's too bad we won't see any playable twitch games in the browser until there is some way to do UDP. I don't see why browsers don't just allow UDP subject to same origin policy, perhaps only on pages which serve a special "X-Allow-UDP" header.

From what I understand, the only reason browsers shy away from being able to send UDP packets is fear of DDOS. This does not seem to be an issue if packets are only sent to same host that the page is served from.

A similar game, http://bombermine.ru/, that seems to handle the latency/synchronization in a friendlier way.

(found on http://blog.artillery.com/2012/07/six-impossible-problems.ht...)

WebRTC allows for general UDP packets (in the spec at least - haven't tried it in Chrome stable) so hopefully this will be a workable solution as it gets more support.
"The Data Channel API is not implemented and its implementation is being discussed in the standards committee" http://www.webrtc.org/faq-recent-topics

WebRTC is currently some weird wrapper around ICE and nat traversal protocols, not something that seems useful for sending generic javascript-land ArrayBuffers or similar.

Ya this appears to be the achilles heal of WebRTC and I was extremely disappointed (but not surprised) to hear that they chose to go this route of splitting data and media instead of layering media on top of data.

All I can think of is that there might be pressure from media companies and ISPs to block the media or data components.

This has happened before - we have UDP and TCP as independent protocols instead of having TCP built on UDP. This created the mess with firewalls and NAT that we have to live with today.

uTP (micro transport protocol) is a TCP implementation based on UDP. Used by the majority of BitTorrent clients. It seems to work pretty well. It's interesting that you think TCP was a bad idea. Do you have any sources or reading material that you can share?