Hi everyone, ronia here and this is an extended version of the conversation over on the Global Black Desert Mobile discord #pvp-chat channel.
Networking is the fundamental technology that links one computer to another. It is the basis on which games like our very own Black Desert Mobile is created so we can communicate, play and fight online. Not all connections are made equal though and we're going to explore how to measure our latency to the "Black Desert Mobile" server.
- A computer with Windows installed and administrator access
- An emulator, any emulator (I use Nox)
- An internet connection
- (optional) a GNU/open source tools API like Cygwin
The steps for measuring our latency can be broken down simply:
1. Find the IP address of the global server you are connecting to.
2. Find a method to measure the time it takes for one data packet to travel from your computer to the server (and back again).
This will depend on your in game server. Whether you are Mediah or Hexe or Dandellion, the address will be different depending on the server you are connecting to. For brevity, I will be focusing on Mediah (North America in generally really, but more on that later).
1. Log into your BDM account using your emulator of choice
2. Navigate the menu options until you are actually logged into your character and standing in the World.
3. Open a command prompt: Start Menu>cmd (run as administrator)
4a. Enter the following command if you have cygwin installed: netstat -bn |grep -B 1 Nox (or other emulator).
4b. Or if you do not have cygwin installed: netstat -bn
5. Copy all of the output to a text editor of choice and manually delete all entries that do not correspond to your emulator of choice.
6. You should now have a manageable list of IP addresses that correspond to your emulator.
These addresses are the list of ALL TCP connections (or 'internet' connections) made to and from your emulator. Among these connections will be the connection made to "BDM". Our task now is to narrow down this list to our final destination.
The first thing to notice is that the source destination (you) is on the left and the remote server (them) is on the right.
The second thing to notice is that the if the source and the destination match, then that means that connection is to itself and isn't useful so you can delete these entries.
Destination addresses that include a some of these usual suspects can also be deleted: 127.0.0.1 (the alias for localhost), 192.168.x.x (a popular router subnet), 10.0.x.x (another fairly popular router subnet).
Now that you've whittled your way down to likely a handful of entries, the process becomes more art than technical. Head over to any website like https://whatismyipaddress.com/ and start plugging in the list of destination IP addresses you have (minus the port number). These websites provide a general geo location for IP addresses but they are not specific. They also provide ISP information. With this information we can begin to make inferrences on our list. For example, the "Mediah" server is probably not going to be located in Kansas and the ISP is probably not going to be Google. There are two addresses located in San Jose and the ISP is Microsoft Azure. Hmmm, Microsoft Azure is a very popular cloud server farm...
It's important to mention at this time that Pearl Abyss is not a datacenter. Datacenters are extremely complex collections of networking technology and an immense amount of resources are put into both creating and maintaing them. It is extremely unlikely that Pearl Abyss would host its own data center. It is then extremely likely that Pearl Abyss rents server space from a big cloud service provider like Microsoft.
The only real way now to determine if your suspect IP address is indeed a "BDM server" is to see what happens when you close BDM and sever the connection. So we will do just that.
1. Close BDM on your emulator. You will need to completely close the application and not just minimize it.
2. From your Command Prompt, run the netstat command again as described above.
3. Did your suspect IP address dissappear from the list? If yes, you have found the "BDM server" IP address.
Yes I can, but then I wouldn't have been able to write all that above and make this guide to win "Best BDM tips November 2021". Also, the server address can clearly change occasionally, so what is true today may not be true tomorrow.
For North America, at time of this guide, it is the two addresses 13.83.64.222 and 20.189.136.56 (previously, it was 13.87.160.255, but perhaps it moved). This is the same for all North America servers and it is a Microsoft Azure server on the west coast in SJ. For Europe, it could be 20.40.141.231 and 20.40.134.14 in Paris (source: SitiSchu#9445 10/01/2021).
Normally, this is the point where you would bust out your favorite ping test (ping -t, tracert, etc) and maybe in some regions you can. Unfortunately, as of time of this article, BDM uses Microsoft Azure servers and they have disabled ICMP responses, so you cannot 'ping' those addresses. Fortunately, they have provided an alternative to this:
1. Head on over here: https://www.azurespeed.com/Information/AzureRegions
2. Earlier we looked up all of those IP addresses geo location. Go ahead and find your physical location on the list. West US1 is California, so that's what we are North America friends. Paris is in France, so that would be France Central.
3. Head on over here and select your region now: https://www.azurespeed.com/Azure/Latency
4. It will take a minute for the results to fully populate.
What does it all mean though? Your connection, and more importantly the stability of your connection, in the end is what determines your user experience in BDM. A stable and fast connection is going to see less lag, less "desync" and overal just more stability. As a connection becomes slower and more unstable, your experience decreases leading to more lag and more occurences of "desync".
So what is a good connection? This is subjective as the best possible latency is zero or instant. That's impossible though so what does a good-enough connection look like? In my opinion, 30-60 ms average is excellent with ping spikes no greater than 150ms.
Ping spikes indicate instability in your connection. A player can get away with high average latency as long as it is consistent. When the connection is high but consistent, the human brain and BDM netcode can automatically compensate for the delay. When the connection is tumultuous, they cannot predict what should be happening and that is when you start notice things like rubberbanding, desync, etc.
You might have seen some players talk a lot about netcode or rollback. Frankly, it is a fascinating subject and I would highly recommend anyone that is serious about online gaming to do a little bit of research on it in their free time. At a basic level, it is the reordering of network events that arrive out-of-order. Confused? I'll leave you with this analogy:
You're out at a restaurant with your family. This is one of those really weird restaurants that can't possibly exist in real life because there are only two tables and you write your order down on a piece of paper and send it to the kitchen via a conveyor belt. This restaurant also only has one chicken left in the fridge.
1. Table A, fills out their order and places it on the conveyor belt.
2. Some time later, Table B fills out their order and also places it on the conveyor belt.
3. The conveyor belt for Table A is really slow though and Table B's order arrives at the kitchen first.
4. The chef sends a note to Table B that their order is being prepared.
5. Table A complains that this isn't fair and they submitted their order first.
6. The chef looks at the two orders and notices that indeed, the timestamp on Table A's order is earlier than that of Table B's.
7. Both Table A and Table B ordered the chicken. Table A ordered first, so the chef determines that they will get the chicken.
8. The chef sends a note to Table B and tells them that they will need to order something else because the chicken is now out of stock.
9. Table B is now noticeably confused because they initially recieved confirmation that their order was on its way and now it has been suddenly cancelled.
This is called rollback or as the community has come to call it "desync".
This is neat information and all, but is there any practical use for this? Absolutely. I was thinking of calling this guide "How to Spend Efficiently in BDM", and conclude it is significantly more efficient to move to California or Paris than it is to throw money at loot boxes.
All jokes aside, instability in your connection is not always a result of being far away from your datacenter. It can be a number of things from having a bad ISP, bad internal networking, bad routing, etc. Once you know you have an unstable connection, you can try reaching out to your ISP to see if there is anything on their end. You could try using a VPN to bypass any throttling that your network administrator might be levying on your (common for public internet like universities/colleges or even ISP). If you were planning on switching to a new ISP, this might be good justification to try someone else.
And above all that, maybe you learned something new today.