Originally published on indiecore.net .
Part 6 of 10 on building a word-block puzzle engine. Part 5: the opening layout.
The level pack is 395 JSON files: 392 boards, a catalogue, an index, and a build record. On disk
in the repo it is 4.37 MB , and every byte of that was in the app I first put on the store.
None of it needed to be.
Pretty in the repo, minified in the store
The boards come out of the generator pretty-printed, and they should. They are reviewed in pull
requests, diffed when the generator changes, and read by hand when a board plays wrong. A
minified 11 KB board file is not something anyone can look at.
But nothing reads that whitespace at runtime. It is 45% of the pack :
stage pack 4.37 MB -> 2.36 MB
Enter fullscreen mode
Exit fullscreen mode
So the shrink happens on the way into the build output, never in public/ .…