CC: Tweaked

CC: Tweaked

65M Downloads

Improve printers to allow for more creative uses

Kalrog opened this issue ยท 2 comments

commented

Problem

Currently it is not possible to print images or graphs using the printer except by using ascii art, which is very limiting.
For screens we have the option of either:

  1. setting background color and displaying images using spaces with specific background colors
  2. using characters 128 - 159 (the 2x3 block characters) and some clever logic to pick foreground and background colors to make higher resolution images

Unfortunately both of these are not possible with printers because they don't have background colors, so the set of 2x3 block characters is incomplete on printers.

Possible Solutions

1. Change the character 128/0x80 to be color inverted when printed on a printer

By inverting the colors of the 128 character on a printer (or generally but this would break existing programs) it would be possible to print basic images and graphs using the first technique described, because there would now be a block character that fills the whole space

2. Allow for printing any character inverted

If the printer had an option to print any character inverted (put color where there would normally be none, and nothing where there would normally be color), it would be possible to print anything using technique 1, and it would be possible to print any 2 color art using the second technique(one color would always be white), which would generally make the 128 - 159 characters more useful for printers

A simple api could just be:

printer.setInverted(true/false)

3. Advanced 2 color printer

Add a new advanced printer that supports 2 colors slots, one for foreground and one for background. This would allow printers to create outputs just as complex as screens, but would also create new and interesting programming challenges. To create complex images, printing must be optimized to use as few background/foreground color combinations as possible.

commented

Just realized that 160 is also just blank, it would also be a good candidate for making a filled block character, unless it has some existing meaning that i'm not aware of

commented

Tangential but what about adding support for the Text Component format?

The possibility to add sprites to printed text would be amazing!

Relevant PhoenixSC video showing how it works with signs:
https://www.youtube.com/watch?v=_b8UVPtwJaA