3

I am writing a sprite sheet generator tool in adobe AIR, and I have to force with the question: How to pack a collection of 2D rectangles to smallest possible 2D rectangle with power of two. (like 1024x444).

I think that this question is NP-Hard. I found good answer for it here.

I thought about another option. What if I cut my rectangles to smaller rectangles. Will this make my life easier?

My XML data will be more complicated, and I am not sure how this will effect the performance of the application that will use the cut sprite sheet.

How ever the difficulty of such problem is probably belongs to P.

Do you think it's possible? What am I missing here?

Ilya Gazman
  • 919
  • 3
  • 15
  • 33

0 Answers0