There's some great tips on these forums - One thing i haven't seen people mention is how to get Notepad++ to run a PICO8 cartridge from a button press.
This way, you can code your program in Notepad++, save it, and then run it, all with a few key presses.
- Open up a sample P8 file in Notepad plus plus.
2.Click on the "Run" menu in the top menu bar.
Select the "Run" option (the top option in that menu, perhaps not unsurprisingly)
- Cut and paste the below into the dialog box that turns up
"C:\Windows\System32\cmd.exe" /K "C:\Program Files (x86)\PICO-8\pico8.exe" -run $(FULL_CURRENT_PATH)
(this relies on you having installed your PICO8 to the default location. If it doesn't work, find a shortcut to it either on the desktop or the start menu, right click, and "Open File Location". If you change the text, save it in a text file before the next step.)
Test it by clicking on the Run button. It should open up the windows terminal, which will then open up a copy of PICO 8 and autoload the cartridge you have open. I'll explain why you want the windows terminal open below.
If it works, go back to Notepad++. Bring up the run dialog and paste in the text you used before.
- This time, click the "Save" button. Assign a shortcut -I'd recommend ctrl + A. It's right next to ctrl + s, which is save, meaning you can quickly save and run your program when there are any changes.
The reason you want to use the prefix "C:\Windows\System32\cmd.exe" /K is that this runs the windows terminal, which then runs PICO8. This means you can see any printh statements you've put in your code for debugging.
One thing to note is that the K switch in the line "C:\Windows\System32\cmd.exe" keeps the terminal open when you shutdown PICO8. This is my personal preference, if you want it to shut when you close PICO8, replace the K with a C.
If you use this alongside the syntax highlighting (go to Settings, Style Configurater, Lua in the top menus and add "p8" in the "User Extension" box at the bottom of the window) and Function List mentioned elsewhere on these forums, you've got a pretty awesome dev environment!
EDIT: Now with 2% more less broken! Hurrah for not broken!
EDIT: New! Now with 100% less broken!
EDIT: Here's a more complete version. This has a completed level. No changes to the AI since last time.
EDIT: Here's the first Alpha - this is not currently completable!
You are SHE, deep cover operative. For 16 months you've been chasing HER, across battlefields, across countries, across the globe. Finally you have her close, cornered almost, holed up in this military base. Find her! Your orders are to kill her, but will you? And what about the kittens she's taken hostage, or the all female yellow hornet battle squadron between you and her?
Your ways are enigmatic, and no one but you can predict your actions.
Press X to shoot
Press Z to interact.
Your dot will turn GREEN when over an interactable object
Hold Z to bring up the menu
Press start on the second player pad to begin a two player game.
I'm currently working on my first pico-8 game. It's called SHE!
It's a top down stealth action shooter, with couch coop.
Pretty much all the mechanics are there and I'm hoping to release an alpha sometime this week.
Enemies have states, they can patrol, and there are a variety of different weapons to use. The intention is to allow the player to either sneak through or go in guns blazing. Ratings are given on playthroughs for enemies killed, hostages rescued, and coins collected, with the final outcome (likely a single sentence given space constraints!) given based on your actions.
Here's our intrepid heroine triggering an enemy. You'll notice the other enemies come to investigate what's going on.
Originally I had quite a few other features in there - spreadable fire being the notable one - but I quickly learned that you need to be quite conservative with your code on the pico! I'm currently at 7912 tokens, but I feel I can probably crunch down the AI once it's finished to get a few hundred back. Here's hoping!