Game dev #10: Chatting with polish
In previous Game Dev entries, I've talked about my reasoning behind the introduction of the chat server and how I managed to apply improved formatting on the messages. The whole system has been extremely reliable since the beginning, with a solid design and self-repair capabilities when the connection between the core and one of the channels (game server, IRC or Discord) is lost. Still, there's always room for improvements.
The majority of my development time in the past week or so has been dedicated to adding an extra layer of polish and functionality to the chat system. This notably includes:
- Deaths, kicks and bans are now visible network-wide to all, helping to explain what's going on.
- An annoying display bug introduced a few weeks ago where newly registered players would still appear as visitors in-game has been squashed.
- The minigames (currently Parkour and PvP) now use the chat core as well. While their chat remains limited to the players in each location, without a global link, they benefit from the richer display formatting and custom titles. As a bonus, private messages can now be sent and received from the rest of the network!
- After erratic reports of the quick private reply, /r, sometimes sending messages to the wrong person, I decided to investigate once it happened to me and I had a small test case to study. It turns out that, if a private message was first sent without capitalizing the receiving player's name properly, later /r would go to the person contacted before then. This was rare as most players use tab-completion, which takes care of the capitalization on its own! I've now fixed this.
- Players who bounce off servers as they're denied entry (dead in UHC, or using the wrong game version) would emit annoying network-wide notifications whenever that happened. Clueless players liked to punch the buttons again and again, creating chat noise. Now, if the player's transfer to another server is denied, no message is sent.
- A small but tricky issue when using the .players command to get the list of online players sometimes caused the chat to delink, later messages being lost until someone talked on the server itself. This turned out to be an issue on how HTTP calls weren't firing from the correct thread. Let's stay light on the technical details of multi-threading...!
None of these were critical, but they're part of some of the first impression that new players get from the Creeper's Lab and its community. I think a layer of polish is important to help people understand that the various systems are stable and reliable, and so I took the initiative of getting some long-time targets and annoyances out of the way.
– Doctacosa