deathcap/ProgrammerArt

Pre-"stitched" atlas image distribution

Closed this issue · 3 comments

Currently, ProgrammerArt is distributed with textures in individual files (ResourcePack and TexturePack formats, .png's zipped). Adding another distribution format where the textures are combined into one (or a few) image files could be useful:

  • support older Minecraft versions (texture pack format in 1.4 and earlier, terrain.png...)
  • loading over the network, fewer http requests (or vs d/l .zip, parse w/ adm-zip)
  • would be especially nice with shama/voxel-texture#14 (note: mip maps)

Attempting to use pngjs to stitch the images together, progress so far in https://github.com/deathcap/ProgrammerArt/tree/master/scripts stitch.js. Using the pure-JavaScript pngjs module instead of HTML5 canvas (so can run on the command-line instead of in the browser) or the canvas module (to avoid the Cairo native dependency) but having some trouble, the output image is missing most pixels, not sure why:

terrain

Completed the 'stitching' code, items:

items

terrain:

terrain

pushing what I have, but having trouble with creating the zip (using adm-zip) - for some reason:

scripts $ unzip -t ProgrammerArt-StitchPack.zip
Archive: ProgrammerArt-StitchPack.zip
testing: gui/items.png OK
testing: pack.txt bad CRC b3d3ac31 (should be 700101e4)
testing: stitchpack.json bad CRC d2687085 (should be 34f12b3d)
testing: terrain.png
error: invalid compressed data to inflate
At least one error was detected in ProgrammerArt-StitchPack.zip.

Added ProgrammerArt-v2.0-StitchPack-MC14.zip to https://github.com/deathcap/ProgrammerArt/releases/tag/v2.0