Skip to content

Modified Lobby Sort#8001

Merged
NoahTheDuke merged 5 commits intomtgred:masterfrom
tylerjallen02:sort-lobby
Mar 19, 2025
Merged

Modified Lobby Sort#8001
NoahTheDuke merged 5 commits intomtgred:masterfrom
tylerjallen02:sort-lobby

Conversation

@tylerjallen02
Copy link
Contributor

This pull request is my proposed solution to issue #7587

The goal of this solution is to make games that have been waiting longer more easily accessible, while also making newer games easier for spectators to access

This sorting solution splits the lobbies into 3 categories. Each group is individually sorted and combined in this order (top to bottom)

  1. Open Lobbies - sorted with oldest on top - newest on bottom
  2. Started Games Allowing Spectators - newest on top, oldest on bottom
  3. Started Games Not Allowing Spectators - newest on top, oldest on bottom

Let me know if this solution works, or if we want to take another approach to sorting lobbies. If accepted:

closes #7587

@NBKelly
Copy link
Collaborator

NBKelly commented Mar 11, 2025

That seems pretty reasonable, but I think there's one more thing worth adding - if there's been more than (say, a dozen) messages in a lobby, it's most likely that either:

  1. both players are already in the lobby and chatting away
  2. the lobby owner is afk, and a bunch of people have joined and then left the lobby
    I think it's reasonable to move those games below the fresher ones.

@tylerjallen02
Copy link
Contributor Author

Would you recommend adding a criteria based on the number of messages, or after the game has existed for so long (like 10+ minutes)

@NBKelly
Copy link
Collaborator

NBKelly commented Mar 11, 2025

I think number of messages is probably reasonable - typically in an unattended lobby, somebody will join, see that other people have joined and left, then instantly leave - and these consume two messages each, and I think a fresh lobby starts with two messages?. Feel free to take whichever approach makes the most sense to you (or skip this feeedback entirely) and use whatever numbers you like. As it stands now, I think your change will already be a good improvement on what we have 👍

If a lobby has more than 10 messages, it will be placed after other
lobbies.
@tylerjallen02
Copy link
Contributor Author

The most recent commit should put lobbies with more than 10 messages below other open lobbies. It should be ready to merge unless there are any other requested changes.

@NBKelly
Copy link
Collaborator

NBKelly commented Mar 17, 2025

Neat, yeah this looks fantastic to me, but I'll let @NoahTheDuke have a peek at it with his trained code reviewing brain

@NoahTheDuke
Copy link
Collaborator

nah this si good :shipit:

@NoahTheDuke NoahTheDuke merged commit 6f3e28d into mtgred:master Mar 19, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New Games Shouldn't Appear At The Top

3 participants