Log In  

Hey All -- PICO-8 0.1.10 builds are now live on Lexaloffle and Humble!

Update: 0.1.10b is up with bugfixes for the html exporter. (Changes)

Update2: 0.1.10c is up with fixed atan2()

Multicart Exporter

The EXPORT command can now be used to create a single .js (and .html) file that contains more than one cart. All of the carts can read, write, and run each other as if they were local files loaded from PICO-8. To do this, add the names of up to 15 extra cartridges you'd like to include in the export: (.p8 format only in 0.1.10)

> LOAD MENU.P8
> EXPORT MEGACART.HTML JELPI.P8 DRIPPY.P8 CAST.P8

Inside the program, you can then use RELOAD() to grab data from other carts:

-- GRAB JELPI'S SPRITESHEET
RELOAD(0,0,0x2000,"JELPI.P8")

Or load and run other carts:

-- THIS WILL AUTOMATICALLY RUN THE CART
LOAD("JELPI.P8") 

CSTORE() also works in this context, either for a cart to save over itself or to write data to other carts. Each time a different cartridge is accessed, you'll see the spinny cart animation to show that a swap is taking place.

Multicart exports offer a way to package and distribute what you can already do with local files (e.g. zipping up a group of carts), but isn't supported on the BBS and probably never will be. I think feeling invited to design for single 32k carts is an important aspect of PICO-8, so separating multicarts to the exporter is a way to preserve that to some degree while still broadening the scope of what can be made with PICO-8. Future binary exporters (Windows, Mac, Linux) will also support multicart in the same way.

Glitchy Reset

Resetting via the pause menu (press enter) now corrupts the ram in a semi-realistic way for a moment, just like some old hardware might. Carts glitch out in different ways depending on how they use the RAM! Here's Mistigri:

New Demo Carts

Use INSTALL_DEMOS to add BOUNCE.P8 and SORT.P8. These are intended to be useful for teaching basic programming and computer science concepts. Eventually PICO-8 will come with a bunch of printable lessons that refer to the built-in demos.

Code Editor

You can select and then tab / shift-tab to control indentation the selected lines of code. Also double-click to select a word, and ctrl-left/right skips across words.

EXTCMD

This is function can be used to control taking screenshots and videos at precise times from within the code. From the manual:

    extcmd x

        Special system command, only works when running a local cart. 
        Where x is a string:

        "label"  set cart label
        "screen" save a screenshot
        "rec"    set video start point
        "video"  save a .gif

Raspberry Pi Improvements

0.1.10 now includes wiringPi statically linked (for gpio), so you shouldn't need to install anything else in most cases. The dynamically linked binary is back too.

I couldn't get the X11 driver to work with gles, so it defaults to rpi without windowed support. If anyone is keen to try building their own SDL2 with working X11 support, you can run pico8 with:

env SDL_VIDEODRIVER="x11" ./pico8_dyn

The mapped keyboard events for text input (SDL_TEXTINPUT) also seems to be broken for some raspis (so far observed on 2nd generation units), so 0.1.10 now detects if this is happening and uses a hard-coded US layout based on keydown events instead.

Full changelog:

v0.1.10

    Added: Multi-cart export in html
    Added: Cart reset glitch
    Added: Demo carts: bounce, sort
    Added: .p8 format can now store cart labels
    Added: Splore navigation keys: pageup/down, home, end
    Added: Splore useage hint shown on empty favourites list
    Added: Warning on boot when data folder is read-only or can't be created
    Added: Pressing tab with code selected indents those lines (shift-tab to un-indent)
    Added: Double click word to select it
    Added: Trigger screenshot/video/label capture from inside program: extcmd()
    Changed: CTRL+left/right in code editor skips to end of word or span of non-whitespace
    Changed: When a cart terminates from splore, button press is required to continue
    Changed: load("@clip") can only be called from commandline (security)
    Fixed: Can over-allocate host memory if exceed it within one frame
    Fixed: atan2(-1, -32768) crash, and error for small values of dy
    Fixed: (Web) using cstore() on self causes unloadable cart (bug introduced in 0.1.8?)
    Fixed: (web) Pressing ctrl-v crashes the player (should do nothing)
    Fixed: (Raspberry Pi) WiringPi library required in static build
    Fixed: (Raspberry Pi) Crash on exit when launching via desktop icon
    Fixed: (Raspberry Pi) keyboard input broken (observed on raspi2s)

P#33172 2016-12-07 15:07 ( Edited 2016-12-07 20:07)

I'm not entirely sure what the point of glitchy reset is, but everything else is cool :)

P#33173 2016-12-07 15:21 ( Edited 2016-12-07 20:21)

Updating my Windblows and RPI versions now.

EDIT:

I got this upon start-up of the new version. (Obviously I hit Run Anyway)

Windows protected your PC
Windows SmartScreen prevented an unrecognized app from starting. Running this app might put your PC at risk.

App:
pico8.exe
Publisher: 
Unknown publisher

P#33174 2016-12-07 15:34 ( Edited 2016-12-07 20:41)

<Multicard Exporter>
Nice! :D

Wish regarding this for the next version, being able to do that from the command line so that we can build carts with Jenkins or other CI/CD tools.

P#33178 2016-12-07 15:51 ( Edited 2016-12-07 20:51)
1

I like the glitchy reset. As someone who has grown up with a fami-clone, this brings back memories.

Actually, when I have used that reset on the game I am working on right now, it brought back the memory of how the cheap Chinese cartridges smelled.

Thanks Zep for this tiny nostalgia trip .

P#33182 2016-12-07 16:30 ( Edited 2016-12-07 21:30)

Why do we only allow 16 carts in an HTML export when the docs state you can use reload and cstore with up to 64 carts?

P#33183 2016-12-07 16:31 ( Edited 2016-12-07 21:31)

Test to check if the post "ban" bug is fixed. Can be deleted afterwards.

P#33185 2016-12-07 16:57 ( Edited 2016-12-07 21:57)

@zep> Thanks a lot :-)

I'm always surprised how you can make it better and better. I think: wha... It's perfect! and, it's improved with the next release. Continue the good job :-)

P#33208 2016-12-08 11:58 ( Edited 2016-12-08 16:58)

> Added: Pressing tab with code selected indents those lines (shift-tab to un-indent)
> Added: Double click word to select it

Yes! I really appreciate these features :)

P#33209 2016-12-08 12:09 ( Edited 2016-12-08 17:09)

Multicart Exporter is the perfect feature ! Thank you.

P#33212 2016-12-08 14:30 ( Edited 2016-12-08 19:30)

The point of the glitchy reset is to be rad. It is a rad thing.

P#33213 2016-12-08 15:31 ( Edited 2016-12-08 20:31)

These are fantastic features! My mind is boggling at what is possible with 15 carts of data. The glitchy reset is awesome, the demos are lovely and the quality of life improvements from the code editor and EXTCMD are great! Thanks zep, awesome work :)

P#33215 2016-12-08 15:45 ( Edited 2016-12-08 20:45)

Awesome features!

Any Mac OSX users here.
I'm not able to use html-export on Mac OSX 10.11.2:

> EXPORT FOO.HTML
PACKAGING 2 CARTS
COULD NOT LOAD CART #1
P#33242 2016-12-09 10:49 ( Edited 2016-12-09 15:49)

html export is broken, runs _update60() at 30 fps :(
(windows 10)

P#33244 2016-12-09 11:28 ( Edited 2016-12-09 16:28)

atan2 is returning the same value for positive and negative dy when dx is 0:

atan2(0, 1) --> 0.75 in 0.9, 0.25 in 0.10
atan2(0, -1) --> 0.25 in 0.9, 0.25 in 0.10
atan2(0.0001. 1) -- > 0.75 on both

edit: discovered very small dx with negative dy returns a correct value on 0.10

P#33249 2016-12-09 13:50 ( Edited 2016-12-09 19:17)

yeah atan2 seems like a regression to me. There's an atan2() fix in the 0.10.0 changelog, so that's probably related.

These should be going around the circle:

print(atan2(1, 0)) -- 0
print(atan2(1, 1)) -- 0.875
print(atan2(0, 1)) -- should be 0.75, is 0.25 in 0.10.0
print(atan2(-1, 1)) -- 0.625
print(atan2(-1, 0)) -- 0.5
print(atan2(-1, -1)) -- 0.375
print(atan2(0, -1)) -- 0.25
print(atan2(1, -1)) -- 0.125

P#33257 2016-12-09 16:24 ( Edited 2016-12-09 21:39)

another round, for what it's worth (0.75 everywhere on 0.1.9b):

?atan2(-0.0001, 1) -- 0.75
?atan2(-0.0001, 2) -- 0.75
?atan2(-0.0001, 3) -- 0.25
?atan2(-0.0001, 4) -- 0.25
?atan2(-0.0001, 5) -- 0.25
?atan2(-0.0001, 6) -- 0.5
?atan2(-0.0001, 7) -- 0.75
?atan2(-0.0001, 8) -- 0.75
?atan2(-0.0001, 9) -- 0.25
?atan2(-0.0001,10) -- 0.25

P#33259 2016-12-09 16:52 ( Edited 2016-12-09 21:52)

Added: .p8 format can now store cart labels

Could you elaborate on this a little please? The manual's not much clearer - are labels set by using the first 2 lines of comments as before, or with extcmd(), or will both methods work?

Love the glitchy reset. All that's missing is a cart blowing peripheral to complete the experience :) (GPIO project in the making right there?) The 'terminate' option being gone is messing with my muscle memory a little though..

P#33285 2016-12-09 23:02 ( Edited 2016-12-10 04:13)

@Catatafish: The .p8 file format now stores the label image that you capture by pressing F7 with the cart running. Previously this was only saved to the .p8.png version of the file. In 0.9 if you saved a cart that had a label image as a .p8 file, the label image was discarded. The actual image for the .p8.png is generated from both the label image and the first two comment lines.

The label image is stored as a new label section in the .p8 file. The format is 128 lines of 128 hex digits, similar to the gfx (spritesheet) region.

P#33290 2016-12-10 02:08 ( Edited 2016-12-10 07:08)

Ahh, I see, thanks. I interpreted that as the cart now storing the text label separately.
Sweet, this is going to make adding custom 'box art' much easier!

edit: labels are also saved when converting old .png carts to .p8's :)

P#33291 2016-12-10 04:05 ( Edited 2016-12-10 22:10)

That's an interesting change of pace. :D Psyched to fire it up. Hope the CHIP version is available before too long, too. Would code-editing in CHIP break compatibility right now?

P#33297 2016-12-10 07:56 ( Edited 2016-12-10 12:56)

All good stuff!

Noticed one small glitch...
On my Raspberry Pi Zero, using Copy/Paste in the code editor results in pasting two copies of the copied text!

I don't see the problem when running on OSX.

P#33310 2016-12-10 15:51 ( Edited 2016-12-10 20:51)

Nuts, I'll get some fixes for these bugs up ASAP.

EDIT: 0.1.10b is up now -- no need to patch the pico8.dat.
[But for now, to fix the html exporter I added a modified pico8.dat to the updates page. Download it and replace the existing one, and then trying exporting again.]

@Guard13007
> Why do we only allow 16 carts in an HTML export when the docs state you can use reload and cstore with up to 64 carts?

The two limits are there for different reasons; The 64-cart limit is to prevent a malicious or broken cart from looping forever writing out files. The 16-cart limit is more of an aesthetic choice.

P#33319 2016-12-10 19:00 ( Edited 2016-12-11 23:27)
P#33328 2016-12-11 06:11 ( Edited 2016-12-11 11:11)

Thanks -- fixed the URL on the download page.
An update with bugfixes will be up in ~4 hours too.

P#33341 2016-12-11 12:57 ( Edited 2016-12-11 17:57)

ok, 0.1.10b is now up:

v0.1.10b
        Fixed: HTML exporter carts don't run
        Fixed: HTML export 60fps support broken
        Fixed: HTML export when path has a space in it (common for OSX)
        Fixed: atan2 ignores sign of y
        Fixed: (Raspberry Pi) Crash when access gpio not as root
P#33364 2016-12-11 18:25 ( Edited 2016-12-11 23:25)

print(atan2(0, 1)) is still returning 0.25 and not 0.75 in 0.10.0b. Was this intended to be corrected?

P#33370 2016-12-11 21:32 ( Edited 2016-12-12 02:32)

@dddaaannn: I do get 0.75 for atan2(0,1)

but 0.25 for atan2(-0.0001,3) etc, my previous post still applies...

P#33371 2016-12-11 21:57 ( Edited 2016-12-12 02:57)

Tolja I'd return with an update. Where have I been ? Working on S3.

Looks good ZEP, downloading latest model. :)

Happy Holidays everyone.

P#33379 2016-12-12 00:14 ( Edited 2016-12-12 05:14)

OSX works fine now. thx.

P#33387 2016-12-12 05:01 ( Edited 2016-12-12 10:01)

Woooah. Good stuff. :o

P#33388 2016-12-12 05:06 ( Edited 2016-12-12 10:06)

LOAD("JELPI.P8") seems to reset all variables. What is the recommended way to pass volatile data (score, lives) to another cart? cstore and dset feel a little permanent for that purpose.

P#33389 2016-12-12 05:06 ( Edited 2016-12-12 10:06)

Thanks @dddaaannn, @ultrabrite -- 0.1.10c is up now with fixed atan2. Third time's a charm.

(0.1.10b_osx was behaving differently because of a separate bug in the build scripts)

@dw817 Cheers, and happy holidays to you too!

@TonyTheTGR The CHIP update shouldn't be far behind this time, but in any case 0.1.10 is compatible with 0.1.9b (edit on either version, play on the other), except for rare cases caused by bug-fixing.

@bee8bit
For passing up to 64 values between carts, use something like:

CARTDATA("ZEP_BLAH")
DSET(0, SCORE)
DSET(1, LIVES)
LOAD("CART2.P8")
--------------
-- CART2:
CARTDATA("ZEP_BLAH")
SCORE=DGET(0)
LIVES=DGET(1)
P#33407 2016-12-12 14:11 ( Edited 2016-12-12 19:22)

Looks good. Thanks zep!

P#33410 2016-12-12 15:14 ( Edited 2016-12-12 20:14)

:(

In MacOSX Sierra 10.12.1 (16B2555)

> EXPORT MYGAME.HTML
PACKAGING 2 CARTS
COULD NOT LOAD CART #1
P#33468 2016-12-13 20:38 ( Edited 2016-12-14 01:40)

Thank you for the multicart export feature. I hope that one day the BBS supports multicarts, or larger carts. Personally, I don't think the 32KB limit as a "feature" has any bearing, you could just designate larger carts as an advanced feature and a separate category.

P#33548 2016-12-16 01:22 ( Edited 2016-12-16 06:23)

Just wondering...

Is FOREACH supposed to highlight like a function, the way FOR or BTN do? Because it isn't doing that, and it's making me wonder if it's just failing to highlight, or if it's a non-implemented function.

P#35150 2017-01-07 08:17 ( Edited 2017-01-07 13:17)

Hi! I have no idea where to report bugs, so I'll do it here.

I just found that on linux PICO-8 doesn't check what the name of the desktop folder actually is when saving GIFs. It just assumes it to be '~/Desktop' which isn't always the case. I've changed desktop folder setting so that it's lower case. PICO-8 doesn't respect that and as a result doesn't save the GIF anywhere.

For reference this is how I configured a different desktop folder: https://askubuntu.com/questions/116276/how-to-set-the-desktop-to-home-desktop

P#42120 2017-07-01 12:48 ( Edited 2017-07-01 16:48)
P#42124 2017-07-01 14:23 ( Edited 2017-07-01 18:23)

@wavi
it looks like VgBlade found the answer to your question, so that's great.

you were also asking about where to report bugs though: I think the best place to report bugs is to make a new post in the "Support" category on the PICO-8 BBS:

https://www.lexaloffle.com/bbs/?cat=7&sub=6&orderby=ts

:)

P#42125 2017-07-01 16:09 ( Edited 2017-07-01 20:09)

Didn't there used to be an "Edit this cart" in the menu?

P#42133 2017-07-01 19:34 ( Edited 2017-07-01 23:34)

Thanks for the quick responses! I'll search next time and report to the support category if I run into any other issues :)

P#42141 2017-07-02 08:38 ( Edited 2017-07-02 12:38)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-19 07:11:36 | 0.060s | Q:82