Show HN: I made an AppleTV party game using HTML SSE
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).
You can check out the game here: https://electrollama.net/alphaparty
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) https://www.electrollama.net/blog/2017/6/22/html-sse-with-no...
Also, my first post on HN, despite being a lurker here for over 5 years! I apologize if I've formatted this wrong...
3 comments
[ 5.3 ms ] story [ 16.9 ms ] threadIt's using SSE as well... there are a few ways to do it, here's an example 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.
A key thing to me is that sse can be polyfilled for older browsers. Websockets cannot.