Join us on Discord!
You can help CodeWalrus stay online by donating here.

clgui

Started by Yuki, November 05, 2015, 08:18:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yuki

So I was messing with Ruby today and I did this. It's a Command-Line Graphic User Interface library. As in, it takes a text-only VT100 emulator such as your Linux terminal and turns it into a thing you can draw on, thanks to Unicode Braille characters. It have some drawing functions such as pxl_on, pxl_off, pxl_change, line and many others. Not complete yet but it's a good start. :P

Download the source here: https://github.com/juju2143/clgui
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
  • Consoles, mobile devices and vintage computers owned: A lot
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

if you wanna throw money at me and/or CodeWalrus monthly it's here

Dream of Omnimaga

is there a demo somewhere to try to see how it looks like or is it looking like most command line interfaces out there? I notice some drawing commands, but I am unfamiliar with graphical command line interfaces.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Yuki

Yeah it's kind of hard to explain, if you've got Ruby and know how to install a gem you can always try the example out (not sure it works on Windows though, maybe Cygwin), it's basically a dot drawn with Braille characters moving around with the arrow keys. It allows for 8 dots per character this way, it's kind of like this thing I did once:
⣇⣀⡇⡠⠤⡀⠈⡇⠀⠈⡇⠀⡠⠤⡀
⠇⠀⠇⠫⠭⠁⠠⠧⠀⠠⠧⠀⠣⠤⠃
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
  • Consoles, mobile devices and vintage computers owned: A lot
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

if you wanna throw money at me and/or CodeWalrus monthly it's here

Dream of Omnimaga

Oh I see now, it uses braille. So I assume that it makes it easier for people to do pixel-art-oriented games in command prompt? (Eg like old text RPGs but more graphical)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

novenary

Yeah basically that, with higher resolution, the only problem is that color resolution is unchanged (you can only color whole characters, not individual dots). Libcaca might be a lot more interesting for that kind of stuff. MPV supports outputting with it, it's pretty funny.
Still a fun thing to do Juju, nice job on this. I've mentioned this on IRC already, z80e uses the same trick to emulate a calculator display in a terminal without the need for any graphics library.

Dream of Omnimaga

Wait, I didn't know z80e did that. Is it faster that way or is it just for the convenience of not having to use graphics library? And what if the user wants to setup the display to 1x size? Is that possible?


Back on topic, I am curious if any game could be made out of this program Juju.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

novenary

Quote from: DJ Omnimaga on November 15, 2015, 06:27:59 AM
Wait, I didn't know z80e did that. Is it faster that way or is it just for the convenience of not having to use graphics library? And what if the user wants to setup the display to 1x size? Is that possible?
The latter, and you can't have any scaling with that method other than changing the terminal font size.

Dream of Omnimaga

Hmm that might be problematic when people start using 19 inch monitors at 4k resolutions, then the display will be very small. Hopefully changing the terminal font size will allow decent scaling. (I know that when changing the size of some fonts, they don't scale evenly in each direction)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

novenary

Well when you use high resolutions, the OS is supposed to compensate by enlarging the fonts so that the physical size of the characters remains the same. See phones where they keep increasing the pixel density, yet it remains readable (the microcat subforum font is actually more readable on my phone than my computer because of that).

Dream of Omnimaga

Not really. On XP and 7 you need to go in your settings and change the font size yourself. In browsers, you need to use CTRL+ +/- to resize page content and stuff.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

novenary

Well XP and 7 existed before high density displays so they're not aware of that.

Dream of Omnimaga

Yeah true. Back then, people cared about having as much content as possible in the screen than being able to click stuff easily.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

alexgt

Quote from: DJ Omnimaga on November 16, 2015, 10:18:06 PM
Yeah true. Back then, people cared about having as much content as possible in the screen than being able to click stuff easily.
I still want more stuff on my screen when I have a mouse because it is just more convenient but on touch screens I like bigger objects.
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

novenary

I also like to have content over visibility. I have my phone set up to think the screen is larger than it is, because honestly Android is made for blind people. <_<

alexgt

Yeah, no kidding it is a problem on the Prime kinda since the touch screen is not the best but it is still really responsive. The smallest button I would make is 10x10.
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Powered by EzPortal