I've discovered that printing the "\b" character (8) moves the cursor back based on the width of the most recent glyph that was printed.
So, @zep, I can understand where your mind was going with this, because you wanted it to be possible to back up over something like a kana character or a PICO-8 emoji with a single backspace. That does make sense.
However, I think unless you're going to keep a long history of what was printed before that, and where the cursor was for each glyph, it's going to cause problems, because right now it's only guaranteed to work for backspacing over one character, not more.
For instance, if I print("abしd\b\bcd"), it doesn't put "cd" in the right place, as shown below, where I highlight the overprinting in the second print by changing the foreground color to orange:

Point being, you're trying to be helpful to the user by remembering the width of the last glyph, but it's not helpful to the next user who wants to back up over two glyphs. It's not a game I think you can play to win. I think it'd be better just to set backspace.dx to a constant for the font, be it oem or custom.
I present my very first game in pico-8 - Inspired by a predecessor of the very well known Mine Sweeper, a game for the ZX Spectrum called "Mined Out!"
In this game you must reach an objective (the bottom right corner) without stepping on a mine. As you move, you'll get information of how many mines are around you.
The level selector (0 -> 9) only the number of mines added, the size of the board and a score multiplier. The position of the mines is completely random.
It also uses a seed system so you can share the same RNG with another player so you can compete in the same conditions.




Suppose we have the following archetypal menuitem and callback, typical of those written before custom pause menu control with "stay open" functionality was added in 0.2.2. Basically "pick this menu item, X will happen in response"
function _init() i=0 menuitem(1,"increase",callback) end function _draw() cls() ?i end function callback() -- do stuff, e.g.: i+=1 end |
Prior to 0.2.2 the pause menu behavior was:
- btns 0,1 do nothing
- btns 2,3 navigates menu
- btns 4,5,6 trigger callback and close menu
- no arguments supplied to callback
- callback return value is meaningless
With new features of 0.2.2+ the documented pause menu behavior is:
- btns 2,3 navigates menu
- btns 0,1,4,5,6 trigger callback
- bitfield argument supplied to callback. btn0=0x01; btn1=0x02; btn4,5,6=0x70 (indistinguishable)
- callback can modify menuitem text
- callback can return true to keep pause menu open, else it closes
Making PICO Space
This is a rambling description of some of what went into making PICO Space. I've tried to write it for most readers to follow - there's some basic stuff and nothing very advanced. Hopefully it's not too dull and might help someone.

When You Wish Upon a Starfield
Coming up to Christmas of 2020 I had been spending most of my dev time trying to squeeze image data into PICO-8 to make a Dungeon Master clone (I promise I will return to this at some point). I'd got a bit tired of writing compression and encoding routines and feeling like I was fighting PICO-8 rather than playing nicely with it. I'd seen some other nice star-fields and particles in other peoples' games and wondered how much it would take to do my own.

Star Trek txt game ported to PICO-8
I'm finally happy to post the final release of my adaptation to PICO-8 of the 1978 game "Super Star Trek". The original game was written by Bob Leedom and David Ahl and published in the book BASIC COMPUTER GAMES - Microcomputer Edition. It was an early example of a space turn-based strategy game, and it was entirely text-based.
The original game was based on a CLI and text parser. This version is entirely based on a graphic user interface and can be controlled with the PICO-8 buttons, so it's a big change. But I'm very happy because I kept most of the original gameplay and mechanics intact. At the same time, I added music and animations. Besides, it's my first PICO-8 game!







The 0x5600+ area doesn't get reset properly when a new cartridge is loaded, or the current one is run again. Pretty easy to replicate, but here's a demo:
poke(0x5600,unpack(split"5,8,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7,0,0,0,0,7,7,7,0,0,0,0,0,7,5,7,0,0,0,0,0,5,2,5,0,0,0,0,0,5,0,5,0,0,0,0,0,5,5,5,0,0,0,0,4,6,7,6,4,0,0,0,1,3,7,3,1,0,0,0,7,1,1,1,0,0,0,0,0,4,4,4,7,0,0,0,5,7,2,7,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,1,2,0,0,0,0,0,0,3,3,0,0,0,5,5,0,0,0,0,0,0,2,5,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,0,0,0,5,5,0,0,0,0,0,0,10,31,10,31,10,0,0,0,2,7,1,6,7,2,0,0,5,4,2,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1,7,0,0,0,7,1,3,1,1,0,0,0,6,1,13,9,6,0,0,0,5,5,7,5,5,0,0,0,1,1,1,1,1,0,0,0,6,4,4,4,3,0,0,0,5,5,3,5,5,0,0,0,1,1,1,1,7,0,0,0,17,27,21,17,17,0,0,0,9,11,13,9,9,0,0,0,6,9,9,9,6,0,0,0,7,5,7,1,1,0,0,0,6,9,9,9,6,12,0,0,7,5,3,5,5,0,0,0,6,1,7,4,3,0,0,0,7,2,2,2,2,0,0,0,5,5,5,5,6,0,0,0,17,17,10,10,4,0,0,0,17,17,21,27,17,0,0,0,5,5,2,5,5,0,0,0,5,5,7,2,2,0,0,0,7,4,2,1,7,0,0,0,6,2,3,2,6,0,0,0,2,2,2,2,2,0,0,0,3,2,6,2,3,0,0,0,0,10,5,0,0,0,0,0,0,2,5,2,0,0,0,0,127,127,127,127,127,0,0,0,85,42,85,42,85,0,0,0,65,127,93,93,62,0,0,0,62,99,99,119,62,0,0,0,17,68,17,68,17,0,0,0,4,60,28,30,16,0,0,0,28,46,62,62,28,0,0,0,54,62,62,28,8,0,0,0,28,54,119,54,28,0,0,0,28,28,62,28,20,0,0,0,28,62,127,42,58,0,0,0,62,103,99,103,62,0,0,0,127,93,127,65,127,0,0,0,56,8,8,14,14,0,0,0,62,99,107,99,62,0,0,0,8,28,62,28,8,0,0,0,0,0,85,0,0,0,0,0,62,115,99,115,62,0,0,0,8,28,127,62,34,0,0,0,62,28,8,28,62,0,0,0,62,119,99,99,62,0,0,0,0,5,82,32,0,0,0,0,0,17,42,68,0,0,0,0,62,107,119,107,62,0,0,0,127,0,127,0,127,0,0,0,85,85,85,85,85,0,0,0,14,4,30,45,38,0,0,0,17,33,33,37,2,0,0,0,12,30,32,32,28,0,0,0,8,30,8,36,26,0,0,0,78,4,62,69,38,0,0,0,34,95,18,18,10,0,0,0,30,8,60,17,6,0,0,0,16,12,2,12,16,0,0,0,34,122,34,34,18,0,0,0,30,32,0,2,60,0,0,0,8,60,16,2,12,0,0,0,2,2,2,34,28,0,0,0,8,62,8,12,8,0,0,0,18,63,18,2,28,0,0,0,60,16,126,4,56,0,0,0,2,7,50,2,50,0,0,0,15,2,14,16,28,0,0,0,62,64,64,32,24,0,0,0,62,16,8,8,16,0,0,0,8,56,4,2,60,0,0,0,50,7,18,120,24,0,0,0,122,66,2,10,114,0,0,0,9,62,75,109,102,0,0,0,26,39,34,115,50,0,0,0,60,74,73,73,70,0,0,0,18,58,18,58,26,0,0,0,35,98,34,34,28,0,0,0,12,0,8,42,77,0,0,0,0,12,18,33,64,0,0,0,125,121,17,61,93,0,0,0,62,60,8,30,46,0,0,0,6,36,126,38,16,0,0,0,36,78,4,70,60,0,0,0,10,60,90,70,48,0,0,0,30,4,30,68,56,0,0,0,20,62,36,8,8,0,0,0,58,86,82,48,8,0,0,0,4,28,4,30,6,0,0,0,8,2,62,32,28,0,0,0,34,34,38,32,24,0,0,0,62,24,36,114,48,0,0,0,4,54,44,38,100,0,0,0,62,24,36,66,48,0,0,0,26,39,34,35,18,0,0,0,14,100,28,40,120,0,0,0,4,2,6,43,25,0,0,0,0,0,14,16,8,0,0,0,0,10,31,18,4,0,0,0,0,4,15,21,13,0,0,0,0,4,12,6,14,0,0,0,62,32,20,4,2,0,0,0,48,8,14,8,8,0,0,0,8,62,34,32,24,0,0,0,62,8,8,8,62,0,0,0,16,126,24,20,18,0,0,0,4,62,36,34,50,0,0,0,8,62,8,62,8,0,0,0,60,36,34,16,8,0,0,0,4,124,18,16,8,0,0,0,62,32,32,32,62,0,0,0,36,126,36,32,16,0,0,0,6,32,38,16,12,0,0,0,62,32,16,24,38,0,0,0,4,62,36,4,56,0,0,0,34,36,32,16,12,0,0,0,62,34,45,48,12,0,0,0,28,8,62,8,4,0,0,0,42,42,32,16,12,0,0,0,28,0,62,8,4,0,0,0,4,4,28,36,4,0,0,0,8,62,8,8,4,0,0,0,0,28,0,0,62,0,0,0,62,32,40,16,44,0,0,0,8,62,48,94,8,0,0,0,32,32,32,16,14,0,0,0,16,36,36,68,66,0,0,0,2,30,2,2,28,0,0,0,62,32,32,16,12,0,0,0,12,18,33,64,0,0,0,0,8,62,8,42,42,0,0,0,62,32,20,8,16,0,0,0,60,0,62,0,30,0,0,0,8,4,36,66,126,0,0,0,64,40,16,104,6,0,0,0,30,4,30,4,60,0,0,0,4,62,36,4,4,0,0,0,28,16,16,16,62,0,0,0,30,16,30,16,30,0,0,0,62,0,62,32,24,0,0,0,36,36,36,32,16,0,0,0,20,20,20,84,50,0,0,0,2,2,34,18,14,0,0,0,62,34,34,34,62,0,0,0,62,34,32,16,12,0,0,0,62,32,60,32,24,0,0,0,6,32,32,16,14,0,0,0,0,21,16,8,6,0,0,0,0,4,30,20,4,0,0,0,0,0,12,8,30,0,0,0,0,28,24,16,28,0,0,0,8,4,99,16,8,0,0,0,8,16,99,4,8,0,0,0")) [ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=90266#p) |



I often see questions in the pico-8 discord's #help channel, questions that boil down to "my code isn't doing what I want, and I don't know what to do. help?" If you feel completely lost when your code doesn't work, this tutorial is for you! Or anyone really -- I personally use PRINTH/PQ constantly and it makes programming about a hundred times easier.
PRINTH ("print to host console") is the single most helpful tool I know for pico-8 debugging. When programming, your head can get out of sync with the computer, and you won't understand what it's doing. The best way I know to bring them back in sync is to slap down some PRINTHs all over the place! Print out some info to see what your code is actually doing, and figure out exactly where the code starts to stray from what you intended.
setup
Here's a video showing how to launch pico-8 with an attached console on Windows. You'll need to do this somehow, because PRINTH messages are only visible in the attached console.








Nemo's Snake!
A colorful snake clone.
This is my first game, feedback is welcome!
This game started as a simple snake clone I made in a day. I kept adding features until I ran out of tokens
Features:
Dynamic Colors and Music

With the Dynamic skin set, The color of the fruit you eat will be the color of the segment that is added to your snake.
With the music turned on, the music will get more intense as you get closer to the highscore.
(shoutout to Dev Quest on youtube for the dynamic music tutorial)
Juicy Menu

The base game of snake doesn't take many tokens, so I spent most of the rest on a fancy menu system.







.png)
Hi @ all,
I like those old "Oddworld"-Games ("Abe's Oddyssey" and "Abe's Exoddus"). Just experimenting with a "Gamespeak"-like Control:
Absolutely nothing is finished, just the Gamespeak, Collision and the Animation works. No Gameplay so far.
For Gamespeak, hold Z and
UP: "Hello"
RIGHT: "Follow Me"
DOWN: "Wait"
LEFT: "Everyone"
I really want to make an Oddworld-like Demake, but I can't promise anything^^. I'll try to work on that Project^^...
Hooked on Amstrad Chiptunes - Volume 1 - Dave Rogers
Experience the glory of some of the most revered 80's CPC/ZX chiptunes from the comfort of your PICO-8 console!
- Netherworld
- Zynaps
- Uridium
- Cybernoid
- Cybernoid 2: The Revenge
- Nebulus
- Marauder
- Stormlord
- Stormlord 2: Deliverance
- Anarchy
- Battle Valley
- Herobotix
- Turbo Boat Simulator
- Bear-A-Grudge
Controls
right arrow - next song
left arrow - previous song
Tech
This cart emulates the Amstrad CPC/ZX Spectrum AY-3-8910 audio chip to output chiptunes to PICO-8's 5512Hz 8-bit mono PCM serial buffer. To feed the emulation it contains a sound driver capable of generating AY register inputs across three channels of tone/volume/noise-enable as well as a single shared noise tone.
The sound driver was derived from 13 different CPC games and one ZX game. All these games had their music composed or converted/arranged by (the legendary, in my opinion) J Dave Rogers, who also wrote the sound driver code for the games as was customary for chiptune musicians in the 80's. This common lineage made it reasonable to reverse engineer the Z80 code and generalize the driver to handle all the games' music.
I think it sounds a little better in native PICO-8 rather than on the web player. Understand however that in the CPC the AY chip was clocked at 1,000,000Hz (and 1,773,447Hz on the ZX), and emulators typically default to sample at 44,100Hz. Whereas PICO-8 ticks at 60Hz and the serial buffer samples at 5512Hz. Only so much can be done - the percussion/noise is especially vulnerable to low sampling rates.
The AY emulation code is augmented to support the waveform visualization by tracking zero-crossings - this extra work can be removed if the goal is pure audio.
Without the graphics, the sound driver + AY emulator runs at a consistent 24-25% of frametime on a 60hz cart. This demonstrates that, for the appropriate PICO-8 game, it's reasonable to completely emulate the music and sfx via the serial buffer. Alternatively the sound driver portion could be used to drive PICO-8's sfx/music buffers in real time which would allow a lot more music in the cart with full audio sample rate quality. Or do both and synchronize native sfx/music with generated serial buffer output.
The game logos were compressed with








I got really bored and a little lonely in quarantine so I'm making myself a little friend to keep me company. It's far from finished, but I thought that even it's idle animation was awful cute and I wanted to share. You can play with the menus by pressing X or O and then any arrow, but they don't do anything yet. I'll add more as I make progress!
