Log In  
Follow
aced
:: Unfold ::

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?

P#132737 2023-08-04 22:11

:: Unfold ::

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.

P#132594 2023-07-31 13:06 ( Edited 2023-07-31 20:47)

:: Unfold ::

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 :-)

P#130275 2023-05-29 10:41 ( Edited 2023-06-13 09:58)

:: Unfold ::

An impostor among them... ๐Ÿง

?"แถœ2โถrw¹ใ‚ตโถ.แต‰³แถ \nใƒŠ0ใƒฆใโถ.แต‰ใ€Œใ‚›\nใƒŠ0ใƒฆใ¹ใ‚“โถ.แต‰³แถ \nใƒŠ0ใƒฆใ"

... What's the fewest tokens for a 'game'...?

P#120822 2022-11-17 01:17 ( Edited 2022-11-17 01:17)

:: Unfold ::

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)
P#119148 2022-10-15 13:18 ( Edited 2022-10-15 13:19)

:: Unfold ::

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?

P#119072 2022-10-13 22:23

:: Unfold ::

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

P#118960 2022-10-12 17:43

:: Unfold ::

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).

P#116974 2022-09-06 16:40

Follow Lexaloffle:          
Generated 2023-09-29 13:14:33 | 0.182s | Q:18