Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

Forgot about this since I solved it myself with a small shell script and `jq` but: With the JSON (as distributed) and PNGs alone (e.g. for engines that don't use XML, TOML, or QOI), the combined set of all font files comes out to around ~54MB.

If you strip all the unnecessary white-space from the JSON files in this, it shrinks from ~54MB to around ~31MB, saving around ~23MB, which is fairly significant. Some math indicates that this means around ~43% of the combined PNG+JSON data is JSON white-space with no semantic meaning. (Sorry in advance if I flubbed the numbers here a bit, but I don't think I did)

That said, it's not that hard to strip, and realistically people who care are probably either doing this already or shipping the JSON data in a compressed format, or both.

(For anybody else using fish-shell (pretty niche I know, but maybe it'll help someone), if you have `jq` installed, then running `for file in **/*.json; set -l json (cat $file | jq -c); echo "$json" > $file; end` will remove all the semantically-meaningless white-space from the JSON).