Pryaxis / TShock

☕️⚡️TShock provides Terraria servers with server-side characters, anti-cheat, and community management tools.
GNU General Public License v3.0
2.43k stars 382 forks source link

Console feels awkward #2374

Open patsore opened 3 years ago

patsore commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago

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 commented 3 years ago

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

patsore commented 3 years ago

@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.

bartico6 commented 3 years ago

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:

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.

ghost commented 1 year ago

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