Hey all, me and a friend have been talking about the possibilities of being able to split a pico script into multiple files and compile them as they're edited for a while, so here is a python script that'll let you do that, hopefully it works well.
https://github.com/ambocclusion/pico-8-compiler
Let me know what you think!
Also if you plan on using it, back up frequently or use version control as it might end up wiping your file more than once because it's super destructive!!!!



Yeah I plan on making it more stable in the future but so far out of the few hours I've worked with it, it hasn't wiped my file yet but it has while I was developing it so it's bound to happen. I plan on adding a backup feature as well so we can avoid any major issues.
Keep an eye out on development for stability updates though!


what are the benefit over simpler merging of all the project files together?



Automatic compilation after a file changes. Simply hitting save on a .lua file will cause the compiler to regenerate the .p8 file. Also going to introduce more features as time goes on, like two-way editing, image and map data (Tiled support?), and automatic running after compilation.



(Tireless self-promotion:) If you need help with cart parsing in Python: https://github.com/dansanderson/picotool Should be a stable basis if you're actually worried about producing a corrupt result. (Can't tell if you're just being self-deprecating. :) )



I was looking at this! I'll see what I can garner.
I'm not super confident in the results as I haven't been writing python long and I have experienced more than a few corrupt results while working on it. But it's loads more stable, I was using it all last night to program in p8. It seems to be no more unstable than using any other external editor with pico 8 at the moment.



Cool. I like projects like this :)
Also some shameless self-promotion - I did something a little similiar but it's more of just a build system (with a Makefile) with the ability to grab all graphics and sounds from a separate .p8 file - and it allows the lua-source file to include other source-files.
[Please log in to post a comment]