New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for client resizing window width after initial connect #3484
Comments
Tried to reproduce. Set Mudlet length to 80 and length for both We could make an upgrade by having a client-side width adjustment automatically update the character options, but I believe you're seeing the error because of your character's screenwidth option and not because of a bug. |
Thanks for value inputs @jaborsh I did some further investigations: I believe the issue is that the client width is only read once, on login. When you change it in the client and not using the options command in game, the value is not updated, unless you reconnect to the game.
The question is - which settings should have priority? When setting the client width in client and connecting the game is then set to the client width. If we then change the client width while still connected, the game ignores it, unless we reconnect again. This, to me, seems like faulty behaviour. Either we always use the client width, or never. Having it used only on connect seems to be half a solution. Either we ignore the client and set the values in game, or we respect the client every time. A compromise would be to have the command setting the width, read the client width and then warn the player if the game-command is setting the width to something wider than the client is allowing, thus forcing ugly linebreaks. |
Thanks for the help reproducing and further discussion, @jaborsh and @MorquinDevlar! We use the NAWS telnet option (RFC1073) for the client to report its screenwidth. We do this on client-connect and one can argue that we should listen for later changes here too (NAWS specs do suggest that one can also react to client size changes during an existing connection). This has rarely been an issue because most people don't resize their clients that often while running. But I agree it'd be a nice addition. I'd rate this as a feature rather than a bug though - it extends the existing functionality. For priority though - the option you set in-game must take precedence over what the client sends. The reason for this is that some MUD clients or terminals don't reliably report their widths over NAWS. It's just the reality of people sticking to old third-party clients or non-compliant terminals. Without the ability to hand-set their widths, they would not be able to use those clients at all. |
Makes sense to me. The only reason I actually looked into it, was that the old codebase I am upgrading defaulted to 80 chars, and all our rooms are meticulously built to look nice at 80 chars. When they are now stretched to 100 (or whatever is default on char creation) - it looked off. I didn't know about the options command to set screen width, and I'll probably just set it to 80 chars by default for all players, and then let the ones who really want it, make the modification themselves. |
Describe the bug
When setting client-screen-width to 80 chars, many commands like "help" or "examine" will not respect this and will display output wider than the char limit set by the client.
Using Mudlet and setting the char-width first to 100 and then to 80, gives me this display:
To Reproduce
Steps to reproduce the behavior:
Set client width to less than 86 chars, and type "help" or "examine"
Expected behavior
I would expect the commands to respect client char width, and not display borders or even text that is too wide for the display.
Environment, Evennia version, OS etc
Mudlet, on OSX
The text was updated successfully, but these errors were encountered: