Original Post — Direct link
8 months ago - /u/ekimarcher - Direct link

Originally posted by GoastRiter

I get the impression that the current algorithm simply sorts items from largest to smallest, totally ignoring the item type, because checking the item type would greatly complicate the code and lead to sorting failures (inability to fit all items) and slow sorting (could be orders of magnitude more sort comparisons).

But adding a step that alphabetically sorts the 1x1 items related to each other would be useful, and could be done as a post processing step after all 1x1 slot placements have been decided.

Bingo, I wrote it as a quick test years ago and we never went back to do it properly for some reason. It bothers me so much that it leaves that single column in the stash if you have some rings at the end.

8 months ago - /u/ekimarcher - Direct link

Originally posted by AceWissle

You probably have better things to do but can you share some pseudo-code for how you implemented this? Genuinely curious

I don't remember what it looks like exactly but it's probably just the most basic thing possible.

sort list of items based on size. loop through the list and try to put every item as close to the corner as possible.