Log In  

Paint a Char

A utility for creating one-off characters for use in other carts.
Immediate load this cart by load #paintachar

Cart #paintachar-5 | 2022-02-11 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
19

Creating and exporting

Paint your desired character and send to the clipboard using "c" button.
Select the type of output desired being Hexadecimal string or Binary String.
Press "x" to clear and start new.

Importing

Import hex codes to verify how they look, or edit them further.
To import a hex code:

  1. Set Paint a Char to receive hex from clipboard
  2. Copy the 16 digit hex code you want to import
  3. Paste (e.g. ctrl-v) the value in to the app
    • The import will not work if you don't past the value into the app first
  4. Press "O/C" to import the value

You should now see that hex code's rendered one-time character.
Only importing hex codes is supported at this time.

General Info

Use the output of this cart for creating one-off characters in your PICO-8 projects.

For binary encoded string you prefix the value with: "\^."
For hexadecimal string you prefix the value with: "\^:"

example cat (hex): print("\^:447cb67c3e7f0106")
example cat (bin): print("\^.$|へ|>○¹⁶")

Known issues

The binary output to the clipboard may not working correctly. There is an issue with the one-off character feature when a binary encoded string ends in a \0. In this condition, nothing renders. If the last line in your character is blank, I suggest you use hex output for now for that character. A bug report has been open here
**NOTE: This issue has been corrected in v0.2.4b

Version Information

  • v1 (30Dec21)
    • Initial Release
  • v2 (31Dec21)
    • Add import functionality
    • Change layout per feedback
  • v2.1 (31Dec21)
    • Update instruction wording
  • v2.2 (1Jan22)
    • Additional check for invalid imported hex value
  • v2.3 (8Feb22)
    • Exports control character with value
  • v2.4 (11Feb22)
    • 🤦‍♂️forgot to escape the control character
P#103849 2021-12-30 23:03 ( Edited 2022-02-18 16:19)

All Comments

@CoffeeBat has been fighting this idea for a-while, @brettski. I'm not sure what to think when someone takes another's project idea and writes their own in sequence - as close as this one is to the original.

P#103870 2021-12-31 01:39 ( Edited 2021-12-31 01:51)
2

@dw817 OP started this as a response to my video. We've only seen CoffeeBat's work later. There is no reason not to have multiple projects. There are also multiple fill pattern editors.

P#103873 2021-12-31 01:42

OK ... I'm going to take that to heart then, @Krystman.

There are a great many unfinished projects for Pico-8 I've seen throughout the years I decided to NOT rewrite and complete mostly out of respect for the author and their ambitions - if and when they decided to resurface, I would give them encouragement all the same.

If you think it's okay to have multiple projects running the same vein as another's ideas - I will consider that.

P#103874 2021-12-31 01:45

@dw8817 I am not sure what you mean by "fighting this idea for a-while". I wasn't aware their project existed when I started and seeing that I was thinking in a different direction posted it anyhow. I didn't think it was a big deal. If it is, it's only two mouse clicks to remove...

P#103877 2021-12-31 02:13

Apparently it is not a big deal, @brettski.

I remember Blitzmax being more competitive, a different programming language and another time where programmers competed to present their very best online - and it was considered bad manners to finish or succeed others' code.

Nice to see that rule does not apply here - and its up for grabs if you think you can do better. :)

I may toss my hat in the ring regarding the idea of an 8x8 image editor. But not tonight, tomorrow perhaps.

Best wishes on your own 8x8 editor. Here is a gold star for encouragement.

P#103881 2021-12-31 02:26

... I think I know why the clipboard is messing up on the binary export in Lexaloffle, @brettski. If you go into NOTEPAD and holding down the ALT-2, 5, 4 key you will get:

Which can be read as character #254 from many different programming languages including Blitz.

However, if you do this in Pico-8, printh(chr(254),"@clip") and paste it, you will get:

Pasting this in Blitz from this code you get the following:

a$="◜"
Print Len(a$)
Print Asc(a$)

1
9692

An entirely different character ! Not even in the range of 0-255. I surmise that since ZEP is using a very custom set for the characters 0-31 and 128-255 there is no easy way for you to export binary from Online and vice-versa correctly.

To see how different these characters are from normal you can try a cart I wrote as a visual tool:

https://www.lexaloffle.com/bbs/?tid=45353

Compare that with standard extended ASCII:

I ran into this problem myself when I was working on the 256-color EXE encoder in Blitz. I wanted to be able to paste characters >127 yet they did not transfer back to Pico-8 correctly, so I finally settled on 6-bit encoding.

Something to consider.

P#103948 2021-12-31 20:53 ( Edited 2021-12-31 23:34)

Interesting find. Though the issue isn't related to the clipboard. When a string is binary encoded chr(0) is encoded as \0, nul. If this is the last value in the binary string the one-time character process doesn't work. In all other cases it appears to work fine.

P#103952 2021-12-31 21:15

\0 denotes end of text according to P8SCII.

https://www.lexaloffle.com/dl/docs/pico-8_manual.html#Control_Codes

Also slight adjust in your message,

Import text must contain a 16-char hex string

# How to import:

Copy your value paste it in to this app press O/C to import it

You might add that it won't work until you press CTRL+V first. I was trying your paste and couldn't solve it till I did that. Then it pasted. Nice recognition. Interesting what you did here. You could store and edit image data for later use.

Here is the image I worked with: 082a1c7f1c2a0800

P#103961 2021-12-31 22:08 ( Edited 2021-12-31 22:13)

@dw817, thank you for the feed back. I may need to increase the error box for the text :)

...and updated

P#103962 2021-12-31 22:17 ( Edited 2021-12-31 22:33)
1

this is perfect

P#110363 2022-04-17 16:43

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 13:25:31 | 0.080s | Q:33