Skip to content
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

Initial blind lobby / game support (part 1) #4175

Merged
merged 17 commits into from
Jan 29, 2025

Conversation

past-due
Copy link
Member

@past-due past-due commented Jan 13, 2025

This PRs enables "blind" lobbies / games.

What is a "blind" lobby / game?

In a blind lobby: Players' true identities are hidden from everyone (except the host) - until the game starts
In a blind game: Players' true identities are hidden from everyone (except the host) - until the game ends

The host (currently, a spectator host) has the ability to see players' chosen player names / identities, and configure all of the game settings as expected (position, teams, etc).

You might want to also consider other configuration options, like blocking free chat, if you want to prevent players in the lobby from purposefully revealing their identities to each other.

What is the new "simple lobby" waiting room for blind lobbies / games?

A blind lobby / game can optionally be configured with an even simpler waiting room, which does not reveal the list of players, but simply:

  • Basic information on the host
  • The ability to check ready
  • Basic status information on the lobby (number of ready players, whether waiting on the host to start the game, etc)
blind_waiting_room

Implementation Details

When connecting to a game configured in any of the blind modes, each client will generate a unique new "blind identity" which is exchanged and used for communication with other clients. The host will receive the "true" player name / identity on join, which it can verify as appropriate, but will only share the "blind identity" and generic player names / details with all other clients.

Once the game begins (in "blind lobby" mode) or the game ends (in "blind game") mode, the host shares the host-verified "true" player names / identities with all other connected players. These are then "fixed-up" in the replay files so that replays play back with the true player names / identities revealed.

@past-due past-due force-pushed the 2025_01_room_options_1 branch 3 times, most recently from 3e8f5b6 to a7bcad4 Compare January 13, 2025 02:49
@ManManson ManManson self-requested a review January 13, 2025 19:47
@past-due past-due changed the title Initial blind lobby / game support [WIP] Initial blind lobby / game support Jan 14, 2025
@ManManson
Copy link
Member

@past-due Can you please summarize what's left to be implemented and/or fixed so that [WIP] mark can be removed?

@maxsupermanhd
Copy link
Member

maxsupermanhd commented Jan 19, 2025

@ManManson

Can you please summarize what's left to be implemented and/or fixed so that [WIP] mark can be removed?

So this one is a bit complicated, not sure what contributes to it more, me or pastdue at this point but there is shared consensus between us two (I think) that following falls under this pull request:

  • Addition of feature picks from the runtime-provided list (sketch from 13th Jan) image Some translations will baked in and referenced somehow on startup/runtime to populate this list
  • Additional rework on the left side of the ui allowing player to pick what they want and what they don't want (not sure would be it be 2 way or 3 way with yes/no or yes/dontcare/no), so far no final list of settings was defined but pastdue wants to fit player count in there somehow too.
  • Some cmdinterface commands/responses that report to backend application what user picked.

That is gonna be it for this pull request but not all for next beta as I was told, NET_REDIRECT or similar functionality would be added to allow backend-driven matchmaking that is triggered via cmdinterface, no specifics on that so far.

I would also make a pull request with previously rejected attempt at overriding actual display names of players in the lobby via rating request. Rating response should dictate what name does player actually have to finally prevent people stealing each other names and impersonating them.

Another quiet important addition I plan this beta that would be in same pull request as name override and it would allow client to decide if they want to either

  • trust host on their rating requesting
  • get the url and request on it's own
  • ignore rating of the host

This is required to implement multiple rating categories since client currently has no idea what category they are supposed to query from rating server. I am currently exploring options of signing rating responses and letting host deliver signed rating to clients with them treating host-provided and signed with same signature rating (as they would gather signature anyway on join by requesting their own rating) of higher priority than if they requested it on their own.

But I was told to hold on writing literally anything related to that and I already noticed that it is for a good reason since it would've caused a lot of conflicts.

@ManManson
Copy link
Member

@maxsupermanhd Thanks for the thorough write up. I'll proceed with reviewing this part of the upcoming feature.

src/multiint.cpp Outdated Show resolved Hide resolved
src/multiint.cpp Outdated Show resolved Hide resolved
src/multiplay.cpp Outdated Show resolved Hide resolved
src/multiplay.cpp Outdated Show resolved Hide resolved
src/multistat.cpp Outdated Show resolved Hide resolved
Copy link
Member

@ManManson ManManson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have a few nits, otherwise LGTM.

@past-due past-due force-pushed the 2025_01_room_options_1 branch from a7bcad4 to 7e107ee Compare January 29, 2025 20:51
@past-due past-due changed the title [WIP] Initial blind lobby / game support Initial blind lobby / game support (part 1) Jan 29, 2025
@past-due past-due marked this pull request as ready for review January 29, 2025 20:56
@past-due past-due added this to the 4.6.0-beta1 milestone Jan 29, 2025
@past-due past-due merged commit 317c8df into Warzone2100:master Jan 29, 2025
37 checks passed
@past-due past-due deleted the 2025_01_room_options_1 branch January 29, 2025 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants