An impostor among them... ๐ง
?"แถ2โถrw¹ใตโถ.แต³แถ \nใ0ใฆใโถ.แตใใ\nใ0ใฆใ¹ใโถ.แต³แถ \nใ0ใฆใ" |
... What's the fewest tokens for a 'game'...?
A new instance of PICO-8, will have the custom font properties set to zero.
?peek(0x5600) -- =0 ?peek(0x5601) -- =0 ?peek(0x5602) -- =0 |
This sets width and height to a default of 0 pixels. This will never be a useful default state.
It can be confusing for newcomers- and frankly is easily forgotten / overlooked for experienced users- when working with custom fonts.
Request:
- Initialise custom font properties to a reasonable default of 8 x 8 px, which matches the one-off character default. i.e.
poke(0x5600,8,8,8)
Possibly a bug or just a quality of life issue...
Functions should handle trailing commas gracefully.
data={1,2,3,} -- trailing comma poke( 0x5600, unpack(data) ) -- works poke( 0x5600, 1,2,3, ) -- fails |
... this may be fundamental to Lua?
Hi,
I'm working on a collection of 'retro' 8x8 repeating patterns.
Since the fillp()
function only supports 4x4 px patterns, the nearest data format is using Custom Fonts (1bit per pixel, 8x8px).
I'm planning on something like this:
?"\^!5600โธxโธ\0\0" -- 97 'a' stonewall poke(0x5600+(8* 97), 14, -- โโโโโโโโ 230, -- โโโโโโโโ 240, -- โโโโโโโโ 102, -- โโโโโโโโ 15, -- โโโโโโโโ 95, -- โโโโโโโโ 206, -- โโโโโโโโ 224 -- โโโโโโโโ ) -- 98 'b' picket poke(0x5600+(8* 98), 0, -- โโโโโโโโ 34, -- โโโโโโโโ 102, -- โโโโโโโโ 255, -- โโโโโโโโ 102, -- โโโโโโโโ 102, -- โโโโโโโโ 255, -- โโโโโโโโ 102 -- โโโโโโโโ -- ... ) |
and then to render the pattern,
print "\014aaabbb" print "\014aaabbb" -- etc. |
Request for feedback:
(esp. @Heracleum, @dw817) ~ Is this reasonable?
Is there a more appropriate data type / graphics method?
Many thanks,
Andrew
Hi,
Playing with custom fonts, I found that the \n
escape sequence cannot be followed by an a
in the string (probably an issue also with 0
-9
and a
-f
). This doesn't occur in the default font mode (works as expected)...
poke(0x5600,8,8,8,0,0) -- setup 8x8 font -- Char 97 'a' poke(0x5600+(8* 97), 12,108,99,3,48,54,198,192) -- Works with "\n a" ?"\014 a\n a" -- Missing character with "\na" ?"\014 a\na" |
Possible bug: \na
shouldn't be treated as an escape code for custom fonts (just \n
).