Archived: Bin packing, rectangle packing, and image atlasses
on by Eniko
Spent some time today researching how to more efficiently pack my sprites and tiles into one large texture. I had an algorithm that worked, it was just hideously inefficient in terms of space left unused. I came across Nuclex’s Rectangle Packing and ported Cygon’s packer to Python. Below is the result.