
Show HN: I made an AppleTV party game using HTML SSE - mr_donk
Hi Hacker News,
I was experimenting with HTML SSE (alternative to web socktets), and made a fun Apple TV party game in the process. It turned out to be great for my situation (where you need to do realtime synchronization from server to client(s) but web sockets were overkill).<p>You can check out the game here:
<a href="https:&#x2F;&#x2F;electrollama.net&#x2F;alphaparty" rel="nofollow">https:&#x2F;&#x2F;electrollama.net&#x2F;alphaparty</a><p>I wrote a post about configuring Nginx to work with SSE when used as a reverse proxy for node (this was a bit tricky... my server worked fine when connecting straight to node, but not through a proxy without some monkeying around)
<a href="https:&#x2F;&#x2F;www.electrollama.net&#x2F;blog&#x2F;2017&#x2F;6&#x2F;22&#x2F;html-sse-with-nodejs-and-nginx" rel="nofollow">https:&#x2F;&#x2F;www.electrollama.net&#x2F;blog&#x2F;2017&#x2F;6&#x2F;22&#x2F;html-sse-with-no...</a><p>Also, my first post on HN, despite being a lurker here for over 5 years! I apologize if I&#x27;ve formatted this wrong...
======
stephenr
It's good to see someone making use of SSE/EventSource. so many devs just jump
on the web sockets bandwagon when all they need is one way data flow with
maybe occasional data sent from the client, which imo works better using sse
and xhr when required.

A key thing to me is that sse can be polyfilled for older browsers. Websockets
cannot.

------
sjs382
Is the app itself using HTML or TVML? If I recall correctly, it's against
Apple's TOS to use a WebView on tvOS.

~~~
mr_donk
The AppleTV part of the app is native tvOS.

It's using SSE as well... there are a few ways to do it, here's an example
[https://github.com/neilco/EventSource/](https://github.com/neilco/EventSource/)
I'm doing something quite similar in swift, had I known about this, I probably
would have just dropped it in!

Every player uses their own phone and that part is just straight JavaScript.

