Export sizes
· 2 min read
balaur export reports what a pack weighs, drops unreferenced assets,
re-encodes PNGs, subsets fonts and rewrites WAV as FLAC. All of it lossless.
The editor's own pack, 2.1 MB: fonts 77%, scripts 22%, images 1%. The web runtime beside it was 17.1 MB.
balaur exportprints the pack by section, by extension, its ten heaviest entries, and the assets nothing references.--reportprints without writing.strip = truedrops every asset no scene, asset document, script string literal orid://reference names. It is off by default.images = "smallest"keeps the smaller of the PNG optimiser and lossless WebP. A 128x256 sprite goes from 1.1 KB to 0.5 KB, and JPEGs are left alone.fonts = "subset"keeps the code points in the project's scenes and scripts, printable ASCII, and anyfont_rangesnamed for server text. One face went from 421 KB to 29 KB, with kerning, ligatures and Arabic joining intact.audio = "flac"rewrites WAV as FLAC, lossless, at about half the size.- The lossy modes are
images = "quantised"withimages_quality, andaudio = "vorbis"withaudio_quality, kept as separate keys from the lossless ones. recodein a picture's import settings overrides the export's mode for that file..fntbitmap font descriptors are in the pack's extension list.
Every mode keeps an image's pixel dimensions.
[export]
strip = true # drop an asset no scene, script or keep glob names
keep = ["sfx/**"] # ...except paths a script builds at run time
images = "smallest" # recompress PNG, or write lossless WebP, whichever wins
fonts = "subset" # cut a face to the characters the project shows
font_keep = ["fonts/ui-*"] # ...but ship these whole
audio = "flac" # write uncompressed WAV as lossless FLAC
Not size levers
- Atlases: a few percent of the image bytes, and no draw-call win; the renderer issues one call per node.
- GPU-compressed textures (BC, ETC2, ASTC): a byte per pixel on disk, about twelve times the PNG, but they cut video memory and upload time.
- Compressing the pack: the media inside is compressed, and static hosts gzip on the way out.
Build size is the manual page.
