Log In  

PICO-8 0.2.4c is now up on lexaloffle, Humble, itch.io, and for PocketCHIP.

This is mostly a bug-fixing update; you can see the main 0.2.4 change notes in the 0.2.4 thread.

URL Cartridges

With the release of PICO-8 Education Edition, it is now possible to encode cartridges into a 2040-character URL that runs it in a web version of PICO-8's editing tools. Only the code and graphics sections are stored.

> SAVE @URL
COPIED URL TO CLIPBOARD
265 / 2040 CHARS

Tiny Cartridges

When exporting cartridges to .p8.rom format (the raw 32k block of data that is encoded inside .p8.png argb data), 0.2.4c allows only the code section to be stored using the -t (for tiny) switch:

> EXPORT -T TINY.P8.ROM
WRITING 154 BYTES (CODE ONLY)

You should get a file that is exactly as large as the compressed code size reported by INFO. When using LOAD, that file will be loaded into the code section, and the other sections reset to their default states.

There isn't much practical use for tiny .P8.ROM files, but I think it is nice to be able to store a tiny program in its true tiny form on disk.

On the subject of tiny cartridges, for those making tweetcarts, you can now ctrl-click on the character count to get a twitter-character count which counts most (but not all!) glyphs as 2 characters.

Metadata

This is another technical one. 0.2.4c introduces a new metadata section to the .p8 file format suggested by @SquidLight that can be used by external tool authors. Sections with a heading of \n__meta:somestring__\n are preserved by PICO-8, but not (yet?) utilised by PICO-8 itself. So tool authors can add data to .p8 files by choosing their own meta:label without needing to stuff it into comments, or risk losing data the next time the file is saved by PICO-8 or another tool.

More details: https://www.lexaloffle.com/bbs/?tid=47063

Full Changelog

v0.2.4c

Added: save @url -- stores code + gfx as a URL if it can be encoded in 2040 characters
Added: html exports store volume/mute and other settings
Added: ctrl-g in sprite editor to toggle grid lines when zoomed in
Added: IMPORT -L FOO.PNG to import a 128x128 png to the cartridge label
Added: EXPORT -L FOO.PNG to export a 128x128 png of the cartridge label
Added: EXPORT -T FOO.P8.ROM to export only code section (t for tiny)
Added: ctrl-click on character count (bottom right) to see the twitter count (glyphs count as 2)
Added: __meta:*__ section to .p8 format -- can be used by external tools to store custom data
Added: extcmd("audio_rec") works from exported binaries, and with custom exported filenames
Added: read_controllers_in_background in config.txt (0 by default)
Changed: .p8.rom files that are 0x3d00 bytes or less are loaded into code section
Changed: saved filenames can not include gylphs, or any of !"#$%&'()*+,-:;<=>?[\]^`{|}~
Fixed: can't drag and drop png into sprite editor
Fixed: binary exports: ctrl-r causes crash when there is no whitespace at end of source code
Fixed: Using -run switch to launch a cart that fails to run -> get stuck in boot screen.
Fixed: selection after ctrl-a reports length chars+1
Fixed: draw palette is not observed after changing colours using p8scii control characters
Fixed: music playback does not follow cursor after first pattern change (regression in 0.2.4b)
Fixed: transform_screen (config.txt) not observed by pause menus and other overlayed elements
Fixed: Double-clicking sfx thumbnail (in sfx overview screen) only works after playing music
Fixed: Pressing [a] to release looping sfx in sfx editor is broken
Fixed: sfx(46)..sfx(56) return -1 immediately after playing music but before host OS has called audio mixer
Fixed: Tokens counted as 2 instead of 1: ..= ^= >><= <<>=
Fixed: Negative number counted as 2 tokens instead of one when preceeded by: \ & | ^^ << >> >>> >>< <<>
Fixed: tostr(tbl) / print(tbl) acts like tostr(tbl, 1) when tbl has a metatable
Fixed: ?"\tx" does not advance to next tab stop
Fixed: ?"a\*5\nb" does not repeat newline 5 times
Fixed: exported label alpha is 0 for colour 0
P#110017 2022-04-10 22:32

1

Ooh! Thank you for making the sprite editor grid lines a config.txt setting! It's useful to have the grid lines on when teaching young kids, so having its on/off state saved in config is quite nice.

Great update. Lots of quality of life stuff. :)

P#110053 2022-04-11 15:46
:: dw817
1

I agree, @MBoffin. And I made that very suggestion years ago. Not sure why it took so long to show up. Glad it's here now though. :)

P#110056 2022-04-11 16:03
1

Yay! The long-held dream comes true!

Great stuff.

P#110076 2022-04-11 21:52

tiny ROM files are fantastic for small demoscene programs -- the 26 byte header in .p8 files was quite large, for some categories! (I once tried to submit cls(4) as a 32-byte entry... I don't think the organizers thought it was very funny)

The tweetcart counter is neat; how synchronized do you want that to be with twitter's character count? I found two differences:

  • chr(149) --ˇ is 1 char on twitter, but 2 chars in pico8 twitter-mode
  • chr(127) --○ is 2 chars on twitter, but 1 char in pico8 twitter-mode

there might be more differences; I didn't check too hard. more info: search for "Fitting sprite data into strings" on https://www.lexaloffle.com/bbs/?tid=44375

P#110171 2022-04-12 23:17
2

wake up babe pico-8 0.2.4c just dropped

P#110187 2022-04-13 12:12
:: dw817
1

Seeing the grid now, @zep, perhaps have a choice of the 2 ? The original grid I had in mind for you to do years ago is this, although you can change the color if you like:

This is what you have for 0.2.4c currently, a separation of blocks, but not a true colored grid:

P#110250 2022-04-14 18:09 ( Edited 2022-04-14 18:17)
:: dw817

Additional problem, @zep. I was just trying out the new 0.2.4c executable in WINDOWS 10 and at least on my system CTRL+H does not show the sprite index in hexadecimal. It remains at decimal.

P#110252 2022-04-14 18:15 ( Edited 2022-04-15 01:39)

Wow this looks great! But I seem to be having an issue getting exports to run on my Raspberry Pi running Raspbian. It recognizes it as an executable, but asks what program you want to use to open it. Strange. Other than that it's all good. @zep

P#110776 2022-04-24 07:46 ( Edited 2022-04-24 07:47)
:: merwok

the executable probably needs to have the executable bit set (chmod +x yourgame)

P#110790 2022-04-24 18:25
:: zep
1

Good point @dw817 -- I made gfx_grid_lines a colour index rather than just 0 or 1 (16 for black, 0 for off). And also added hex toggling while in gfx mode.

@CraftyCommander thanks, I'll check it. The executable bit should be set on the files inside foo.bin/foo_raspi.zip but perhaps not on foo.bin/raspi/foo depending which operating system you exported it from (Windows filesystem doesn't handle unix executable bits, which is partly why I added .zip exporting as a way around this).

P#110882 2022-04-26 10:13 ( Edited 2022-04-26 10:14)
:: dw817
1

Thanks, @zep !

Please also consider adding new graphic resolutions for future Pico-8 using the same memory location and same memory size:

https://www.lexaloffle.com/bbs/?tid=47549

Especially 256x256x2 !

P#110898 2022-04-26 18:30
:: zep
1

@pancelor

> I once tried to submit cls(4) as a 32-byte entry

Haha, that's a nice example to point to if .p8.rom is ever questioned as a legitimate size-coding format. :p

Thanks for the tweet counting errors -- I went over them again and I think those were the only 2 that were wrong.

P#111375 2022-05-06 09:06

Great update! Is there any chance the save @url functionality could be made available from the command line, like pico8 mycart.p8 -export @url?

P#113207 2022-06-16 00:20
:: merwok

headless saving of URL cartridges would need to print the URL to the console, as clipboard access is most probably part of the GUI layer of pico-8.

having access to all exports in headless mode would be great though (to create P8 ROM files or export labels)

P#113223 2022-06-16 12:50 ( Edited 2022-06-16 15:55)

Is there any plan to compile this application for aarch64 (M1, etc) versions of macOS? The x86_64 version runs just fine under Rosetta 2, but this is the only application I use that hasn't been recompiled for the new CPU type, and Apple no longer sells Intel-based macs. So personally I've moved on to programming for other systems for now until an update eventually happens, rather than install the translation layer.

P#113642 2022-06-25 20:35

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2022-06-27 20:59:46 | 0.127s | Q:43