2 ms·
A couple of things to check out: http://clb.demon.fi/files/RectangleBinPack.pdf http://clb.demon.fi/files/RectangleBinPack.pdf https://github.com/Lalaland/Pix
by acron0 14y ago
A couple of things to check out:
http://clb.demon.fi/files/RectangleBinPack.pdf http://clb.demon.fi/files/RectangleBinPack.pdf
https://github.com/Lalaland/PixelPacker/blob/master/src/pak/algoMaxRects.cpp https://github.com/Lalaland/PixelPacker/blob/master/src/pak/...
The latter is an implementation of "MaxRects" which is highly regarded as the best algorithm for packing sprites.