40 Pico-8s In 2018: Cart #4

It’s PICO Fireplace!

piico winter time visual

It’s a port of JP LeBreton’s PETSCII Fireplace for which I consulted Fireplace’s source code, available here

Like a lot of programmers I’m terrible at reading other people’s code and it’s something I’ve resolved to get better at.

I went into this one with the intention of porting the code as closely as I could - line-by-line where possible. Of course it didn’t turn out that way - PICO’s resolution and colour limitations forced design changes and I abandoned the purist approach early on.

PETSCII Fireplace is a mod of JP’s ASCII art editor project Playscii and a lot of Fireplace’s nuts-and-bolts functionality inherits. Things like the ‘dead’ embers fading slowly into darkness rely almost entirely on Playscii stuff so I had to implement equivalents.

In particular, Playscii has a function that counts the number of pixels in an ASCII character to measure its ‘weight’; Fireplace calls this repeatedly at startup to make a weight-sorted list of characters to paint with. I didn’t have access to an equivalent and being a big lazybones I didn’t want to port it. So instead I manually counted the pixels in 67 Pico-8 characters to make my list. My coding is excellent.

Still, I’m happy with the end result and it’s as accurate a port as I’d hoped for. And diving through JP’s code to see how it all worked was both fun and enlightening, and of course the entire point of this exercise.

Warms hands by the toasty ASCII embers before moving on to cart number 5.