Log In  

I am at the end of my first project, adding a few new rooms to my level string, when I realized I was over the compressed size limit. So I started deleting new line characters here and there... but it seems like this just makes the compressed size go up. Can someone please explain this to me, or is this a bug?

P#77987 2020-06-12 15:30

:: dredds
2

Compression works by using short sequences of bytes to represent regular patterns in the source text. The more the same regular pattern appears in the source text, the more the text can be compressed. Removing characters here and there can make the source text less regular and therefore less compressible.

P#77990 2020-06-12 15:49 ( Edited 2020-06-12 15:50)

So I realized this once I decided to just go through and reduce some commands to mnemonics and saw it jump down suddenly as I edited it. Still... to be honest, being under the token and character limit and having this arbitrary compression size that you cannot plan for makes me want to abandon PICO-8

P#77996 2020-06-12 16:42
1

> having this arbitrary compression size

I've been there and can relate to the frustration of not knowing how to get the compressed size to go down, but it is important to note that that size limit is far from "arbitrary"; in fact it is the only limit of the three code-size limits that is not arbitrary! it is a hard limit set by the maximum amount of data (32 KB) which can be encoded into the final PNG image of the cart. Hopefully that helps a little when you are feeling frustrated with it :)

EDIT: oh it also helps to keep in the mind the history of the cartridge format: originally, the only limit was a very low character limit. It was quite limiting, I can tell you from experience! So zep then added compression to allow us to squeeze more code into a cart.

P#78000 2020-06-12 18:10 ( Edited 2020-06-12 18:15)

That makes a lot of sense. Arbitrary was definitely the wrong word. I guess a better word would be unpredictable due to it's non-linear nature.

P#78001 2020-06-12 18:14

I wish I had been keeping an eye on it... I saw compressed size and foolishly thought if I kept below the token and character count I would be good. Now I have to back pedal and figure out how to get my end game screen in there without going over.

P#78007 2020-06-12 20:53

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2022-10-04 16:05:31 | 0.005s | Q:16