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 ExporterThe 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 ResetResetting 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 CartsUse 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 EditorYou 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.
EXTCMDThis 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 Improvements0.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.
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)
I'm not entirely sure what the point of glitchy reset is, but everything else is cool :)
Updating my Windblows and RPI versions now.
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.
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.
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 .
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?
Test to check if the post "ban" bug is fixed. Can be deleted afterwards.
The point of the glitchy reset is to be rad. It is a rad thing.
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 :)
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
html export is broken, runs _update60() at 30 fps :(
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
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
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
|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..
@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.
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 :)
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?
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.]
> 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.
https://www.lexaloffle.com/dl/7p8rt2/pico8.dat -> FILE NOT FOUND
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
@dddaaannn: I do get 0.75 for atan2(0,1)
but 0.25 for atan2(-0.0001,3) etc, my previous post still applies...
OSX works fine now. thx.
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.
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)
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.
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.
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
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:
[Please log in to post a comment]