PICO-8 0.2.4 is now up on lexaloffle, Humble, itch.io, and for PocketCHIP.
This update is another attempt at freezing the API before the last feature update (0.3 -- high scores), but let's see how it goes! 0.2.4 also includes an important security update (see below for details), so please do consider updating. Cartridges posted after this release post will only be visible from SPLORE when running 0.2.4 or later.
64k RAM
64K of Base RAM is now enabled by default. In 0.2.4 it is safe to PEEK/POKE/MEMCPY memory 0x8000 and above (i.e. -0x8000 .. -1) without setting the hardware extension bit at 0x5f36.
Because PICO-8's numbers only cover 0xFFFF, this means it is impossible to poke or memcpy out of range. The original motivation for having 32k by default was to give new programmers some concept of illegal memory operations, and as an extra form of feedback when code isn't working as expected. But over time, these reasons haven't proved as useful as the benefits of allowing 64k by default. Additionally, 0.2.4 introduces the first feature that explicitly uses the upper 32k section (see Big Maps).
(click to expand)
Heeey, it's Squiddy! This is a game made in 1017 bytes for PICO-1k Jam, co-designed and pixelled by @castpixel (twitter). This is our second production as pod; you can find the first one here. Squiddy is also up on itch.
Technical Details
1024 bytes is an interesting size limit for a game; it's large enough to try for some relatively detailed game logic or visuals, but small enough that you need to execute some weird programming tricks and design pivots to get everything to fit. If you found this post because you heard that PICO-8 is a nice introduction to game programming, I apologize for the following code snippets! First up, here is the full source code for the game that includes the graphics and map data. It can be pasted into PICO-8 0.2.3 or later:
➡️=0t=8⬇️=7for x=0,3800do ➡️-=1if(➡️<1)➡️=2r=3⬇️=7-⬇️ while r>2do r=ord("○ュ?\0゜ョヤャ◝◝⁷ツん¹ュ=◝に◝+ンョャヤ○る³ユ\n <◝エ𝘤ムもにュよ◝トラ⁙⁴よ░²リムリᵇ³ト■𝘨○ワ;◝エらョ0\0pクシチ◜◝=ュoれ/ウワ◝モャいユ𝘪ゆ?=0◝cりdオトは⁷ト?⁵\0𝘴リ◆○☉6サ¹6ア?ュ◝❎。。ユユ◝ャヤ2v\0q○¹\0ワw3v\0001よ¹\0◝?𝘰v⁴ャ゜⁴ら█pタp⁵ュ?オ; <○○ヨ◝oに◝𝘰ュ?1░ろヲア◝ᵇp○\0s³ヲュひ\0|れツ◝リツ𝘰゜6ト⁴ュ?p◜◝モpᶜオん▶○◜ャ\r○𝘣◝▶トリに1◝⁷ョ_ンん゜ョょ737⬇️○ョ¹ュのら◜-エs○ユト⁴らメ\0³•~◝エろヨ/゜3\0な?𝘯ュ◝よ▮ラヨsクろ?リトンミエセろ⁵ᵇムり3オ◝𝘮rユ⁷ワ>pンᶠ゜シてン>ナレ◝𝘰⁙ュuワ◝シ◝1゛ュ4チ◝?◝◝𝘰\0゜ᵇユ◝エ◝4◀0○ ◝◝◝◝◝\0ら𝘬\0",t\8)>>t%8&3t+=2➡️+=r end sset(x%95,x\95,⬇️)end o=128w=256f=0r=4128🐱=cos ➡️=0 ❎=64🅾️=r*2s=spr::_::t+=.03camera(❎,🅾️)map()v=0for i=0,t/2do x=i\32y=i%32v/=2v+=sget(r%o+x/4,r\o+y/4-🐱(i/870)/2)&4mset(x,y,v)p=i%4y=i\4*5%31 if(mget(x,y+1)==4)s(0,x*8+🐱(p/4-t),y*8-p*4) if(r%5==2and i<o)s(i&2,-t*i%w,i*i%w+🐱(i/9+t)*3)➡️-=1>>12 end if(r==4136)s(8,92,112,5,5) s(20,o+🐱(t/2)*9,90+r+🐱(t)*5,1.5,2)b=btn()n=b&32f=f/2+n/20k=b%4\2-b%2if(f>n)➡️+=f*k ⬇️-=f f=0 ❎+=➡️ 🅾️+=⬇️ ➡️=-➡️ ⬇️=-⬇️?"ᶜe\^wfin ♥",108,60+r if(mget(❎/4,🅾️/4)<1)➡️*=-.95⬇️=.05-⬇️*.9 r+=(❎\o+🅾️\o*o)*8❎%=o 🅾️%=o s(16+(f&2)+k%2*32,❎*2-8,🅾️*2-8,2,2,k<0)?"⁶1⁶c" goto _ |
Sprite Storage
Here's the 95x40 spritesheet (hidden for spoilers).
PICO-8 0.2.3 is now up on lexaloffle, Humble, itch.io, and for PocketCHIP.
This update is focused on resolving runtime issues, with a couple of small but handy features thrown in for good measure:
Lucky Draw
To grab 32 random cartridges from the BBS, there is now a 'Lucky Draw' list in SPLORE. It is more likely to select cartridges that have more stars, but even unrated carts have a decent chance of appearing. Perhaps this will be a way to unearth some undiscovered gems, or just to find something new to play without scrolling back through several years of carts.
The list is cached, so it only changes every 2 minutes or so. But you can keep paging through the list to get new items forever.
Live Token / Character Count
Select some text in the code editor to view how many characters or tokens are contained within.
My entry for TweetTweetJam #6: a game in 2 tweets (at 558 characters)
Roll right without crashing for a high score (or left for a low score)
CTRL-R to restart
Hold X when landing to jump.
o=128x,y,u,v,h,p,s,d=o,0,0,0,0,32,sin,circfill::_:: ?"\^1\^c" for i=-o,384do j,l,b=x\1+i,h,btn()h,a=s(j/o)+s(j/93),p+i/4 line(a,0,a,h*2.1+p)h=p+h*5*max(s(j/3^7)) if(i==0and y>h)then if v>0then u+=v*(h-l)v*=-.7else v+=u*(h-l)end y=h if(b>9)v=-4 end for z=0,2,.2do pset(p+i/z,67+h/z,12+(h-l)*4)end end for i=-o+x&-p,x+o,p do a=-t()/(4+i^2%29)m,n=o+i+cos(a)*p-x,s(i/999)*80+s(a)*p [ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=93976#p) |
Dig to collect gems, and don't get squashed! A wee game made in a weekend for Ludum Dare #48. You can find the compo entry here: https://ldjam.com/events/ludum-dare/48/diggleoid
PICO-8 0.2.2b 0.2.2c is now up on lexaloffle, Humble, itch.io, and for PocketCHIP.
This is a bug-fixing patch for 0.2.2 -- see that thread for a summary of recent features.
0.2.2b does have a few small features though. You can now use a .lua.png extension with the EXPORT command to get the source code (all tabs) of your cartridge printed out to an image with roughly A4 dimensions. This is intended mostly for visualisation purposes, and lines are cropped to 188 pixels (47 characters) wide. The jelpi demo source code is bigger than I imagined!
EXPORT JELPI.LUA.PNG |
dots3d.p8 is much cuter
There are also some new extcmd() commands for setting screenshot output filenames, and the window title (intended for exported binaries).
I've also added a way to force the pause menu to come up, even if the cartridge is blocking it with poke() trickery. Simply hold the pause button for half a second, and the menu should come up no matter what (it's implemented at a low level). This might be useful when using SPLORE from a sofa, and a keyboard isn't available to terminate stubborn cartridges.
Full list of changes:
[hidden]
v0.2.2c
Fixed: ?"\ac0" starts from d#0 instead of c0 (again -- 0.2.2b was still broken)
Fixed: splore local directory navigation fails when using a relative home path set with -home
Fixed: export .lua.png only shows the first 2730 lines
v0.2.2b
Added: export foo.lua.png to get an image of the cartridge's source code
Added: Pause menu can be forced to appear by holding down pause for 300ms (even if program blocks it)
Added: extcmd("set_filename","foo") -- set the filename of the next screenshot or gif (can include %d)
Added: extcmd("set_title","foo") -- set window title (useful for exported binaries)
Added: Can toggle punyfont mode at command prompt w/ ctrl+p (useful for inspecting puny variable names!)
Changed: Default filename is /untitled.p8 instead of no filename (auto-increments to untitled_1.p8 etc.)
Changed: circ/oval that are not visible cost almost nothing, including circles that contain clipping region
Changed: filled circles/ovals that contain clipping region cost the same as the equivalent rectfill
Changed: shift+enter in code editor only auto-completes block for DO, THEN, REPEAT or FUNCTION
Fixed: ?"\ac0" starts from d#0 instead of c0
Fixed: preprocessor regression when using string at end of ..= statement: if (true) then a..="b" end
Fixed: pressing L / R in paused menu is registered by running program after closing menu
Fixed: printing text in tall mode (?"\^ttall") via commandline can chop off bottom line before scrolling
Fixed: drag-select text with cursor at bottom or top of screen scrolls too fast
Fixed: spurious stat(0) results when using yield() to exit frame instead of flip()
Fixed: line()/tline() sometimes draws pixels on opposite side of screen (0.2.2 regression)
Fixed: line()/tline() fails to draw lines that have x or y coordinates > 32767 pixels apart
Fixed: can peek() more than 8192 values in single call
Fixed: large fill circles (> radius 900) render incorrectly close to vertical center (32-bit builds, web)
Fixed: even-widthed filled ovals with midpoint < 0 is drawn off by 1
Fixed: black pixels in gif / map export not completely black
Fixed: map and spritesheet exporters do not respect current display palette and 0x5F36:0x8 (draw spr 0)
Fixed: code editor: cursor position off by one when selecting character after glyph (0.2.2 regression)
Fixed: code editor: tab names don't show up when 100% punyfont
Fixed: import spritesheet.png failing under MacOS (0.2.2 regression)
Fixed: export single sfx to .wav crashes when contains sfx instrument references
Hey All! PICO-8 0.2.2 is now up on lexaloffle, Humble, itch.io, and for PocketCHIP.
This release follows a pattern set by previous 0.2.* updates in that I set out to fix a bunch of bugs and resolve design details, but in doing so, went down some deep rabbit holes and came out the other end with brand new features. As a result, some of the new features are on the advanced side, and this post will be likewise be more technical than usual. But I hope everyone can find something fun to mess around with!
SFX Filters
At the bottom of the SFX editor, you can now find 5 switches that alter the characteristics of each instrument. You can get a much wider variety of sounds and textures now, but they're meant to feel like variations on the existing instruments rather than completely new ones. I settled on this scheme after working on Voxatron's sound system and found that I could boil the set of parameters I wanted down to just 7 bits of information -- which is fortunate because there were only 7 unused bits left in the SFX data!
[O] (z/c): Run / Fly
[X] (x/v): Jump
Left / Right: Turn while in mid-air
v3 update: [X] also accelerates to make mobile controls easier
This is intended to be mostly a toy rather than a game, but you can get points for doing tricks!
Front / back flips (more points for 2x, 3x)
Early Santa: Santa lands early
Sneaky Weasel: Back flip close to the ground
Moon Grazer: Jump High
Glider: Jump Long
Fishtail: Do a bunch of wavey turns in mid-air
Firebird: Dangle Santa like he's the pod from the videogame Thrust
Santa Smash: Santa lands upside down. Don't do that trick.
This game is my contribution to the 2020 PICO-8 Advent Calendar. The calendar always surprises me with its sheer variety and depth of joyful creations, and this year is no exception! I encourage you to have a rummage around inside the advent calendar for the Full Experience (here's the menu cartridge), but to whet your appetite, here is also a partial gif dump:
A couple of carts for #tweettweetjam 5 that fit in 560 chars or less.
Cosmic Painter
L/R to rotate
O to accelereate
X to paint
Comets
Just avoid the comets for as long as you can! My best is 49
Crashing into the score kills you.
Wobblepaint started as a secret cartridge in my 2019 Advent Calendar entry, but I think it's time for a proper release! This version has some extra controls and nicer, less crinkly wobble.
Instructions
Your brush has a size, colour, pattern and shape that can be adjusted separately. There are 4 presets you can select and modify using keyboard shortcuts, or by clicking and dragging the top menu bar down to reveal a palette of attributes.
Instructions
CTRL-Z, CTRL-Y (or S,F) to undo/redo
CTRL-C, CTRL-V to copy and paste between doodles
Hi All! PICO-8 0.2.1b is now up on lexaloffle, Humble, itch.io, and for PocketCHIP. This update started as a continuation of 0.2.0 bug-fixing work, but I also relaxed my position on API minimalism just enough to add some new features :D
UPDATE: 0.2.1b is now live and fixes the print() bug, and a few other things. See the changelog below for details.
Ovals
You can draw ovals (technically, ellipses) both when running a cartridge, and when using the shape tools in the graphics/map editors. Ovals are specified by their boundary rectangle, and follow the usual draw state rules.
pattern={[0]= …,∧,░,⧗,▤,✽,★,✽, ˇ,░,▤,♪,░,✽,★,☉, ░,▤,♪,░,✽,★,☉,…, ∧,░,⧗,▤,✽,★,✽,★ } function _draw() cls(1) for i=0,31/32,1/32 do local x=64+cos(i+t()/8)*48 local y=64+sin(i+t()/8)*44 local w=8+cos(i*2+t()/2)*6 local h=8+sin(i*3+t()/2)*6 fillp(pattern[i*32]) ovalfill(x-w,y-h,x+w,y+h, (i*32)%8+8) end print("pico-8 0.2.1",40,62,13) end |
// Promo video by m7kenji with music by Kyohei Fujita
Shibuya Pixel Art 2020 is accepting submissions until the end of June, and this year there is a new category for 128x128 games! Lexaloffle is sponsoring the game category with a prize (a Picade Cabinet), and by offering a limited number of PICO-8 licenses to participants.
Similar to a game jam, entries should be based on one or more of the following themes: Shibuya, AI, Humanity, Game and/or Landscape. Unlike typical game jams, existing work can be adapted or reused, as long as it did not win a previous contest. You can find previous winning entries for 2018 and 2019.
Back to 2016! This is a demo @castpixel (also on twitter ) and I made in the weeks leading up to Tokyo Demo Fest 2016, as newly formed group: POD. Because it was made in a hurry, I felt I should tidy up the code before posting it. But that's never going to happen, so here's an even messier post-compo version with a few extra details added instead! The rotating orbycube effect can now be found in /demos though if you'd like to see roughly how it works. Also, if you're curious you can find the compo version with: load #orbys_compo
Download 0.2.0i at lexaloffle or via Humble, or for PocketCHIP.
Alright, let's do this! PICO-8's core specification is complete, and it appears to do what it says on the tin. So I'm calling it:
PICO-8 is in Beta!
The main purpose of 0.2 is to finish freezing the core of PICO-8 -- the api, cpu counting, specs, cart format, memory layout, program behavior, backwards and future-compatibility should no longer change.
Earlier attempts at settling on a fixed core in 0.1.11 and 0.1.12 failed because of technical issues creeping in and also some design decisions that just didn't sit right. It has only been due to the ongoing process of users like @Felice, @electricgryphon, @jobe, @freds72, @Eniko, @samhocevar, and many others prodding at the boundary of what PICO-8 can do -- and what it should do -- that all of those nooks and corners finally took shape. I'm really happy with the way the last pieces of PICO-8 have snapped together, and I think it has reached a point where it feels not only like it should never need to change, but that it never could have been any other way.
Merry Christmas and Happy Holidays everyone!
This is my cartridge for the 2019 Advent Calendar. It is a simple toy/game with no secret endings at all. Nope.
There are 26 (or more! wink wink) carts available now, and you can get the full experience by playing from @enargy's main cart. It is a truly joyful collection!
The BBS's media storage system has recently been updated, and image attachments are now sent to a cloud bucket. Let's stress-test it with some gifs!
Rules:
- No gif, no post!
- No explanation of the gif is required.
- No quality required.
To save these, I used "CONFIG GIF_SCALE 3" from the PICO-8 command prompt, but any size is ok.
Some of these are doodles, some are unfinished carts, some are abandoned projects that will only live on as gifs.
At the start of each level there is a shop. You can spend hearts on 3 things:
- Blocks: use these to build bridges, barriers, and to clobber monsters.
- Jetpack fuel: press and hold jump while in mid-air to use your jetpack.
- Gems: become your final score.
Life is replenished on completing each level.
Monsters also drop fuel and blocks sometimes.
You can modify your block placement with up+left/right etc.
Ludum Dare page: https://ldjam.com/events/ludum-dare/44/blocks-for-life
PX9 is a lightweight gfx & map compression library, intended to replace PX8. It uses the same ideas and interface as px8, but is smaller (297 292 274 262 258 254 234 215 tokens to decompress), and requires zero configuration.
To compress some data:
px9_comp(x,y,w,h, dest_addr, vget) returns the number of bytes written x,y,w,h is the source rectangle (e.g. on the spritesheet or map) dest_addr is where to write it in memory vget is a function for reading values (e.g. sget when compressing from spritesheet) |
A thread for Ludum Dare 44 this weekend. Feel free to post any updates, WIPs or meet-ups here!
Theme voting: https://ldjam.com/events/ludum-dare/44/theme
For anyone in Tokyo, Pico Pico Cafe will be open both days for ludumdarers, 10am Saturday ~ late Sunday. If you'd like to join, there is an rsvp form. (Note there is an overlapping picotachi from 7pm~ on Saturday)
Update: Download 0.2.6b for CHIP and PocketCHIP here: pico-8_0.2.6b_chip.zip
You can just unzip it somewhere and run it, but if you want to install over the default location so that the launcher buttons still works, open Terminal and type the following:
wget www.lexaloffle.com/dl/chip/pico-8_0.2.6b_chip.zip sudo unzip pico-8_0.2.6b_chip.zip -d /usr/lib |
(the default password is: chip)
Update: I've seen instances of the launcher button pointing to both /usr/lib/pico-8 and /usr/lib/pico8. If you're still getting some older version when using the launcher button (check the boot screen), use:
sudo mv /usr/lib/pico-8 /usr/lib/pico8 |
This is the first time I've released a build for CHIP, as they were previously handled by the late Next Thing Co. In 2016 I spent a week at their workshop in Oakland, hacking out a proof of concept along with the first version of SPLORE, so that we could see how it would all fit together. It was not a large company, but everyone I met there were stand-up hackers driven to make something new and interesting. It's remarkable what they were able to achieve, and I'm glad to be able to contribute to the legacy a little by continuing support for these devices.