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


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


1

Yay! The long-held dream comes true!

Great stuff.


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


3

wake up babe pico-8 0.2.4c just dropped


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:


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.


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


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


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


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 !


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.


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


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)


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.


2

@Xeonic I thought you were going to just start making alt accounts to hide that it's you & stay active that way. Though someone did mention it wouldn't be hard to guess which accts would be you(the thread seems to be deleted)


2

I agree with @VgBlade, @Xeonic. It's difficult for someone to anger or insult you in a forum if you never write a message.

I'd like to believe we are all good friends in here, however there are the occasional bumps along the way.

Personally I think if you post a single cart in Lexaloffle, just one, doesn't need to be fancy, others might have a higher opinion of you as this is a programming forum and that is our focus here.

Let us all try to get along with each other ...


You realize that with the Save @URL feature along with the web runner for education you just opened the door to Pico8 games on QR codes.

Just tested this full circle and it works, how cool!



[Please log in to post a comment]