Edit: How long did it take you to create?
Edit: How long did it take you to create?
I believe that this could have be done ~20 years ago with about the same effort.
Websocket is maybe minimally easier than AJAX + 20 years old javascript, and the newer ECMA standards also have some nice syntactic sugars, but nothing radical. Objects, classes, closures, passing and modifying functions, javascript was so powerful and easy to work with from the beginning. People just didn't used it back then.
I remember playing e.g. travianer 15 years ago, different genre, but the technology was given.
I'm not saying this was impossible 15 years ago (in fact, Flash-based MMOs existed back then), but it would've taken a lot more effort.
That resulted in real-time message throughput close to the game frame rate, bidirectional, and no connection setup latency per message, just the transmission latency even over TLS (SSL back then).
I would argue WebRTC is where this really became possible, although last I looked at the spec it made a best-effort at using UDP for datagram based messages but would fallback to TCP in some cases.
It's a fun domain and lots of really interesting approaches(like lockstep called out above as well as other fun things like dead reckoning).