Looking to make a stash sorter for a game. Stash space is grid of cells. Items have known width and heights. Would like to sort the items. Have seen some basic sorting algorithms but having a bit of trouble imagining how to deal with sized items (beyond 1x1 cells). Should I just be marking the cell range as not needing to be sorted? Or what's a good way to start with this problem?
#๐ Grid sorting algorithm
19 messages ยท Page 1 of 1 (latest)
@slate jetty
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Closes after a period of inactivity, or when you send !close.
Arrange the cells in a row like in the order u read
Than sort based on x criteria
Maybe make it to sort based on x criteria and if there are simalar items next to one other sort these smaller groups based on some y criteria
Also no need to self implement sorting theres list.sort(key)
the sorting I get mostly, but these items have 1-2 width and 1-4 height
correct
Would be a fun challenge id say
it's an annoying quality of life issue I'm trying to solve actually ๐
it's fun the first 100 times you do it
Try to do it whith defining urself some rules
And if u found a good set of rules implement it
The way of placing one evrywhere than the next and so on + if one is incorrect backtrack by 1? Would be a slightly smarter way to bruteforce the issue
If u don't want sorting to be an issue maybe make them all 1 slot but block slots from the back of the inventory when they are added
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.