Do bears shit in the woods?

Talk about general things concerning Forged Alliance Forever.

Moderators: FtXCommando, Ze Dogfather

Do bears shit in the woods?

Postby SeraphimLeftNut » 15 Apr 2016, 22:45

Only if acknowledged by the forest floor.

How orders are lost

All the orders given by a player are sent to the opponent in UDP packets, to be confirmed as received with acknowledging UDP packets.

Once the order is acknowledged it is run on both systems running the game, 500 ms after the original order issuance. (net_LAG parameter)

If acknowledgement takes longer than 500 ms from the issuance of the order, then sim stops and waits. (This causes stutter and other wonderful issues related to ui lag, although on an ideal system the ui should not sense such an event)

Given that UDP packets tend to get lost, the game will try to resend the orders 3 times before cancelling the order.(I saw this 3 number in a message board post by one of the devs, don't have the link saved)

The rate at which the orders are resent is determined by the following parameters: net_MaxResendDelay, net_ResendPingMultiplier, net_ResendDelayBias, net_MinResendDelay.
The wiki lists the equation for the delay as ping*new_ResendPingMultiplier+net_ResendDelayBias. However, I vaguely remember(once against from that forum post) that the equation is more complicated and the later resends occur more rapidly.
An upper bound on how long it will take the game to lose orders is (ping+25)*3 ms. A corrolary to this is that orders that take too long to get to the destination will not be acknowledged, in order to avoid the situation where the sending system cancels the order, while the receiving/acknowledging one takes it seriously.

You can see that ping jitter will make this a very crazy situation.(you can let your imagination run wild here...)

A major source of upstream traffic delay is bufferbloat. Caused by shitty isp's. https://youtu.be/0hzxwoZDI9s?t=41

When the connection is under load uploaded traffic can be delayed for 1+ seconds (my case). This means BITS, windows update, firefox, FAF, a wardriver, etc. can indirectly cause your orders to disappear.

Furthermore all this can have a very interesting effect on orders such as, the attack move into space, patrol order, assist order,..

These orders are not specific to an action, so when an engineer wandering around setons clutch wants to reclaim a rock, it needs to ask everyone's permission first and if that permission doesn't come, it will need to wait and choose another rock.

How about an effect on targeting entities that adjust their path...
no ui lag: https://www.youtube.com/watch?v=3MdcVdL2kIY
I think this is going to be fun
User avatar
SeraphimLeftNut
Contributor
 
Posts: 975
Joined: 10 Jul 2012, 19:46
Has liked: 3 times
Been liked: 219 times
FAF User Name: TA4Life

Re: Do bears shit in the woods?

Postby justmakenewgame » 16 Apr 2016, 08:28

long story short #FAremake
better colors for FA - forums/viewtopic.php?f=2&t=5434&start=30#p106723
https://www.youtube.com/watch?v=3--CgLvJGpk

<Aurand> dogler; you made bad decisions
User avatar
justmakenewgame
Avatar-of-War
 
Posts: 245
Joined: 05 Dec 2014, 16:53
Has liked: 13 times
Been liked: 23 times
FAF User Name: justmakenewgame

Re: Do bears shit in the woods?

Postby RocketRooster » 16 Apr 2016, 09:02

SetonsGrandPa wrote:long story short #FAremake


The fundamental issue remains no matter what you do - latency over the internet. UDP is used for peer to peer because the minimum packet sizes are smaller than TCP, multicast is possible and so an ack-based pseudo-connection-state is created at the application layer. But it remains best effort comms and rewriting FA cannot change the fact that compromises have to be made due to the underlying networking model of the internet which is a mishmash of circuit switching and many potential points of failure in the context of having responsive realtime comms. You could use TCP but then generally you'd use a central server as the hub for comms between clients, alternatively you'd need a stateful socket between every peer in the game. Consider the event of a socket being dropped - the game would halt for everyone while the two peers with the dropped socket renegotiate the connection. Dropping command packets is a much better compromise.

The GPG networking programmers aren't amateurs, they knew what they were doing. Rest assured that they investigated every option and settled on the best solution.
RocketRooster
Avatar-of-War
 
Posts: 294
Joined: 08 Apr 2016, 11:29
Has liked: 29 times
Been liked: 52 times
FAF User Name: RocketRooster

Re: Do bears shit in the woods?

Postby SeraphimLeftNut » 16 Apr 2016, 11:19

RocketRooster wrote:
SetonsGrandPa wrote:long story short #FAremake


The fundamental issue remains no matter what you do - latency over the internet. UDP is used for peer to peer because the minimum packet sizes are smaller than TCP, multicast is possible and so an ack-based pseudo-connection-state is created at the application layer. But it remains best effort comms and rewriting FA cannot change the fact that compromises have to be made due to the underlying networking model of the internet which is a mishmash of circuit switching and many potential points of failure in the context of having responsive realtime comms. You could use TCP but then generally you'd use a central server as the hub for comms between clients, alternatively you'd need a stateful socket between every peer in the game. Consider the event of a socket being dropped - the game would halt for everyone while the two peers with the dropped socket renegotiate the connection. Dropping command packets is a much better compromise.

The GPG networking programmers aren't amateurs, they knew what they were doing. Rest assured that they investigated every option and settled on the best solution.


The UDP packets coming from my FA have DSCP value of 48(checked with wireshark). This was set using QOS settings, there is a thread about this.
no ui lag: https://www.youtube.com/watch?v=3MdcVdL2kIY
I think this is going to be fun
User avatar
SeraphimLeftNut
Contributor
 
Posts: 975
Joined: 10 Jul 2012, 19:46
Has liked: 3 times
Been liked: 219 times
FAF User Name: TA4Life

Re: Do bears shit in the woods?

Postby RocketRooster » 16 Apr 2016, 11:29

Well it looks like you're in the fortunate position that your ISP honours it judging from your improvement. Have you tried getting it to 46 (iirc the most critical priority value)?

I'm smelling me some usefulness of writing some sort of middleware running on the local machine that diddles with the headers. Or hacking gateway firmware. Hmm......
RocketRooster
Avatar-of-War
 
Posts: 294
Joined: 08 Apr 2016, 11:29
Has liked: 29 times
Been liked: 52 times
FAF User Name: RocketRooster

Re: Do bears shit in the woods?

Postby SeraphimLeftNut » 16 Apr 2016, 12:36

RocketRooster wrote:Well it looks like you're in the fortunate position that your ISP honours it judging from your improvement. Have you tried getting it to 46 (iirc the most critical priority value)?

I'm smelling me some usefulness of writing some sort of middleware running on the local machine that diddles with the headers. Or hacking gateway firmware. Hmm......

Please make this and share it with all the noobs.
no ui lag: https://www.youtube.com/watch?v=3MdcVdL2kIY
I think this is going to be fun
User avatar
SeraphimLeftNut
Contributor
 
Posts: 975
Joined: 10 Jul 2012, 19:46
Has liked: 3 times
Been liked: 219 times
FAF User Name: TA4Life

Re: Do bears shit in the woods?

Postby nine2 » 16 Apr 2016, 13:02

Pretty sure the middleware is already there
'the proxy'
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: Do bears shit in the woods?

Postby RocketRooster » 16 Apr 2016, 13:32

Proxies generally concern themselves more with presentation and session layer data while ignoring the transport layer stuff, but I stand to be corrected.

I've given the middleware idea a bit of thought and I retract the notion. I am not sure it's worthwhile. For one thing, essentially it would have to simulate FAF netcode, i.e your FAF would communicate with it, while it in turns communicates with the middleware at the peer, which communicates with the peer's FAF. This will add some latency in of itself, and even if all it did was ensure that the FAF traffic was tagged as time critical, it still doesn't guarantee that you ISP will honour the header settings. So it's no improvement on hacking registry settings, infact it would likely be slightly worse.
RocketRooster
Avatar-of-War
 
Posts: 294
Joined: 08 Apr 2016, 11:29
Has liked: 29 times
Been liked: 52 times
FAF User Name: RocketRooster

Re: Do bears shit in the woods?

Postby d-_-b » 16 Apr 2016, 17:18

if you are choking your upstream to the point where packets are delayed, probably you should kick people off netflix... ISPs rarely respect any headers, and more likely to do their own traffic policies based on DPI. If your neighbours are choking the ISP's links there is nothing you can do.

OR put some firmware on your router that can do QOS, so at least they are not being choked by some up/download locally.

a token bucket on udp traffic on faf port from your computer with higher priority etc, will work wonders on a choked line. you could even torrent and it wouldn't impact your game.

DD-WRT can do this, no problem.

the software that comes with home routers is notoriously shit.

FAF requires about 40KB/s UP and DOWN to do 6v6.

Also, you can make sure that your packets are not being fragmented by calibrating your MTU. Classic example of a DSL line running PPPoA, the ethernet sends packets of 1500 bytes tops, but once they get sent down your dsl line, the atm headers steal bytes from that, so your 1500 byte packet gets fragmented into two packets, which can of course take different routes/be delayed by different amounts for various reasons etc...
User avatar
d-_-b
Avatar-of-War
 
Posts: 93
Joined: 19 Jun 2015, 01:58
Has liked: 6 times
Been liked: 20 times
FAF User Name: d-_-b


Return to General Discussions

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron