Skip to content

NeoUI - Full server queuing + automatic joining#1913

Open
nullsystem wants to merge 3 commits intoNeotokyoRebuild:masterfrom
nullsystem:GH-1298_AutoJoin
Open

NeoUI - Full server queuing + automatic joining#1913
nullsystem wants to merge 3 commits intoNeotokyoRebuild:masterfrom
nullsystem:GH-1298_AutoJoin

Conversation

@nullsystem
Copy link
Copy Markdown
Collaborator

@nullsystem nullsystem commented Mar 31, 2026

Description

On entering a server, a ping-reply is now sent to the server to get the most up to date players count upon entering. Auto-join is determined if the server's full when trying to enter, and if so enters an auto-join state where it'll refresh for 15s checking count then entering when there's a free slot available. The auto-join popup bar stays on any states.

Toolchain

  • Linux GCC Distro Native Arch/GCC 15

Linked Issues

@nullsystem nullsystem changed the title NeoUI - Full server queuing + automatic joining [REVIEW #1871 FIRST] NeoUI - Full server queuing + automatic joining Mar 31, 2026
@nullsystem nullsystem force-pushed the GH-1298_AutoJoin branch 4 times, most recently from 2d1985d to ca41ffd Compare April 4, 2026 19:55
@nullsystem nullsystem changed the title [REVIEW #1871 FIRST] NeoUI - Full server queuing + automatic joining NeoUI - Full server queuing + automatic joining Apr 4, 2026
@nullsystem nullsystem marked this pull request as ready for review April 4, 2026 19:56
@nullsystem nullsystem requested a review from a team April 4, 2026 19:56
@sunzenshen sunzenshen requested a review from a team April 5, 2026 04:50
On entering a server, a ping-reply is now sent to the server to
get the most up to date players count upon entering. Auto-join
is determined if the server's full when trying to enter, and if
so enters an auto-join state where it'll refresh for 15s checking
count then entering when there's a free slot available. The
auto-join popup bar stays on any states.

* fixes NeotokyoRebuild#1298
Now with passworded server auto-join, it'll prompt first and
save the password rather than only prompting on joining in.
@nullsystem
Copy link
Copy Markdown
Collaborator Author

@sunzenshen Code review changes and changed password servers from only prompting on auto-join to prompting from beginning of auto-join and using that password: 357ec24

sunzenshen
sunzenshen previously approved these changes Apr 5, 2026
@sunzenshen sunzenshen requested a review from a team April 5, 2026 18:31
@AdamTadeusz
Copy link
Copy Markdown
Contributor

Ill review the PR properly tomorrow, but having skim read it I should point out that if bots are set up to automatically vacate when a player joins, then the bot manager will maintain the number of bots such that there is always space on the server for a player to join

@AdamTadeusz
Copy link
Copy Markdown
Contributor

Yeah so my understanding from reading the code is that in OnEnterServer, if the number of players without bots is greater than or equal to the max number of players, the gameserveritem gets saved to the autojoin thing and we enter the autojoin state.

What this doesn't take into account is that if the server is set up to auto kick bots to allow players to join, there will always be an empty spot on the server until the server is next to full and there are no bots in the server, and if the server is not set up to auto kick bots then we can't assume that just because there are fewer real people than the max number of players, that the local player can join the server. In both cases, we should therefore be comparing the total number of players including fake ones against the max number of players.

@nullsystem
Copy link
Copy Markdown
Collaborator Author

nullsystem commented Apr 8, 2026

@AdamTadeusz Not sure what you mean by the first part since it does already logically assume the server kicks the bots by excluding it from the player count? Then if the server doesn't kick bots then it'll have to utilize tags to determine that which might work out.

Why would the bot count even need to be included for case where the server will kick them out anyway? It's no different to no-bots servers.

@nullsystem
Copy link
Copy Markdown
Collaborator Author

And for the case about bots filling/kicking, the convar neo_bot_quota_mode that's not "fill" can be exposed as server tags so the client can determine what to do with the bot count. Kind of a niche case though since they're not defaults.

@nullsystem
Copy link
Copy Markdown
Collaborator Author

I've thrown it as a separate PR: #1935 as it's an extra feature. But otherwise the current one works as intended.

@AdamTadeusz
Copy link
Copy Markdown
Contributor

AdamTadeusz commented Apr 9, 2026

It's not an extra feature and you don't need to pass the convar as a server tag. If the server is set to automatically kick bots to allow players to join, then as long as there are bots on the server, the returned player count including bots will always be less than the max number of players that can join the server, because neo_bot_manager will maintain the number of bots such that there is always an empty slot in the server. If the server is set up to not automatically kick bots to allow players to join, then neo_bot_manager will not do that, and in situations where player count + bot count is equal to the max number of players on the server the player will not be able to join. In both cases there's no need for a client joining the server to do any special checks, a single comparison of the total number of players including bots against the max number of players will correctly predict whether the player can join the server immediately or whether they need to join the queue. No need to read any server tags or work out what settings the server is using

@AdamTadeusz
Copy link
Copy Markdown
Contributor

AdamTadeusz commented Apr 9, 2026

Here is an example.
neo_bot_quota 32;maxplayers 10;neo_bot_auto_vacate 1;
image
The server has 9 players connected and not 10 because neo_bot_auto_vacate is set to 1. The number of connected players including bots is less than the max number of players, anybody trying to join the server will do so without a problem and when they do a bot will be kicked to maintain an empty slot

image If I set neo_bot_auto_vacate to 0 then another bot joins and the server is now full, and no one can join the server.

If the auto join used the total number of players including bots, then it would predict correctly in the first case that it can join the server because 9 < 10, and in the second case it would correctly predict that the server is full and it needs to wait in the queue because 10 == 10. No need to read any server tags.

@nullsystem nullsystem added the New Changes for Reviewers New changes has been made. This label is mostly to notify reviewers. label Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Changes for Reviewers New changes has been made. This label is mostly to notify reviewers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NeoUI serverlist - Auto-join when server full

3 participants