com.unity.multiplayer.samples.coop icon indicating copy to clipboard operation
com.unity.multiplayer.samples.coop copied to clipboard

feat: client-authoritative character select

Open fernando-cortez opened this issue 4 years ago • 5 comments

Description (*)

This PR introduces a more reactive flow for the local player's character select screen.

The local player's character choice is shown instantaneously, instead of previously waiting for a confirmation event from the server. This clears the local player's previous choice and sets the new seat visuals right away.

The server will still override changes for the local player when they are locked in/out, or set to inactive due to another player confirming the same player, and of course any other player's selection.

The confirm button is server-authoritative. I figure a visual update for that when waiting for server confirm can be done as a follow up to this PR.

Related Pull Requests

Issue Number(s) (*)

Fixes issue(s): MTT-1438

Manual testing scenarios

  1. ...
  2. ...

Questions or comments

Contribution checklist

  • [ ] Pull request has a meaningful description of its purpose
  • [ ] All commits are accompanied by meaningful commit messages
  • [ ] All new or changed code is covered with unit/integration tests (if applicable)
  • [ ] All automated tests passed successfully (all builds are green)

fernando-cortez avatar Nov 03 '21 21:11 fernando-cortez

State of PR: fix containing a NetworkListEvent's previous value has been merged to Netcode's develop branch. However, it was not included as part of pre.4 release.

Will place on hold until Netcode SDK version has been upgraded.

fernando-cortez avatar Jan 04 '22 15:01 fernando-cortez

Moving this to blocked. Awaiting possible refactors to NetworkVariable implementation.

fernando-cortez avatar Feb 02 '22 15:02 fernando-cortez

So coming back to this, an owner netvar solution might still be weird. After discussions with Luke, we'd still need a server driven network list to manage locked in state, with an additional owner netvar for selection. Syncing between the two could be weird and buggy. Owner netvars can't be corrected by the server, so we'd effectively need to sync the network list and the owner netvar's state, with all the latency in between. With client driven movements coming, not sure showing this example would still have value? Let's keep it until we have merged other client driven stuff.

SamuelBellomo avatar Apr 04 '22 21:04 SamuelBellomo

Adding this for all PRs that have been opened since this new flow has been added. Please add your changelog here project changelog file and/or package changelog file

SamuelBellomo avatar May 12 '22 19:05 SamuelBellomo

Adding this for all PRs that have been opened since this new flow has been added. Please add your changelog here project changelog file and/or package changelog file

SamuelBellomo avatar May 12 '22 19:05 SamuelBellomo