4 ms·
Looks like you're trying to reinvent some wheels there. No harm in doing so but just so you know, React (or my preference, a tinier version called Preact) woul
by tekstar 5y ago
Looks like you're trying to reinvent some wheels there.
No harm in doing so but just so you know, React (or my preference, a tinier version called Preact) would let you update new chat contents without blowing away all the other InnerHTML content. The way you're doing it now will result in a flicker, and mess with things like highlighted text will unhighlighted when replaced. And that's just with the basic dumping of the chat text into a DOM innerHTML. I'm pretty sure what you're doing there would also be susceptible to XSS without additional filtering.
- mathgladiator 5y agoWait til I tell you about the custom UI system I'm building with canvas. http://www.adama-lang.org/blog/ui-flow-with-adama http://www.adama-lang.org/blog/ui-flow-with-adama
- tekstar 5y agoNice blog post! I read the whole thing. I'm working on something with multiplayer using an unbounded queue of command events, so I learnt a few things about that situation. If you have any posts that elaborate on the typical infrastructure events from running that in production, I'd love to read it as you obviously put a lot of effort into your blog posts.
- mathgladiator 5y agoThis is entirely new infrastructure, and I don't have data yet since this is a side project. I am biasing towards relying on a connected socket for all state management which is fair for board games (and, I do believe more generally given how connected the world is becoming). There are tremendous problems with using WebSockets in production, but they can be overcome with a decent protocol design as you have a number of failure modes to contend with. I'm in the process of publishing a paper for a conference that will share some of the architecture of my production learnings.
- tekstar 5y agosent you an email, I'd be interested in reading that paper once it's available! Cheers