CC-Tweaked icon indicating copy to clipboard operation
CC-Tweaked copied to clipboard

(pretty stupid idea) character palette

Open tizu69 opened this issue 1 year ago • 8 comments

yk the color palette? that's pretty cool, righ? now, that applies to colors. in theory you can have infinite, just not at once :) now, ever wanted to build a ui, but turns out you're missing some super weird character? you could use a resource pack, sure, but what abt servers? ok so basically-

Not sure if I like the syntax, but something like this. The 1px border is also included.

term.setPaletteChar("\x90", {
  "        ",
  "        ",
  "     X  ",
  "    XX  ",
  "        ",
  "        ",
  "  XXXX  ",
  "        ",
  "        ",
  "XX  XX  ",
  " X      ",
})

^ fyi, this isn't supposed to represent anythig.

This would allow for somewhat higher resolution, but still be locked to oh so many characters. This could be treated as a limited graphics mode ig, that doesn't have the issue of having to send huge amounts of data to the client, as it's all just one of the 256 characters after all. idk.

tizu69 avatar Jun 09 '24 18:06 tizu69

This is really fun and I support the idea, but I worry that this takes away from some of the limitations of computercraft that requires out-of-box thinking.

Still, if this ever gets added I'll be quite happy!

m-doescode avatar Dec 29 '24 12:12 m-doescode

The term you are looking for is not a character palette, its a custom Bitmap Font. I agree this could be fun in programs. CC Tweaked Rogue-like game anyone? Who knows, it might even make simple Icons, Sprites and mouse cursors possible?

dgendreau avatar Feb 10 '25 23:02 dgendreau

This is really fun and I support the idea, but I worry that this takes away from some of the limitations of computercraft that requires out-of-box thinking.

Still, if this ever gets added I'll be quite happy!

Eh? You're still limited by the actual char count of 256, so you're gonna have to sacrifice either letters or symbols.

tizu69 avatar Feb 11 '25 06:02 tizu69

Eh? You're still limited by the actual char count of 256, so you're gonna have to sacrifice either letters or symbols.

I guess so. It creates its own puzzle then. I should've been more clear that I meant it would make sub-pixel (using chars 127-160) and other workarounds obsolete, not that it gets rid of the challenge altogether.

But youre right, I think having to work with a limited character set provides its own challenge so disregard my initial comment.

m-doescode avatar Feb 11 '25 07:02 m-doescode

I should've been more clear that I meant it would make sub-pixel (using chars 127-160) and other workarounds obsolete.

Disagree. Older programs will still use that, and same applies if people want to do simple applications. Where I think this would really shine is for icons and the like, for more complex applications.

tizu69 avatar Feb 12 '25 06:02 tizu69

Disagree. Older programs will still use that, and same applies if people want to do simple applications. Where I think this would really shine is for icons and the like, for more complex applications.

Yes, I see that now...

m-doescode avatar Feb 12 '25 08:02 m-doescode

I should've been more clear that I meant it would make sub-pixel (using chars 127-160) and other workarounds obsolete.

Disagree. Older programs will still use that, and same applies if people want to do simple applications. Where I think this would really shine is for icons and the like, for more complex applications.

by the way, there a a whooooole bunch of unneeded/unused characters that are reserved for web browsers and printers so you could use those in the program. 0x07 for example, which normally sounds a bell on your printer (dont ask, no idea why this is a thing) but can be repurposed as an enemy sprite for example, or 0x141 which is just completely unused.

thatdudesquigole avatar Apr 23 '25 22:04 thatdudesquigole

0x07 for example, which normally sounds a bell on your printer (dont ask, no idea why this is a thing)

Terminals. do a echo -e '\x07' in your favourite terminal emulator :p

tizu69 avatar Apr 24 '25 07:04 tizu69

I should've been more clear that I meant it would make sub-pixel (using chars 127-160) and other workarounds obsolete.

Disagree. Older programs will still use that, and same applies if people want to do simple applications. Where I think this would really shine is for icons and the like, for more complex applications.

by the way, there a a whooooole bunch of unneeded/unused characters that are reserved for web browsers and printers so you could use those in the program. 0x07 for example, which normally sounds a bell on your printer (dont ask, no idea why this is a thing) but can be repurposed as an enemy sprite for example, or 0x141 which is just completely unused.

Those are Unicode characters, but ComputerCraft doesn't use Unicode. Its strings are literally strings of bytes, so "character" and "byte" mean the same thing, and there are only 256 different characters. Here is a list of the ComputerCraft characters (chart not made by me).

the-can-of-soup avatar Oct 02 '25 20:10 the-can-of-soup