Perhaps this has been asked before, but I don't recall seeing anything about it specifically. Apologies if so.
I've just gone over the png compression limit on a cart, but have about 1128 tokens & 20,000 odd characters left to go. I'll probably use all of them.. I know I can reduce the length of my variable names, or minify the source to make it fit, but -
I was wondering if there was a technical reason why the cart file size couldn't be, say, doubled, or even left unrestricted? As long as you're within the token and character limit that is.
For the record, I think the idea of storing data directly in the image is pretty damn cool & I'm not suggesting that be changed, but if it's only restricted by image size, perhaps the 'overflow' data could be stored in a private png chunk? In theory it shouldn't interfere with how it appears or downloads in browsers or image viewers etc.
I guess it's no big deal, but I'd love to be able to keep the original source in the cart is all.
edit: clarification - cart file size.
Increase memory ?
Increase cart size ?
Ouch. Hoo boy. Here we go again ...
I guess I could point out initially that you are limited to 8192 TOKENS, not K or BYTES. A variable, no matter how long the name is, always and only counts as one token to PICO. So shrinking your variable names will not save any space in this unique and fantasy restriction-given language.
I'm not asking for memory to be increased, not sure where you're getting that from, neither am I asking for the token or character limit to be increased.
Regarding variable length, perhaps this is out of date now, but I'm going off the information in this thread - https://www.lexaloffle.com/bbs/?tid=2400
"the maximum number of characters that can be copied from a previous point in the [encoded or compressed data] stream is 17 characters, so try to keep your variable names below this threshold".
You are correct that I will not save any tokens by using shorter variables, however it appears to have an effect on cart compression.
Sorry, Catatafish. I read, "why the cart file size couldn't be, say, doubled" and interpreted that to mean an increase.
My code currently is so rife with remarks, I am quite pleased to see they take no token space at all. I'm only at 943 symbols and have already finished half of my program, yet have munched up a good 4800+ chars in actual raw characters.
If 8192 is the upper limit on tokens to a single program, I think it's pretty safe to say I can write just about anything I want in PICO, including a small Online RPG Maker. I was dabbling on one for Gameboy years ago and my limit there was 64k.
[Please log in to post a comment]