I have come across a bug with the rendering one-off characters using a binary encoded string. If they binary encoded string ends in a nul \0
the character will not render.
For example:
"\^.⁸\0\0\0\0\0\0\0"
doesn't work, the character will not render
"\^.\0\0\0\0\0\0\0⁸"
does work and the character renders as expected; as does other combination tried as long as the last value isn't \0
None of this appears to be an issue if values are not string encoded first. Using a variable to store a binary value and using it to render a one-off character works in a cart regardless if there is a \0
at the end.
Doing this on the Pico-8 command line:
didn't work
print("\^."..chr(255)..chr(0)..chr(0)..chr(0)..chr(0)..chr(0)..chr(0)..chr(0))
worked
print("\^."..chr(255)..chr(0)..chr(0)..chr(0)..chr(0)..chr(0)..chr(0)..chr(1))
This isn't an issue when using hex values e.g.:("\^:FF00000000000000"
always appear to work as expected)
Paint a Char
A utility for creating one-off characters for use in other carts.
Immediate load this cart by load #paintachar
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:
- Set Paint a Char to receive hex from clipboard
- Copy the 16 digit hex code you want to import
- Paste (e.g. ctrl-v) the value in to the app
Mines2
Back at it with a refactored version of the first Mines game. The goal here is learning and fun, and this project has been both of those for me.
Play
- Arrow keys to move around
- x to select tile
- z to set flag on tile
Features
- Minesweeper clone ('cuz there ain't enough of them)
- Level-progression game play
- Game field scrolls larger than game view to support super-big game fields
- Field continues indicator arrows
- Better performance at 30fps
- Intentional no mouse control to support handhelds
Hmm, that was shorter than I expected :). I wanted to refactor what I did in the first one and add levels. Which I did and they are working. It still ugly, but, well, okay. Could use some sound and music too 😉