1
0
Çatalla 0

Algorithm Improvements #1

Açık
sbrl tarafından 2016-05-21 14:54:58 +00:00 açıldı · 1 yorum
Sahibi

Although the current packing algorithm is OK, we need to improve it to make it even better.

Currently, the algorithm uses X and Y scanlines that radiate out from (0, 0). It checks the X scanline first, and then it checks the Y scanline. It should instead find and store the first place found on both axes, and pick best one out of the two.

Here's an example packing result:

Example result

It might be worth noting that normally, you wouldn't give it so many different awkwards shapes.

It might also be worth noting that the algorithm hasn't been check to make sure it handles non-square images correctly. Some of the placement errors may have occurred due to the fact that the input images were not square.

Although the current packing algorithm is OK, we need to improve it to make it even better. Currently, the algorithm uses X and Y scanlines that radiate out from (0, 0). It checks the X scanline first, and then it checks the Y scanline. It should instead find and store the first place found on both axes, and pick best one out of the two. Here's an example packing result: ![Example result](http://i.imgur.com/M8byahl.png) It might be worth noting that normally, you wouldn't give it so many different awkwards shapes. It might also be worth noting that the algorithm hasn't been check to make sure it handles non-square images correctly. Some of the placement errors may have occurred due to the fact that the input images were not square.
Yazar
Sahibi

I've just noticed that the 48x32 image near the bottom is potentially overlapping with the 80x128 image. We can't be having that! We definitely need to test this thing some more.

I've just noticed that the 48x32 image near the bottom is potentially overlapping with the 80x128 image. We can't be having that! We definitely need to test this thing some more.
Bu konuşmaya katılmak için oturum aç.
Etiket Yok
Bug
Enhancement
Kilometre Taşı Yok
Atanan Kişi Yok
1 Katılımcı
Bildirimler
Bitiş Tarihi
Bitiş tarihi geçersiz veya aralık dışında. Lütfen 'yyyy-aa-gg' biçimini kullanın.

Bitiş tarihi atanmadı.

Bağımlılıklar

Bağımlılık yok.

Referans: sbrl/SpritePacker#1
Herhangi bir açıklama sağlanmadı.