<div>Hello Netrek devs,</div><div><br></div><span>I've been playing around with some JavaScript libraries for HTML5 canvas drawing, and I feel fairly confident that it would be possible to make browser-based a Netrek client. The browser could use WebSockets to communicate with an intermediary WebSocket-based Netrek server.</span><div>
<br></div><div>[[Browser client]] <---WebSocket connection---> [[WebSocket server]] <----real TCP connection----> [[Regular Netrek server]]</div><div><br></div><div>The intermediate WebSocket server would be quite thin; it just needs to catch WebSocket messages from the client and forward them to the actual Netrek server. (I believe this roughly is the model that <a href="http://freeciv.net/" target="_blank" style="color:rgb(17,85,204)">freeciv.net</a> uses for their browser-based Freeciv client.) The WebSocket server and the actual server could be run on the same host or different hosts, which means anyone who can set up a WebSocket server could connect their browser client to a real Netrek server.</div>
<div><br></div><div>The main benefits to a browser-based Netrek client are:</div><div><br></div><div>1. It would be cross-platform and not require any downloads/installations, which would greatly the reduce the barrier to entry for new players. (Some might consider this a disadvantage, however, allowing a potential flood of clueless players. This may be a non issue; see RSA verification below.)</div>
<div><br></div><div>2. Once a desktop version is completed, it should be fairly easy to modify the UI to create a mobile-friendly version.</div><div><br></div><div>3. Support for Web-only devices: Chomebooks and (someday) Boot2Gecko devices from Mozilla.</div>
<div><br></div><div>My main concerns are:</div><div><br></div><div>1. WebSockets only use TCP, not UDP. (WebSockets are exactly as efficient as TCP, minus a negligible one-time set-up cost per connection.) My understanding is that all modern Netrek implementations prefer UDP but provide legacy support for TCP. Would writing a client that could only use TCP be a waste of time? How playable is Netrek over TCP only?</div>
<div><br></div><div>2. RSA verification of a browser-based client would be impossible. The actual client -- as far as the server is concerned -- is the intermediary WebSocket server, which has no way of verifying what the user's broser is running. Furthermore, running cyptographic verification (or any kind of self-verification, really) in Javascript is doomed from the start, since a player could easily modify the client's code (and/or the code of the verification process) at any time using Greasemonkey or the browser's debug console. Would this mean that major servers would never be able to accept Web clients? Web-friendly servers could always be set up, so that regular players using desktop clients are not affected.</div>
<div><br></div><div>So, in conclusion: any thoughts (either policy-related or technical) about writing a Web client?</div><div><br></div><div>--Andrew</div><div></div>