You may have seen a few rare carts read the keyboard. I wrote this simple program to demonstrate easily how it can be done.
It also introduces two useful functions of CHR() and ASC() where CHR(n) returns the character equivalent from an ASCII value N whereas ASC(n) returns the ASCII equivalent from the character N.
It is important to note that I have reversed the values of 65-90 and 97-122 respectively as in PICO-8, pressing "A" by itself normally gives 97 despite its appearance being uppercase.
You are welcome to change the table back if you like.
If you don't want to use BTNP() or BTN() to return your arrow keys, you can hit NUM-LOCK and use "2" "4" "6" and "8" respectively to emulate arrow motions. Additionally, "1" "3" "7" and "9" for single stroke diagonals !

What would YOU do if you were a millionaire?
Meowlionaire knows what's up. This chubby cat is a modern-day Robin Hood, with pie-in-the-sky dreams of raiding a trove of gold, and redistributing the wealth to the feline working class. Rumors have been floating around about a billionaire's secret hoard, stashed up in the cloudtops. 1750 of those coins could feed the hungry for years, and if we're not kidding ourselves, nobody's gonna notice that they're gone. So Meowlionaire straps on a jetpack and launches into the clouds with a dream in her heart and a money sack in her paw. Equity for all, here we come!
Controls
[Arrows] Walk





function wait() repeat flip() until btnp(4) end function count() cls() for i=1,3 do print(i) end end i=6 count() wait() print("") print(i) print("") wait() for i=1,3 do print(i) end wait() print("") print(i) print("done!") repeat flip() until forever |
By looking at this code you would think the end result would be 4 each time, both in the function and in the main program as most programming languages would return that value. But this is not the case with PICO-8. Instead the result will be what you defined globally, in this case 6.
So it's important to remember that the index variable in ANY FOR/END statements, either directly in your main code or in a function - will ALWAYS be local to the loop.
So you need NEVER define LOCAL variables in a function that will only be used in FOR/END statements. Good to know.

As shown in the picture above, the "from" variable is being considered a function at some time during execution. Problem is: there's nowhere in the program that I can turn that variable into a function, because it is a local variable (and the only place the 2nd argument is ever assigned is in the function itself):
function unpack(list,from,to) from,to=from or 1,to or #list if from<=to then return list[from],unpack(list,from+1,to) end end |
function to_tab_unp(tab) return unpack(str_to_table(tab)) end |
The weirdest thing is that I call the line "in cr_char line 5 (tab 2)" every time I create a character. In this particular instance I'm recreating battles to get until I get one with a formation that fits the difficulty level I want. So it's like 1/10000 of cases generates that error. But the table being unpacked is always the same:
to_tab_unp(",{,{,{,{,,f,{,,,{,{,,,{,{,{,{,{,,,,") [ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=66865#p) |





While I have seen the ATARI 2600 do this several times to save on space, it's a shame that PICO-8 does not have a scaling function for the default 3x5 font. In the original Haunted House or "Mildew's Manor" game, I made use of this double-size method in the menu.
Here now you can have it to use in your own code. See demo enclosed.
HOPE THIS HELPS !
Hi! I'd love to hear any feedback on my work in progress top-down golf game Picogolf Endless, thanks for reading/playing!
Since it is work in progress it is just one course at the moment (procedural generation to come) but most of the physics are in place (wind is shown by the arrow top centre)
Controls
LEFT/RIGHT - aim
X - hold for more shot power
LEFT/RIGHT while power meter is moving - spin
Planned features
- Procedural generation
- Online multiplayer using GPIO/JS
- Complete the tree tiles / move on from these placeholders
- Particles and polish
- Music and more complete sfx
Thanks again :)
I just finished creating a tutorial for making a top-down adventure game in PICO-8. It's 10 relatively short videos (45 minutes for all 10 videos). You don't need any prior experience with PICO-8 to do the tutorial. I have done this tutorial with many, many kids and the games they create with it are always inspiring.
UPDATE 8/25: I've added a bonus step that allows you to add text to your game! :D
UPDATE 8/27: I added another bonus step that allows you have as many types of tiles as you want. You could use them for treasure, special keys to specific doors, teleporters, quest items, anything you want! 🗝️📜
You can find it on itch.io and on YouTube:
https://www.youtube.com/playlist?list=PLdLmU93eWisKpyk1WZywUSYAq5dkCPFIv
https://mboffin.itch.io/pico-8-top-down-adventure-game-tutorial
If you have any questions or need any help, feel free to let me know. I hope you enjoy it! :)
My Happy Challah Days entry for the 2018 PICO-8 Advent Calendar was created using this tutorial as the base code. (I added extra features for the jam, like dialog boxes, quests, and a larger inventory, but its foundation is this tutorial.)









 (1).gif)


While I don't think PICO-8 has any appreciable VSYNC ability, you can indeed make use of this rare command to stop the screen from tearing when updating massive pixels as seen here:
If the HoldFrame flag is off, in immediate mode (and possibly not from a browser execution) my screen gets a wiggly line about 3/4 of the way down the screen when doing this update.
If you invoke the seldom used command HOLDFRAME() however, you can prevent against this for games played as an EXE or in immediate mode. Check the source for details.
HOPE THIS HELPS !
Hello, welcome to my first ever video game, it called cone bomber, you gotta dodge the cones while bombing the hill.
Why is there infinite construction cones randomly placed on this never ending road? I don't know but please you must dodge them please do not fall over omg.
Have fun playing my little game, it really hard and not that rewarding. What score did you get???




I forgot I had this!
Here's a faux 3D of Yoshi's Island for the SNES.
Instead of making a 3D engine, I've defined sprites within a cylinder's (angle, distance from center, and height) and made it revolve all together.
It was a fun experience and a different way of making 3D.
MAKING YOUR OWN!
This cartridge comes with an editor to make your own revolving scenario. Do this:
- Download the cartridge
- Wherever you intend to run it, create a file called yoshis_island.p8l, and write on it preloaded_objects={}
- To activate edit mode, change l.30 on the cartridge from prod = true to prod = false
(optional) - Change the sprites to the ones you want and update their coordinates in the ss object un l.32-53
