Skip to content
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

Console feels awkward #2374

Open
patsore opened this issue Jun 18, 2021 · 8 comments
Open

Console feels awkward #2374

patsore opened this issue Jun 18, 2021 · 8 comments

Comments

@patsore
Copy link

patsore commented Jun 18, 2021

Hello! There is an issue with the console that I haven't found addressed in issues, at least from what I've looked through. There are often weird line displacement issues, which make writing and editing commands very awkward. Sometimes I'd try to delete some text, but visually it'd stay there, sometimes the debug log displaces the line I was typing in, and hiding part of what I'd typed from me. I tried looking into it, but it doesn't look like an issue coming from my terminal/OS.

@Terrabade
Copy link
Contributor

I believe this issue happens when something is written to the console while you're in the middle of typing, overwriting the visibility of your input text.

@patsore
Copy link
Author

patsore commented Jun 18, 2021

sometimes the debug log displaces the line I was typing in, and hiding part of what I'd typed from me.

That's what I meant by this
But still, not only this problem exists.
For example, after I send a command, the colon sometimes doesn't restore to the beginning of the line, I start typing - do a typo, and when I try deleting it, with backspace, it just stays there, I press backspace ten times for the two letters that might be left, type out the command back from the beginning, just to get an 'Invalid command entered. Type /help for a list of valid commands.' message.

@hakusaro
Copy link
Member

@patsore it's definitely awkward, but it's something that is more or less going to be a function of Terraria server. @bartico6 had some thoughts about this privately. We all agree that it's not-ideal for the console to more or less be "as effective as building a house next to a boat in a river" but nobody has really dug into it. Most of what we've built optimizes for interacting in-game instead of having to deal with the awful console.

@patsore
Copy link
Author

patsore commented Jun 19, 2021

Yeah, which bloody part, console "awkward" tells us nothing about it.

ok.
First, the backspace visual glitch.
image
As you can see here, there is a phantom 'h' that, for some reason, decided to show itself without actually doing anything

Or another example - the disappearance of the colon:
Screenshot from 2021-06-19 00-34-07

Another issue - two absolutely identical commands - one works, one doesn't - without any clue as to why
image

@patsore
Copy link
Author

patsore commented Jun 19, 2021

While setting some things, encountered another issue with the phantom letters
image

@patsore
Copy link
Author

patsore commented Jun 19, 2021

@patsore it's definitely awkward, but it's something that is more or less going to be a function of Terraria server. @bartico6 had some thoughts about this privately. We all agree that it's not-ideal for the console to more or less be "as effective as building a house next to a boat in a river" but nobody has really dug into it. Most of what we've built optimizes for interacting in-game instead of having to deal with the awful console.

Oh, didn't notice your reply earlier. Ok, fair point.

@patsore patsore closed this as completed Jun 19, 2021
@hakusaro hakusaro reopened this Jun 19, 2021
@bartico6
Copy link
Member

I think this is "a widespread console issue" moreso than "terraria/tshock console issue"

If your project uses Console.ReadLine() and Console.WriteLine() you are going to be subject to this - the console is a stream of letters which you can write to with keyboard and program simultaneously without any buffers dedicated to each - overruns like this are BOUND to happen.

Every seasoned user of such an app kinda has this muscle memory of "I made a typo three letters from here, I hit backspace three times and carefully retype what I screwed up" but this cannot be expected of people who use a visual feedback loop for typo correction (aka track the cursor while backspacing to the error they made)

In reality this is a problem with the following tradeoffs:

  • If you want to fix this, you must take over all console controls and manually reprint everything to be in the right place including the cursor. You'd also have to ditch .ReadLine() and .WriteLine() and instead listen to single-key inputs and print out what that represents synchronised to the rest of the console.
  • Fixing this means you also have to retain control over the way the console info is formatted - which by itself might mean having to store the entire console buffer (potentially multiple screens long) in memory to rewrite whenever an important change happens
  • Every large-scale console rewrite will cause it to flicker.
  • If you don't fix it, you're doomed to deal with your inputs sometimes mixing with server outputs.

There definitely must be a way to solve this (I'm thinking how certain linux apps handle input having its own buffer zone at the bottom of the screen while output appears above that zone instead) but it's not a solution I've procured yet.

@lucasgames8957
Copy link

it is in there as part of a log on the console if something appears

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants