constant companion shorten your tweetcart constants!

controls:
This is a niche tool to help you save characters when writing carts that are codesize-constrained.

type in a number; press enter
then press updown and ctrl-center to copy a code
navigate back up (or press backspace) to start typing a new number

Example: 0x6000 can be written as 0x6000 (6 chars), 24576 (5 chars), 6^13 (4 chars) or ⌂-? (3 chars!)
The tool sorts the results by character count (on twitter), so the top results are your best bet.
Update: The latest versions of pico8 have special P8SCII codes for poking which are often fewer characters than calling poke directly (even after using this tool). e.g. ?'^!5f10249?' instead of poke(0x5f10,50,52,57,63). Consider using that instead! But this tool might still be useful sometimes, and at the very least, it's an interesting artifact.
motivation:
While I was making Free Cell 1K (itch | twitter | bbs) for the #Pico1K jam, I realized I could save characters by taking advantage of the built-in constants. I needed to poke a few things to various addresses (for setting the palette, drawing dynamic shadows with bitplanes, and enabling the mouse) so I had code that looked like this:



Close
Connection Error!

Please check your connection and try again.