Hi guys,
thanks to pico's restrictions, I managed to finish my first-ever game, and I'm happy with the results.
However, I ended up using filthy trickstery to squeeze in as much content as possible, and as a result I ended up with a game needing several non-cartridge files to function. I'd like the feedback, but am not quite sure how to publish it on the forums. I could use some help with this.
The full game either #includes or load()s these files:
enemies.lua game.p8 leveldata.p8l peral.p8 shop.lua translations.lua |
Some of the files are generated by my editor, and others are just data kept outside the game for the sake of developer sanity.
How would I upload such a thing so that it would get embedded in a forum post? I could inline the #includes, but it will still need two carts, because the main cart is pushing both token and size limits (8142/8192 and 99.7 % respectively). And what's the proper way to link between same-game carts on the forums?
Oh, and here's a playable HTML export here proving that the concoction actually works.
You can use 'load' on the BBS to chain-load from a title cart to main meny to level 1 etc; each cart has the code, sprite, etc restrictions; there is a small loading delay.
Multicart (using 'reload') is not possible on the BBS.
Thanks, that's what I thought. Technically I can live with these restrictions.
But is there a clean way to preserve the file structure in BBS? Or is it customary to provide a separate github or similar repository for more complex projects, and just post a non-human-readable version of the cart in the forums?
People using splore will load your carts from the BBS fine.
For an offline version, you could provide a zip archive for example with all the carts in it, after replacing all load("#game-level1")
by load("game-level1")
so that pico8 looks for a local cart file instead of a BBS cart!
[edited] The load function does not cause any error if the cart is not found, so you can write code like this that will work everywhere:
-- for development, try loading P8 cart load("level1.p8") -- for players with downloaded carts -- the leading dot is to make the cart not show up in splore load(".game-level1.p8.png") -- for players on the bbs load("#game-level1") |
For posterity, another thing (well, one of the issues) that popped up when doing this:
I was trying to #include binary data, but had encoding issues when manually inlining the files. Pico can resolve the inlines correctly this way:
- Save the cart as a
.png
- Open the png cart and export it instead.
Regarding the LOAD()
comments by @merwok above. You can also check STAT(102)
and load either the #bbs ID or the local filename, without having to edit the code.
Very nice submarine game, @Phvli. I' recognizing that tune. Gruber's music goes good with just about everything. Gold star for you !
[Please log in to post a comment]