I've been looking for a proper tutorial on this subject for a while, but never found one as complete and clear as your own. I appreciate you putting the time and effort to publish this; thank you very much, Sir!
PICO-8 has stop() and resume() functions but in terms of debugging I don't think there's a way to step through logic without building your own logic for stopping after each step.
Looks like you already figured it out but in case anyone else is curious, if your lua files push you over the token limit, you still get a "program too large" error.
There's a memory address you can poke to retain the palette when you stop running the cartridge. LazyDevs has a great video on the extended palette and here's the timestamp where they show how to use poke(0x5f2e) to preserve it: th-cam.com/video/AsVzk6kCAJY/w-d-xo.html
How come your vscode didnt give you a load of yellow squigglies as the includes are in the p8 file? If i copied your code the using the player_draw function in main.lua would set of warnings
I just looked through my installed extensions but I don't have anything specifically installed for Lua. Maybe my theme (I think it was One Dark Pro here) was highlighting functions and operators a little better than other themes?
hi thanks for the amazin tutorial, i have 2 problems that i can't get around. first one is to enter the buttons in visual studio code, for example btn(x) it does not show as ❎ or all the other letters. and second, when i inculde lua files in vsc they dont show in the p8 console as new tabs, is that normal or is there a way around that as well?
Outside of PICO-8 I find it's easier to use the corresponding number than the unicode symbol for buttons. You can use numbers 0 through 5 to represent left, right, up, down, button_o, and button_x. So btn(5) is the same as btn(❎). If you don't mind using a few tokens you can also assign these numbers to names like button = { x = 5 } and then you could use btn(button.x) in your code. As for the lua files, unfortunately the code doesn't get inlined into the p8 file so includes do not create new tabs.
Are you aware of any third-party IDE for pico-8? Do you think there is room for such a thing? (mostly what you're showing here, but packed with dedicated features such as built-in map/sprite editor, using the same retro style as the base pico8 editor)
In a hobbyist community like this there's always space to play around. I don't know how many people would use it, but it could be an interesting project to work on.
How do you access the pico-8 file through the terminal in mac? i love this tutorial but I want to be able to debug games in the terminal and I am not sure how you get to where you can do that
Hey, sorry for the delayed response. At this timestamp in the video I demonstrate using printh to log to an external file and then follow that file in terminal. Is that what you're having trouble with? th-cam.com/video/srPKBhzgZhc/w-d-xo.html
I originally grabbed the extended aseprite palette here: www.lexaloffle.com/bbs/?tid=35264. I have that set as my default palette in aseprite, but then once I'm working with the project and I've figured out my 16 colors, I'll edit the palette, arrange the colors to match the order I've setup in PICO-8, then I save the palette to my project directory.
I'm so late responding to this but this is something I do often now so I wanted to answer. PICO-8 has a -root_path command line option. I usually open PICO-8 from the command line like "pico8 -root_path ." which will open PICO-8 with the current directory as my carts directory.
Copy, paste seems more uncomplicated to me. One of the best inventions in computing. Pico 8 got something that is distraction free except for the small space of the code editor and the horrible font. It's a bit of a failure that way. It's very interesting to me regardless as I can test some ideas and give it colours and sprites which seems easy for my level.
Amazing, now that I watch 50% of your youtube videos, I'm going to reach 100% and then starting watch your past livestreams.
Makes a youtube channel, drops this one banger video, then falls off the face of the planet.
Good stuff. Valuable content for the community.
I've been looking for a proper tutorial on this subject for a while, but never found one as complete and clear as your own. I appreciate you putting the time and effort to publish this; thank you very much, Sir!
Fantastic video. Thank you Kevin and thank you YT algorhythm!
Great video, been jamming with pico8 for around 4 years and mostly use a similar workflow but picked up a few good tips with this. Thanks!
Thank you a ton! This is very useful
Great video! Would love to see more game dev tips from you! Cheers!
This video was AWESOME. :D Please come back to produce more content.
nice tip(s). hope there's more Pico-8 goodies on the horizon!
this was sooo useful!
Awesome, thanks for sharing!
This was exactly what I needed, thanks for the video!
Unbelievably helpful. Thanks so much!
What a great video, thanks!
This was incredibly helpful! Thanks!
Great video!!!!
when working with external lua files, how do you then "compile" it all together to upload to the pico 8 bbs?
If you have your cart loaded in PICO-8, you can run `save name.p8.png` and it will inline all of the code.
Super video! Thank you.
What we can stop/step/resume in pico8 ?! Thanks a lots for this tip!
PICO-8 has stop() and resume() functions but in terms of debugging I don't think there's a way to step through logic without building your own logic for stopping after each step.
Great video, thanks for making it.
Can you surpass the token limit by using external .lua files?
aww nvm
Looks like you already figured it out but in case anyone else is curious, if your lua files push you over the token limit, you still get a "program too large" error.
Well well, see who is here....
good video!
Wait, I'm confused. How did you change the palette In the Pico8 editor to show alternative colors?
There's a memory address you can poke to retain the palette when you stop running the cartridge. LazyDevs has a great video on the extended palette and here's the timestamp where they show how to use poke(0x5f2e) to preserve it: th-cam.com/video/AsVzk6kCAJY/w-d-xo.html
@@kevinmakesgames Thanks!
One of the most helpful PICO-8 tutorials out there, thank you. Any more coming? ;)
Thanks! I’ve got a list of topics I’d love to cover, but life and work have been busy. Hopefully I’ll get back to making this soon!
@@kevinmakesgames No worries. I certainly know what that's like 🙂
How come your vscode didnt give you a load of yellow squigglies as the includes are in the p8 file? If i copied your code the using the player_draw function in main.lua would set of warnings
Also, excelent video, helped a lot!
What lua plugin do you use for vs code? the one's i've been trying out doesnt support the pico-8 keyords (spr(),add() etc.), og the +=, *= shorthand
I just looked through my installed extensions but I don't have anything specifically installed for Lua. Maybe my theme (I think it was One Dark Pro here) was highlighting functions and operators a little better than other themes?
hi thanks for the amazin tutorial, i have 2 problems that i can't get around. first one is to enter the buttons in visual studio code, for example btn(x) it does not show as ❎ or all the other letters.
and second, when i inculde lua files in vsc they dont show in the p8 console as new tabs, is that normal or is there a way around that as well?
Outside of PICO-8 I find it's easier to use the corresponding number than the unicode symbol for buttons. You can use numbers 0 through 5 to represent left, right, up, down, button_o, and button_x. So btn(5) is the same as btn(❎). If you don't mind using a few tokens you can also assign these numbers to names like button = { x = 5 } and then you could use btn(button.x) in your code.
As for the lua files, unfortunately the code doesn't get inlined into the p8 file so includes do not create new tabs.
Are you aware of any third-party IDE for pico-8?
Do you think there is room for such a thing? (mostly what you're showing here, but packed with dedicated features such as built-in map/sprite editor, using the same retro style as the base pico8 editor)
In a hobbyist community like this there's always space to play around. I don't know how many people would use it, but it could be an interesting project to work on.
How do you access the pico-8 file through the terminal in mac? i love this tutorial but I want to be able to debug games in the terminal and I am not sure how you get to where you can do that
Hey, sorry for the delayed response. At this timestamp in the video I demonstrate using printh to log to an external file and then follow that file in terminal. Is that what you're having trouble with? th-cam.com/video/srPKBhzgZhc/w-d-xo.html
Now you just need an external tool for the music part
Where did that properly ordered palette.aseprite file come from?
I originally grabbed the extended aseprite palette here: www.lexaloffle.com/bbs/?tid=35264. I have that set as my default palette in aseprite, but then once I'm working with the project and I've figured out my 16 colors, I'll edit the palette, arrange the colors to match the order I've setup in PICO-8, then I save the palette to my project directory.
How do you point the Pico8 to your project folder?
I'm so late responding to this but this is something I do often now so I wanted to answer. PICO-8 has a -root_path command line option. I usually open PICO-8 from the command line like "pico8 -root_path ." which will open PICO-8 with the current directory as my carts directory.
How do you make your editor look like that? so pretty!
I'm using the One Dark Pro theme in VS Code here
uh may sin!!!
Copy, paste seems more uncomplicated to me. One of the best inventions in computing. Pico 8 got something that is distraction free except for the small space of the code editor and the horrible font. It's a bit of a failure that way. It's very interesting to me regardless as I can test some ideas and give it colours and sprites which seems easy for my level.