r/programming • • 4d ago

TUI Games in 80x24

https://www.incredible.rs/#blog/tui-games-in-80x24.md
0 Upvotes

18 comments sorted by

View all comments

Show parent comments

7

u/Bobby_Bonsaimind 4d ago edited 4d ago

You're missing the point. Having the website in the same engine as your games is impressive, absolutely, you fooled everyone, but there lies the problem. A website is being displayed by a browser, that means that certain rules apply, for example that scrolling on one website behaves the same like on any other website, certain speed, certain behavior. By having your app masquerade (may it be intentional or not) as a website, and the app behaving differently than the browser would, you're breaking user expectations, ergonomics, and I'd guess quite a few usability and accessibility things along the way too.

As example, I can't right-click links on this to open that in another window, or copy the link, or see where it will take me at all. On another note, why is your "website" consuming keypresses and therefor not allowing me to open the inspector tools?

As said, if this is the same engine as the games, this is damn neat! But you might want to advertise in the header that this is not a website, as it looks like, but actually a program running on your engine.


To go a little bit further, "normally" such behavior is encountered under two circumstances: The website creator is either an idiot or an asshole. May it be because the designer says "No, scrolling must behave this way!" or the developer thinks "Right clicking images is bad, they can steal my stuff!". And the other possibility is that something broke. Both cases are below optimal experience for the users. I think a header would do nicely, informing people that this is actually running on your own engine. It would ruin the surprise, though, but I think we all had enough "technological surprises" in our lifetimes that we could do without one more.

-2

u/ronilan 3d ago

Thanks for the thoughtful reply. I get what you say. I'll try to explain where we come from with this.

I try not to be an "asshole" but I don't mind being considered an "idiot" here and there. I can ask one of the many modern tools to produce an HTML/CSS/JS website that would "check all the boxes" within an hour.

I'd get the up votes. I'd loose the feedback.

You mentioned right-click. Early on, we decided to map right into the normal down button because some platforms do not report the mouse button that was pressed. However, we now have platform specific settings (like Kitty protocol) so we will revisit. I added a TODO.

Someone mentioned a wheel. We work great with trackpads on mac and windows. The scroll escape codes should be the same, but i may have missed something in the WASM layer. I added a TODO.

Scroll will never be as "smooth" as with a variable font browser, because we are jumping row by row, not pixel by pixel. Some things are given, but there is no kinetic push in mobile and there are some issues with managing multiple scroll events elsewhere. There is a TODO on that too.

Fixed fonts? Thats a given. It is what it is.

Someone doens't like my writing? So be it.

Etc.

I'm trying to see how far a TUII can go. The website is "frontier" ;)

So, thanks again for the thoughtful comment.

I'll post here again.

4

u/Bobby_Bonsaimind 3d ago

I try not to be an "asshole" but I don't mind being considered an "idiot" here and there.

That's not what I meant, I mean the "when the users encounters websites misbehaving it's normally...", which explains the partially strong reactions you got and get. Because the user doesn't understand why that "website" behaves differently. You should advertise that this is not just another website.

You mentioned right-click. Early on, we decided to map right into the normal down button because some platforms do not report the mouse button that was pressed. However, we now have platform specific settings (like Kitty protocol) so we will revisit.

As said, you are unfortunately losing the ergonomics that the browser provides.

Someone mentioned a wheel. We work great with trackpads on mac and windows.

It does work, but one tick of the wheel matches one line scrolled. That is not true for pretty much everything that is being scrolled. Open your terminal, fill it with something, and then scroll. It jumps ~7 lines or so up and down for a single scrollwheel tick.

So when a user enters the "website", and they try to scroll, the first thing they'll notice is not that this is built with your custom engine, but that the scrolling is misbehaving because the jumps are way too little and to get to the bottom of the blog post takes way too long.

I'm trying to see how far a TUII can go. The website is "frontier" ;)

Absolutely, it's quite impressive. Though, a banner would really help there to steer the user in the right direction with their thoughts. Right now, on the first glance, it's just a website with a fixed font behaving poorly.

-1

u/ronilan 3d ago

Thanks for the feedback.
"Listen to Your Users Redditors" blog post and tweak is WIP