the maximum value seems to be 67108868
No one seems to read the "official game feedback" thread, so I posted this here instead.
Shouldn't temp be saved as a 20 bit integer instead of floating point? Then it could range from 0 1048576, which could be divided/multiplied by 100 when saving/loading, so it could go from 0.00 to 10485.76
this would affect the file size much more than resetting particle order, I think.
Temperatures are currently stored as a 16 bit int, except for values near room temperature which are stored as an 8 bit signed integer offset from room temperature. This means they are saved to a precision of 1 degree, and go from 0 to 65535. As far as I know, there are currently no floating point numbers in the save format.
Oh. Wouldn't a 14 bit unsigned integer be better? Then it could go from 0 to 16384 (kelvin).
12Me21:
Oh. Wouldn't a 14 bit unsigned integer be better? Then it could go from 0 to 16384 (kelvin).
or they could just use the built-in 8, 16, 32, or 64 bit data types and not try to make a custom one.
It would be more difficult to load and store, especially since temperatures are not in their own array but are interleaved with field descriptors and all the other properties, which are stored using whole bytes. Also I suspect the bzip2 compression operates best when the bytes repeat rather than just the bits, but I haven't tested that.
The current save format is a balance between file size and being reasonably simple to read and write. For most saves, I think it gave around the same file size as the previous save format (PSv), the advantage was just being a lot easier to parse and to add extra data to.
If you enjoy experimenting with compression techniques, then yes, storing temperatures as 14 bit integers is something you could try. There are a number of other things you could try too, which might give bigger gains, such as:
(Though note that changes need testing on a broad range of saves to make sure they reduce file sizes on average, rather than reducing just for a few saves and making the rest of them bigger.)