title: Browser html5 real-time game. broadcast game state options
body: <p>I'm making real time game for facebook. Now I broadcast state using websockets. But for real-time data udp is much better. I found out that there is WebRTC out there. But I can't use it because it's peer-to-peer and I want authoritative server(the one which runs physics and makes it harder to cheat).</p>
  
  <p>I consider the following options:</p>
  
  <ol>
  <li>use flash sockets. But I have never used flash. Is it even possible to make a wrapper in javascript for flash udp? How hard is it? Does it require some special stuff on server side?</li>
  <li>maybe browser supports udp in some way? Can I stream video or audio to browser using udp? maybe it's possible to use video stream for my game state</li>
  <li>use websockets. I have some client-side prediction and I hope that latency would be below 100ms(even lower to be quite frank with you) - so maybe it's ok?</li>
  <li>use this WebRTC thing. maybe I can somehow simulate browser on server and use it as peer? For example run a bunch of chromes and send game data to them with websocket(no latency, they are on one machine) and then stream to clients over udp? But browsers can have limit on peer-to-peer connections and I need cpu on server to run physics</li>
  </ol>
  
  <p>What is the best option? Have you implemented one of them and what was the result?</p>