-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Different Sort Options for Scores #17
Comments
I think this is just the right way. |
That is one solution for sure; But why not add something to handle it inside the module? One way I can think of is we can add an option to express the sorting direction when creating a sortedset. For example I say the sort direction is |
I think so too, and I don't think the syntax modification or increased memory footprint (need to store a collation) due to this requirement is worth doing at the moment. |
@H-Shafiei Thanks for your issue. Simple look, the command you need might be (with a sort option, only valid when tairzset is first created):
where the pattern maybe This is indeed more flexible (to adapt to the sorting needs of different scenarios). In addition to the syntax modification, we may also need to record this pattern in each But I still think this is a larger feature (functionally speaking). I also think we need more feedback, or you can try to submit a PR with your ideas, maybe that way we can discuss this better. |
@chenyang8094 Yes that's exactly what I was thinking of and I think it won't have a considerable overhead. I was reading the code in order to see if I can work on it but I haven't coded in C for a few years; although I can read the code but I am almost sure that I can't change it without hundreds of bugs rising up :) |
Hi, Thanks for your nice work!
I think there might be a use case for having different scores being compared in independent orders. Let's say I want to create a leaderboard for my game and I have a highscore with an ascending score (meaning the higher the score, the higher the rank) and for the same scores I would compare the time of the score (which the lower the time the higher the rank). From what I see with your module, we have to accomplish this with saving either the time or the highscore with some math function to reverse it's meaning and then use the module. But because I think this feature would be used alot, It would be worth implementation. Can this be implemented?
Thanks
The text was updated successfully, but these errors were encountered: