I am utilizing this program known as Quadtastic which is a sprite sheet administration device that allows you to outline quads on a sprite sheet, title them, and many others, and export to metadata with these names (+ place, dimension, and many others). It has a function that types chosen quads from high left to high proper by sorting first by y axis after which by x.
Nevertheless, because of the arbitrary dimension of the sprites in my sprite sheet, the highest left wasn’t the precise high left sprite. One other sprite on the identical row had a bigger bounding field than it and thus had a decrease y place which triggered it to get sorted earlier than the precise high left one (which was sorted as fifth)
I attempted to switch the supply code to attempt a special algorithm the place I sorted by the space of every quads high left nook to the highest left nook of the minimal bounding field of all the chosen quads (a rectangle that encompasses all of them). This considerably labored and was in a position to accurately type the highest left sprite as the primary however a bunch of others have been incorrect.
So, the place can I am going from right here? I can not actually consider some other algorithms for sorting. If anybody has any concepts for different algorithms I might attempt, that’d be nice!
And, if anybody is questioning, the code for the sorting may be discovered right here.
If you wish to run and take a look at algorithms your self you want the 32 bit model of Love 10.1. In case you get errors about an lfs.dll, take it from the shared folder within the repo and put it within the base listing of 32-bit Love 10.1, the place love.exe, is and you must be capable to run it.