There are many types of lag in FA. Lag that makes that game run choppy on your screen, lag that makes the game stutter, lag that makes the game run in "slow-mo", and lag that makes the game hang. This objective of this post is to understand lag, the specific types of lag, how to identify them, and how to remedy or prevent them.
FPS, frame per second: this is lag that makes only your game slow down and feel choppy.
- Identification: you can discover your current FPS by pressing the / key (next to Num Lock). Your FPS will be displayed in the top left corner.
- Cause: The number of graphical components being drawn (ex. polygons, textures, effects, shaders) on your screen directly affects FPS.
- Remedy: Lower graphical detail, avoid zooming in, and/or improve video card power.
- Detailed understanding: FA limits its affect on FPS by offering many different quality settings and through a quality scaling strategy called level of detail. Level of detail works by represent units as much simpler models and textures when zoomed out, as you do not need nor care about detail when you cannot see it. As you zoom in, higher detailed models and textures are loaded to represent the units. There are steps, where they progressively get more detailed, depending on how close you are zoomed in.
- Major problems: It is possible to freeze your own game, by overwhelming your vid card (reducing FPS to zero), if you zoom in to too many graphical components, such as many polygons, many effects, textures for many units, such as 500+ nuke impacts, 500 engineering drones with construction beams, or maybe even 500 megaliths spawned all in 1 spot.
Sim Speed: Sim speed is like another way of saying game speed, where +1 is like adjusting game speed to +1 and -1 is like adjusting the game speed to -1. When someone speaks of another's sim speed, they are referring to that person's "max sim speed", as in the fastest game speed their PC can currently run the game, considering the amount of current units and commands/actions in play. This affects everyone in the game, as the game must sync to the slowest person in game.
- Identifying: you can discover your "max sim speed", and all other player's, by opening the console (~ key) and typing in "ren_shownetworkstats". A window will appear in the top left, that will show maxsp, which is the fastest game speed that your CPU can handle.
- Cause: The number of units acting (moving, firing, patrolling, aiming, beginning to assist, exiting a factory, etc) in which the game needs to calculate how it is to be done, strains a PC's CPU. The more calculations (path finding, attack move, reclaim, firing, avoiding collision) being performed, the worse the sim/game speed becomes.
- Remedy: Less actions being made, means less calculations needing to be performed. Units at rest have minimal effect on sim speed. Units maintaining an action have a relatively negligible affect on sim speed, depending on that action (ex. assisting something under construction is similar to being idle, though the instant it begins to assist, it runs a calculation that can affect sim speed). A CPU with very high rated operations per second (per core), will maintain high max sim speed--clock speed (AKA frequency) is just a part of what determines operations per second. You may have seen FLOPS (floating point operations per second) and IOPS (integer operations per second) and supercomputer power being calculated with such a number. It is like electricity, where OPS are the current, which is the product of the frequency (clock speed) and the voltage (bandwidth: # of transistors, general architecture, mem bus, etc.). These numbers of FLOPS in a supercomputer are a little deceiving, since they are a product from the vast number of cores, and FA mainly relies on a single core.
- Detailed understanding: It should be fairly straight forward. More calculations = more "lag" (sim speed related). Determining pathing, when many units are given commands which require them to move to a new location, takes quite a large amount of calculations. Contrary to popular belief, 500+ T1 engineers assisting an air factory does not affect sim speed significantly--it is their act of assisting each new aircraft beginning construction, after the finished one flies off, that can affect sim speed. This is also a great way to gauge how powerful someone's CPU (single core performance) is.
- Major problems: Sim speed is a major problem with many active units. Massive ASF battles, where planes are making many movements, acquiring many new targets, and firing many shots, require many calculations and make sim speed drop severely. Survival games tend to be the worst, since the AI gives virtually every unit multiple individual commands to follow. Fewer units = fewer problems. Consider not playing with an unit cap of 1000, to avoid this.
Unit unresponsiveness: this kind of lag occurs when units are having difficultly calculating a new path to follow, to get to the commanded destination, and there is a delay between a command given and when the unit actually follows the command. This affects everyone in the game.
- Identification: Give an unit a command, typically a land unit that is not a "massive" experimental, or a large naval unit. If it does not act right away as expected, then you are suffering from unit unresponsiveness.
- Cause: The path finding algorithm (pathfinding thread) is getting overwhelmed by too many moving units. The algorithm that makes units avoid collision also can also be overloaded and contribute to this kind of lag.
- Remedy: avoid tightly grouping units in a manner where they experience a traffic jam, getting stuck on each other.
- Detailed understanding: A very annoying kind of lag that prompts confused and annoyed players to destroy units, assuming that there are simply too many units out. It is not the number count, and definitely not the count of static units such as buildings themselves, but the "clutter" of units, more colorfully described as a clusterfuck. Units trying to make their way through a maze of buildings and walls have many micro steps in their move commands in order to weave through, without colliding, which puts strain on the pathfinding algorithm.
- Major problems: The most notorious cause of this lag is excessive wandering T1 engineers, which are perhaps given many attack move commands to reclaim a map's forest, and or those who have been ordered to assist an air factory, yet can not fit, and are wandering around looking for a spot to fit in. The black ops hover experimentals can be very unresponsive, as they can not pass through buildings, despite being given the "massive" script (that allows GCs to walk on and destroy units it steps on), so their pathfinding becomes very awkward.
Internet lag: this kind of lag comes from a poor connection quality. This affects everyone in game, as the game syncs to the slowest person in game.
- Identification: The network stats window can conveniently show everyone's pings, and data transmission. F11 also shows ping, with pings over 200 in yellow (not a problem) and pings over 500 in red (causes lag).
- Cause: the internet is not perfect. Data is compressed, sent over wires, including wires along the ocean floor, to its destination many miles away. Interference and damage to any of the lines in between 1 player to another, from bad weather, power surges, earth quakes, etc. can cause a temporary loss of connectivity, packet loss, or general drop in connection quality where data does not arrive perfectly and must be sent again.
- Remedy: opt for the highest connection quality possible, wired ethernet lines from the router to your PC, or direct from the modem, instead of wireless. A quality ISP that provides internet through reliable means, such as fiber optics, cable, and ADSL, and not wireless (inc. satellite). Ask laggers to give their base and leave.
- Detailed understanding: FA does not run on a server. The game lobby is not run off of FAF's server. The only time there is a server, is in the game lobby, where the host acts as a server. If he leaves the game lobby, the game ceases to exist. FAF simply makes it easy for a person to publish their PC's address to allow others to join him. Once the game is launched, everyone syncs with each other. The runs on half-second (500ms) beats, sending packets to sync up with every beat. This is why anyone with a 500ms ping or higher, to any other player, can cause laugh, since even though they are 300ms to all but 1 player, others must wait up for the slowest player.
- Major problems: F'ing people on wireless and f'ing people living on remote islands, or living out in the middle of no where, where they must rely on satellite, and it happens to be partly cloudly. F'ing people file sharing, people leaving browser windows/tabs with a YouTube video (AKA PORN) streaming, or people uploading something, while playing the game... Oh, and F'ing Russians & Chinese ;)
Desync: this is a rare event when one or more players lose their sync with other players and the game continues to run.
- Identification: a desync window pops up in the middle of the screen.
- Cause: sync is somehow lost, due to someone's PC calculating something differently, a difference in files, a mismatch in frequency or something else...
- Remedy: click the button to ignore it, sometimes the game resyncs and the desync window does not pop up again. If it keeps popping up, ask that person to leave, or rehost.
- Detailed understanding: this used to happen a lot in GPG days, when people had downloaded mods and had various new files in their actual game data folders, such as AI files. To my understanding, these are freak accidents in FAF, that have no identifiable pattern to help eliminate them.
- Major problems: if the desync window keeps popping up, that person who is desync basically branches off into his own version of the game, that is not exactly like the rest of the players. You can continue to play, but his new commands may not be transmitting correctly to others. It is just best if he leaves.
Hang-up: this is when the game halts for apparently no reason.
- Identification: game just halts. Players can still chat. ShowNetworkStats might show someone with "zero" under data transmission, and is most likely the cause of the hang-up.
- Remedy: wait for the eject screen if the person with "zero data" is not talking. If he is still talking, the game may "resync" and continue. If you are not patient, then the player with "zero data" may be asked to leave, and the game should continue once he disconnects.
- Detailed understanding: Sometimes it's due to a loss in sync, without a desync window popping up. Sometimes it's due to some player experiences major packet loss, or some other internet related problem.
- Major problems: people get offended by the "blame game" to find out who it is. They do not understand how they are being identified (they prob don't know about netstats), and refuse to leave. Since the game will not continue until that person disconnects, who refuses to leave, you have no choice but to rehost the game (pref without them).
I know this is long and most people have about as short of an attention span of your average small rodent, but if you are genuinely interested, this is my take/perspective on lag. I'm tired of explaining it many times to people who do not understand it very well. It is not the definitive, most accurate guide, but I believe my understanding is better than the average player's, so hopefully this is of some use and not a waste of the 1 hour I took to type it up.
P.S. "bugged game lobbies", where you see people's pings strangely, are almost always caused when someone joins the lobby when there is a player currently in the Observer slot. It will not be bugged for the host, so trust what they say.
TIP: you can keybind network stats, if you have GAZ_UI. Press F1, scroll down to the bottom, find "Toggle Network Stats" and give it a new key. I personally use "Shift ~"