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

Enable s2c packet duplication #44

Merged
merged 2 commits into from Jun 9, 2021
Merged

Enable s2c packet duplication #44

merged 2 commits into from Jun 9, 2021

Conversation

mushis
Copy link
Contributor

@mushis mushis commented Aug 26, 2019

  • Feature: "qizmo" Packet Duplication by Spike
  • Reasoning: minimize packet loss, improving connection from clients.
  • Impacts: mvdsv (server to client - s2c - This pull request) and ezQuake (client to server - c2s - done:pullrequested)

MVDSV implementation:
setinfo dupe 0-5
The new server cvar. A client sets a "dupe" value between 0 (no packet duplication, normal behavior) and 5 (5 packets duplicated). setinfo dupe 1 sends one duplicated packet to the client. With higher dupe values, the default mvdsv rate limit of 50000 isn't enough for a busy fight - read nails - (and rate cut happens). Hence the change to the hard-coded mvdsv rate limit of 100000, enabling server admins to set higher rate limit. From my tests, a value of 1 or 2 if fine for rate 50000 with lots of nails (stress test).

Testing
You can see this in action with the command showpackets 1 (this command is implemented in the netchan itself - client and server - but the outbound duplicated packets aren't shown )
<-- is 'inbound' | --> is 'outbound'
So with dupe 0 and no packetloss, you should get an equal number of --> and <-- lines
but with dupe >=1, you'll get duplicated <-- lines

This works for every client that connects to mvdsv. It doesn't matter if the client uses qwfwd or not - the packets are duplicated from the server to the client.
All this is already featured in FTE.
Credits to Spike

@mushis
Copy link
Contributor Author

mushis commented Aug 27, 2019

Servers with this mvdsv patch: Vortex (Spanish) and Nicotine Lounge (USA)

@deurk
Copy link
Member

deurk commented Mar 22, 2020

Non updated clients will still be able to get packets though, right? Will they just ignore duplicated packets?
What happens if server rate is set to 200000 and dupe to 5 for example with a non update client? With a mix of updated and non updated clients?

@mushis
Copy link
Contributor Author

mushis commented Mar 22, 2020

Non updated clients will still be able to get packets though, right? Will they just ignore duplicated packets?

Yes they will. The good thing in implementing s2c (server to client) packet dup in mvdsv is that it doesn't matter what client is being used, the packets will get through anyway. because mvdsv will send them.

What happens if server rate is set to 200000 and dupe to 5 for example with a non update client? With a mix of updated and non updated clients?

server rate? (edit: i understood. long story short, the client will receive the packets anyway, even if it isn't updated. orginal answer below)
the server will send X bytes to the client, depending on the entities shown on the client's pov. dupe 5 will send 6 times X (5 dupes). regardless of the client. So, running a non-updated client will be the same. the server cvar will be available to be used (the setinfo). The only thing a non-updated client will NOT be able to do, is to control packet duplication in C2S (client to server)! because it won't have the client command to do so.

it's a good idea to limit the number of dupes in the code.
its also a good idea to allow the clients to define more rate. i think 100000 is programmatically the limit, change that to 500000 maybe?
(edit: created #51 )

@deurk
Copy link
Member

deurk commented Apr 16, 2020

Linked to meag/ezquake-source#3

@ciscon
Copy link
Collaborator

ciscon commented Jul 23, 2020

for posterity:
discussed whether or not to just wrap this up along with cl_c2spps into something like cl_packetduplication which would enable both c2s and s2c, and leave c2s/s2c cvars for individual customization if desired.

@mushis
Copy link
Contributor Author

mushis commented Aug 11, 2020

thats a good suggestion.
please make this, or else we'll have to hear dirtbox telling us to use qizmo forever.
:)

meag added a commit to meag/mvdsv that referenced this pull request Jan 30, 2021
Qizmo-esque
"/setinfo dupe 1" in client
Maximum value set at 3 for the moment

Disabled while downloading files

Closes QW-Group#44
meag added a commit to meag/mvdsv that referenced this pull request Jan 30, 2021
Qizmo-esque
"/setinfo dupe 1" in client
Maximum value set at 3 for the moment

Disabled while downloading files

Closes QW-Group#44
meag added a commit to meag/mvdsv that referenced this pull request Jan 30, 2021
Qizmo-esque
"/setinfo dupe 1" in client
Maximum value set at 3 for the moment

Disabled while downloading files

Closes QW-Group#44
@tcsabina
Copy link
Collaborator

tcsabina commented Jun 1, 2021

upping this.

Let's merge this PR, please. It could help players that still have PL issues.

@tcsabina tcsabina merged commit 78fbeee into QW-Group:master Jun 9, 2021
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.

None yet

4 participants