๐ณ๐๐๐๐๐๐๐๐ incantation ~
?"โถrw¹ใทโถ.\0ใ>*โฌ๏ธ@²โด" |
Does anyone else find it surprising that with fillp()
a set 1
bit draws the background color, and an unset 0
bit draws a pixel of the foreground color ? ... I appreciate it's a feature of P8 and also see why technically it may be necessary...
Just wondered what people think: are colors are inverted to convention...? ๐ค
Do you invert the fill pattern or just swap the palette colors when rendering?
Possible bug / user error / 'feature' of rounding(?)...
cls() print("0x7b18.3060") print(tostr(0x7b18.3060)) print(tostr(31512.189,true)) print(tostr(31512.188965,true)) |
Why does PICO-8 return the s16.16
value for the hexadecimal with too few digits?
i.e. the conversion with tostr() hex>dec>hex is lossy.
Hi,
I finished up my asset pack of 'retro' 8x8px repeating tile patterns:
http://8x8.me
Public Domain - free to use.
The P8 code snippets encode the image to font data, or png images are provided to load to the sprite sheet.
There's also some 'magic' to quickly try out a pattern, e.g.
?"โถrw¹ใทโถ.".."โฎโฎ,#ใ4โธโธ"
Appreciate any feedback; hope it's useful :-)
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
).