Log In  
Follow
brettski
Paint a Char
by

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)

[ Continue Reading.. ]

1 comment



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

[ Continue Reading.. ]

19
10 comments



Cart #brettski_mines2-2 | 2022-02-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

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 😉

[ Continue Reading.. ]

0 comments



Yet another mines clone.
Still working out

  • some of the end game flag logic
  • surrounding graphics
  • levels
  • sound affects

Cart #brettski_mines-1 | 2020-04-24 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

0 comments



Cart #brettski_clock-1 | 2020-10-25 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

Hey so I built a clock. Just because :)

It actually turned out to be a pretty fun little project.

Cart #brettski_clock-0 | 2020-06-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

2
0 comments