A heads up for Voxatron users -- the first version of the Lua api will be out next week in 0.3.5!
Pictured above is the result of drawing voxels directly into a room's map. The 0.3.5 api also provides access to actor attributes and state, spawning, camera control, and direct access to the display. The entire PICO-8 api is in there with some 3D counterparts (line3d, box, sphere), and it's possible to import a pico-8 cart into the resource tree, place it in a room, and run the cart on a single slice of the display. The .p8 cart shows up in the resource navigator, and is placeable in the room like this:
The code can also be edited to make slight adjustments for the 3d display:
In other news, I've updated the website with mobile-friendly cart listings and touch controls for the carts. It's still a work in progress -- the sound in particular is very choppy or missing altogether. But apart from that it is quite useable. If you have a modern phone or touch device please try it out!
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)
This is a bug-fixing update, mostly for crashes related to switching between widowed mode, full-screen and minimized windows. I've also included the dynamically linked pico8_dyn versions in the linux archives, that were missing from 0.1.9.
The Windows installer & .zip file include a more recent sdl2.dll, although there weren't any known issues relating to that.
I've switched back to shift-a..z for glyph entry in the code editor, as alt-a..z is sometimes reserved by the host operating system. If you find yourself accidentally entering the extended characters by accident, you can turn this off in config.txt (near the bottom). To enter glyphs without shift-a..z, press ctrl-k to toggle glyph mode.
v0.1.9b Added: Alternative function key mapping: ctrl-6..9 for F6..F9 Added: Alternative glyph entry method: (ctrl-k) to toggle glyph mode Changed: Enter glyphs with shift a..z, but can be disabled in config.txt Changed: Increased emscripten ram to 128MB (some carts at risk of running out) Fixed: Crash when window size is tiny or minified Fixed: Crash on toggling fullscreen mode Fixed: printh can write files outside filetree (security issue) Fixed: show_fps (can also now be toggled with ctrl-1) Fixed: Shorthand if/then syntax error when using the form: (functionname)(param) Fixed: log.txt not saved in path specified by -home switch Fixed: Default application data folder created even when -home specified Fixed: Missing dynamic builds (pico8_dyn) from linux archives Fixed: Removed unneeded RPATH from linux binaries Fixed: export foo%d.wav fails to write multiple files
Posting Carts via ClipboardThe handiest new feature is being able to post cartridges to the bbs via the clipboard, without ever saving it as a png. Use "SAVE @CLIP" to copy to the clipboard as text, and then paste it into a post (hit Preview to make sure it worked and to get rid of the wall of text). You can also copy carts from the BBS (look for 'Copy' under each cart) and paste it back into PICO-8 with "LOAD @CLIP")
Posting GFX via ClipboardYou can also do the same thing with sprites. Using CTRL-C in the sprite editor also stores a copy of the sprites as text in the clipboard, and can be pasted back and forth to BBS posts. Here's an example: (click the 40x8 and then CTRL-C the text to copy&paste it back into a cart)
There's a new category in the BBS called Jam, which shows up in SPLORE. The Jam sub-forum (along with clipboard cart&gfx pasting) will be useful for things like the Tweetjam thread and for having a natural place to discuss / post ideas for external jams like Ludumdare.
I originally envisaged Jam-related stuff going in Collaboration, but I think Jam can grow into something quite worthwhile and separate. Collaboration will also be extended at some point to include a 'snippet library' of re-useable pieces of code/gfx/audio, which feels quite different from jamming.
Raspberry Pi GPIOIf you have a Raspberry Pi and an LED, try jamming one end into GPIO1, and the other one into GND, and you can make it blink on and off with POKE(0x5f81,255) and POKE(0x5f81,0). Note that you'll need to run PICO-8 as root: sudo pico8
60FPS HTML5Exported html can now run at 60fps. To improve performance, the web player now always runs on a 128x128 rather than performing the scaling in software. If you are writing your own html shell for the exported .js, you'll need to do an unfiltered scale of the canvas to the desired size. (See the default exported 0.1.9 html shell for an example).
Pixel-Perfect ScalingWhen changing the window size of PICO-8, or swapping from a window to fullscreen, PICO-8 now chooses the largest integer scaling factor that will fit inside the window to avoid blurry filtered pixels. For example, on a 1920x1080 real-world display, the largest scale is 8 which gives a 1024x1024 PICO-8 display.
PocketCHIP UpdateWe're working on it! I still can't give an eta on the PocketCHIP update, but the latest build is in testing and looks good across kernel versions, including GPIO access (so will likely skip to 0.1.9). It still needs to be coordinated with other things happening at Next Thing Co. though, so I'll keep you updated here.
Coming UpThere are still a bunch of small issues with the editors I'd like to improve, but PICO-8 is starting to look pretty close to beta! Next up will be website improvements to complement the clipboard & Jam category additions, and also long overdue support for touch devices. The main feature missing for beta is being able to login and submit scores from carts using SCORESUB(LEVEL, SCORE).
The next Voxatron update also has some new PICO-8 stuff -- the first version of the Voxatron API is a superset of PICO-8's and allows mapping one slice of Voxatron's display to PICO-8 video memory. (The display is basically a stack of 64 PICO-8 screen). So you'll be able to load PICO-8 cartridges into a Voxatron cartridge and make wee arcades and weird 3d ports and whatnot. It's fantasy consoles all the way down!
Added: Copy and paste sprites and whole cartridges directly to BBS posts Added: JAM category in splore Added: GPIO support for Raspberry Pi Added: Read clipboard using stat(4) after user presses CTRL-V Added: printh() can optionally write to a file or the host clipboard Added: Editor tool information and tips shown on mouseover Added: Set desktop path with -desktop (screenshots and gifs are saved here) Added: Warning on saving .p8 when compressed code size exceeds .p8.png limit Added: Alternative editor colours // config.txt: gui_theme 1 Added: Dotted line every 8 rows in song view Added: -screenshot_scale (default: 3) and -gif_scale (default: 2) Added: Can use ctrl-up, ctrl-down to jump to start and end of code Added: CTRL-M to mute/unmute sound Added: HTML5-exported carts support 60fps Added: Timeout switch for splore downloads: -timeout Changed: Glyph characters typed with alt + a..z Changed: stat(0) does not include allocations waiting to be garbage collected Changed: Unfiltered screen stretching at integer scales by default Changed: Removed -aspect and -scale settings (use draw_rect instead) Fixed: -home has no effect under Windows Fixed: Sometimes frame skipping starts before CPU useage has reached 100% Fixed: Double-speed BTNP() timing in 60fps mode Fixed: Exported HTML fails when _update60 is used instead of _update Fixed: Can't copy and paste button glyphs Fixed: Lines containing glyphs do not scroll far enough horizontally Fixed: Loading .p8 renamed as .p8.png from splore freezes Fixed: Bucketfill in map doesn't sync to shared memory Fixed: fset fails when de-setting flags Fixed: Syntax error when beginning with the form: IF (..) [OR|AND]\n Fixed: cls() costs twice as much cpu as it should Fixed: wav file exporter missing some data / writing truncated buffers Fixed: Entering new notes in song view doesn't observe current volume, instrument Fixed: alt-tab sometimes generates alt character text entry event Fixed: Resuming a cancelled download in splore causes crash Fixed: Controller attributes in log.txt always shown as -1
Hey All -- PICO-8 0.1.8 builds are now live on Lexaloffle and Humble! Note that there was no 0.1.7 release for Desktop; there were in-development versions of 0.1.7 released early for web and Pocket C.H.I.P. to resolve pressing issues, so I'm calling this 0.1.8 to keep version numbers in sync across platforms. New stuff:
60 FPS supportThis breaks the 'every cart runs the same on all PICO-8s' rule of PICO-8's design philosophy a little bit, but I think it's worth it! On all of the desktop host platforms, it is now possible to make cartridges that display and update at 60 frames per second instead of 30. You don't get any more CPU though, so that means half the usual CPU allowance per frame. From the manual:
:: Running PICO-8 at 60fps If _update60() is defined instead of _update(), PICO-8 will run in 60fps mode: - both _update60() and _draw() are called at 60fps - half the PICO-8 CPU is available per frame before dropping down to 30fps ** please note that not all PICO-8s support 60fps. On machines that do not support it, _update60() will instead be called twice per frame and _draw() at 30fps. You can check the behaviour of your program running at 30fps by adding the following snippet to the bottom of your code: u60=_update60 _update60=nil function _update() u60() u60() end
The two action buttons on the PICO-8 controller are called O (BTN(4)) and X (BTN(5)). To make it easier to print instruction in-game explaining the controls, you can now insert glyph characters directly into strings in your code with Shift - U D L R O X.
Adjust the maximum GIF length in config.txt or by running PICO-8 with -gif_len n switch, where n is the number of seconds to record for (maximum: 120). The GIF output is not optimized, so you might want to run it through an optimizer to get smaller file sizes.
Custom Menu ItemsIt is now also possible to add your own items to the pause menu to trigger things like 'RESTART PUZZLE' or 'EXIT TO OVERWORLD'. Here's an example program:
col=12 function _draw() cls() rectfill(0,20,127,107,col) end function changecol() col = (col+1) end menuitem(1, "change colour", changecol)
The first parameter is the position (1-5) in the menu to insert the item, the second is the item's label, and the 3rd is a function to be called when the item is selected. I opted to keep this simple and quite rigid, so there's no way to have extra stuff going on in the background while the cart is paused, or to re-appropriate the pause button as an in-game button.
Music ExporterTo record a .wav of a PICO-8 tune, first navigate to the pattern you'd like to start from in the music editing mode, then press escape to enter the console and type:
If the song is looping, it will export around 4:30 that you can then manually trim in a [sound editing program](http s://sourceforge.net/projects/audacity/).
Pre-installed GamesThere are now 5 BBS games that ship included with PICO-8, so that it's easy to get up and playing something more than the demo carts, even when internet access is not immediately available. To install them, use INSTALL_GAMES -- they will be accessible from your favourites list in SPLORE. The games are Celeste, Frog Home, Tower of Archeos, Hug Arena, and Dusk Child.
Linux BuildsI've included both statically and dynamically linked versions of the executables for i386, amd64 and Raspberry Pi. The RasPi build still depends on bcm, so it is tricky (impossible?) to get it up and running on Chromebooks.
I plan to look at better Chromebook support at some point, but it will probably have to be during beta. Pocket C.H.I.P. owners, and later on regular C.H.I.P. owners can expect updates too, of course --- but we are still sorting out details and it will take a while. o( )o
Next up, 0.1.9 will be mostly ongoing bugfixes, and improvements to the web player (optimization, fold-out touch controls for mobile, and controller instructions).
v0.1.8 Added: 60fps support Added: Music exporter Added: Custom GIF length (maximum 120 seconds) Added: -,+ to navigate sprite tabs, sfx, music patterns Added: sfx editor: navigate with home, end, pageup/down, mousewheel Added: <, > to modify sfx speed, or click and drag Added: Middle mouse button to pan around spritesheet / map Added: Shortcut command for splore: S Added: Pre-installed selection of BBS cart (use INSTALL_GAMES) Added: Warning when saving .p8.png with no label Added: (OSX) logging to ~/Library/Logs (viewable with Console.app) Changed: Can not CTRL-S save over a loaded bbs cart Changed: Only .p8 files listed by dir() and by splore Changed: Command history increased to 256 Changed: exit() / shutdown() have no effect while running cart Fixed: Memory useage (stat(0)) inconsistent across host platforms Fixed: Spinny disks shows when reloading current cart with load() Fixed: GIF saver does not respect 64x64 / mirrored modes Fixed: Miscellaneous multi-line comments / strings issues Fixed: Empty map cels cost cpu in mapdraw() Fixed: mapdraw() slowdown when drawing bottom half of map Fixed: preprocess changes semantics when += and : operators on same line Fixed: Identifiers starting with underscore counted as extra token Fixed: Saving .png exceeding compressed code limit fails silently Fixed: Right-clicking a sprite does not set the currently edited sprite Fixed: (Windows) extra space added to pasted lines Fixed: spr() expensive when drawn with low negative coordinates Fixed: pipe character identical to colon character Fixed: (Raspberry Pi) shift key appends a character when entering text Fixed: Editor mode buttons are still clickable during cart runtime Fixed: When loading a .p8.png file, label is reset and needs to be re-captured Fixed: export() does not report failure Fixed: mset()'d changes in shared memory not readable via peek() / sget() Fixed: cstore() saving edited code Fixed: audio pop between patterns during music playback v0.1.7 Added: menuitem() Added: button glyphs in code (shift-L, R, U, D, X, O) Added: Customisable data directory (e.g. pico8 -home mydata) Added: Web gpio pins: read and write pico8_gpio in javscript Fixed: SPLORE search doesn't reset Fixed: Splore skipping 33rd cart listing after loading more items Fixed: Crash when selecting a local binary file in splore Fixed: Semicolon can't be used as a list or statement separator Fixed: Exported html can not cstore self
The theme for the second PICO-8 Jam was Chain Reaction, and there were 35 entries. Thanks to everyone who contributed and made this jam a another splendid event. I hope you'll join me in congratulating the winning entry, which received a whopping 7.3 PICO-8 star average.. theatrically opens invisible envelope
NuSan! With Combo Pool.
As a token of gratitude for laying down this most excellent cartridge, NuSan will be receiving a commemorative cross-stitch based on the cart.
You can play all of the entries by clicking on this montage:
That was fun -- let's do it again sometime soon!
If you'd like to take part in P8JAM2, please select one or more themes by clicking on the PICO-8 star next to it (you need to be logged in). You can change it anytime before the 24h voting phase ends -- at 00:00 PST on Saturday the 21st. Check out the jam thread for more details.
Edit: times's up! The winning theme is Chain Reaction. You have 9 days! Good luck!
I'm in the process of simplifying the website a little. In particular, I wanted to improve the experience of playing cartridges in threads by removing clutter. They now look more like a page dedicated to the cart:
- The player starts open
- There's a big obvious play button and large thumbnail
- There's no banner at the top of each page
I removed the PLAY buttons from the thread previews, and autoplay, as I think they're no longer needed -- the whole playable region of a cart is now visible without scrolling after opening the cart's thread, and it's more obvious to new visitors what to do next.
There are still a few small things to finish, but let me know what you think of the new layout, and if there's anything that bugs you.
Time for another jam! EDIT: The theme is Chain Reaction.
and... that's time! Thanks everyone who contributed a cartridge! If you submitted something with the p8jam2 tag, you can now rate other p8jam2-tagged carts at the top of the cart's thread.
If you'd like to continue working on your cartridges, feel free -- but please leave the compo version at the top of the p8jam2-tagged threads until voting finishes in one week (June 5, 24:00 PST). Good luck!
Same deal as last time, except with some limited theme voting:
Duration: The Jam will take place from 00:00 PST on Saturday the 21st of May 2016 and will finish at 24:00 PST on Sunday the 29th. So, it spans 2 weekends and 5 weekdays. You can spend as much or little time on your carts as you like. Tiny silly cartridges are more than welcome.
Theme: As is customary with other jams, a theme will be posted at the start and the goal is simply to make a cart (or some carts) during the jam that reflect your interpretation of the theme. Any type of cartridge is ok: games, toys, demos, music carts or pixels.
This time, the theme will be selected by a small twitter poll that begins 24 hours before the jam starts.
Submitting: To submit or update a jam cart before the deadline, just tag it with p8jam2. You can update your cartridge as often as you like before the deadline.
Voting: Jam participants will be able to use a voting widget on all p8jam2-tagged carts, and exactly 1 week after the jam finished, ratings will be tallied.
There will be a small mystery prize for the highest rated cart, but you should enter for glory and honor (or just for kicks).
During the jam, you'll be able to view all carts and posts tagged with p8jam2.
Rules: Teams / collaborations are allowed, in which case you should nominate one user to be the submitter (and voter). Re-using existing PICO-8 cart material is allowed as long as it is ok by the author, and that the carts are publicly available before the jam starts. Submissions should be mostly new material created during the jam, but it's ultimately up to other participants making ratings to decide what's cool and what's not.
If you're looking for a complete portable PICO-8 solution, good news! PICO-8 is going to ship pre-installed on Next Thing Co.'s upcoming PocketC.H.I.P. -- a complete portable mini-computer with built-in storage, wifi, keyboard, battery, touchscreen and everything else PICO-8 needs! The last few months, I've been working closely with the team at Next Thing Co. to create "PICO-8 C" -- a fully functioning and compatible edition designed to integrate nicely with NTC's hardware and software. It will be available to Kickstarter backers, or you can also pre-order one for just $49 bucks.
You can read more about the PocketC.H.I.P. over at getchip.com