[BUG?] GMCP handled out-of-sync with text

Post Reply
fordpinto
Posts: 34
Joined: Wed Sep 25, 2019 4:59 pm

[BUG?] GMCP handled out-of-sync with text

Post by fordpinto »

This is a cross-post to make sure the GitHub issue doesn't fall through the cracks (it's an old one, recently "revived", not sure how well this kind of zombie revival works). See the issue here: https://github.com/Mudlet/Mudlet/issues/1745

The gist of it is that Mudlet plucks out the GMCP content out of the data stream, and processes it, raising all relevant events, before the text processing even starts. As a result, the information of the original GMCP position within the text stream is lost. I have tagged the BUG with a question mark because there is some poor wording (IMO) in the GMCP standard that could lead to confusion. However, I believe the way Mudlet is currently processing the GMCP info is contrary to what the MUD servers expect, and contrary to what other GMCP compatible clients implement, so contrary to at least de-facto standard. This leads to some out-of sync oddities, and breaks some functionalities as well.

Examples:
  • The GMCP event indicating arrival to a new room is generated while the character has not reached the intended destination yet, as based on text output still passing through some rooms on the way there
  • Some GMCP info meant to deliver a spoken message from the mob can lead to receiving a mob's speech way before arriving into the room with that mob, and before some mob actions associated with it (like body language, passing an object, etc).
  • The original GitHub issue mentions GMCP used for tagging around text info, marking special use of that text (channel communication, map). This type of GMCP signalling is of course completely broken by the way GMCP is processed at present.

Tamarindo
Posts: 10
Joined: Sat Jul 28, 2018 10:53 pm

Re: [BUG?] GMCP handled out-of-sync with text

Post by Tamarindo »

Calls from improvement through new modes or extensions are welcome for discussion. Completely broken is curious statement. What is the scope of completely broken? One game, or certain flavor of game drivers? As someone who spent months plugging GMCP calls throughout a game with people using it for about 4 years now, we are not a member of the completely broken category.

The game admin should send the GMCP, such as Room.Info, once the player has entered the room and after informing in-band communications, as applicable. The game admin should send the spoken message or action from the mob, such as Comm.Channel.Text.channel = "local", after it has been sent via in-band to the screen, as applicable. As a game admin, putting strategies in place, such as to send Mud Client Media Protocol GMCP to play sound after a player has been in a room for at least one round/tick, is a freedom enjoyed by invoking the protocol the way it is right now. Decisions are made to send GMCP from the room, the player, or another game object as needed, as suits the situation best.

fordpinto
Posts: 34
Joined: Wed Sep 25, 2019 4:59 pm

Re: [BUG?] GMCP handled out-of-sync with text

Post by fordpinto »

Tamarindo wrote:
Sun Jul 10, 2022 12:24 pm
Calls from improvement through new modes or extensions are welcome for discussion. Completely broken is curious statement. What is the scope of completely broken? One game, or certain flavor of game drivers? As someone who spent months plugging GMCP calls throughout a game with people using it for about 4 years now, we are not a member of the completely broken category.
I think you have misread my post, I am not claiming everything is completely broken. One type of functionality (third example in my list) is broken completely - the subject of the original GitHub post based on Achaea game. In fact, the solution suggested was to abandon GMCP and try something else, which in hindsight probably should have been a red flag. In terms of what games/engines it affects, it should be clear based on the description of the issue that it affects *all* games and engines that make use of GMCP.

The nature of the bug is that Mudlet doesn't respect the position of GMCP data where it was placed within the text stream by the game server, so if GMCP processing requires generating of some output, it appears out of sync with the text stream of the game. In terms of scripting, it makes it generally impossible for the text triggers to rely on GMCP variables for context (they are out of sync with each other). Sometimes it's just nuisance (imagine mud client arbitrarily swapping lines in the output, it's like that).

Now, I have been using Mudlet myself for 3 years, and I had no idea why the GMCP was out of sync with text. In my mind, I was unfairly blaming the server not doing it right somehow. I will not stop using Mudlet because of this, but I would love to see it fixed.


Post Reply