My Street Fighter V Matchmaking API Analysis

Hi,

I’m a computer programmer living in Australia; i get a lot of bad quality connections despite having a 100/40MB down/up connection with a quality ISP.
I decided to investigate Capcoms matchmaking; i was hoping to make an overlay for the game that would give detailed stats on connection quality.

I opened a packet inspection tool called Fiddler and set it to analyse the network traffic from SFV. Connections between players are encrypted, but api calls to the matchmaking service are not.

The matchmaking goes through the following process:

  1. Get potential match candidates. The matchmaking server will return between 1 and 3 potential opponents.
  2. Get quality of connection with all three candidates. The game spends about 10 seconds sending requests to the 3 players. The ping of all three is sent back to the server.
  3. The lowest ping candidate that is still looking for a match is returned. This where UI prompts user to press start if Ask is turned on.
  4. Another quality check is made to show the connection quality bars on the Ask dialog.

Here’s an example of the data sent to the matchmaking server for all 3 candidates:
qoslevel=4&usercandidates=685801,130,0,1359991,119,0,2376599,117,0

qoslevel=4 is my match filter criteria of 4-5 bars.
usercandidates is showing the results of all 3 candidates; i.e. user id, their ping, and if they need a server to host the match instead of peer to peer.
These 3 players have pings of 130ms, 117ms, and 119ms :frowning:

Here are my observations:

  • setting the match filter to “4-5 bars” was returning candidates with very high ping. I was seeing players with 100-166ms (south east asia) and even players around 210ms (Hawaii, west coast US).
  • while the server was returning these kind of candidates, it was only requesting games from players with at most 50-60ms (e.g. opposite coast of Australia).
  • the in-game bars report anyone under 50ms as 5 bar connections. 4 bar is around 50ms - 80ms. I get a lot of connections that fluctuate between the two.
  • If you do the math, 50ms is 3 frames. I recall reading that Capcom’s Kagemusha rollback engine and sfv were built around this 3 frame number.
  • Setting the match filter to “5 bars only” was only returning candidates in the 25-47ms range (players on the same coast of Australia).
  • In other api requests you can see that Capcom has the longitute and latitude of each player.
  • I believe that the matchmaking server is filtering based on player location when you select “5 bar only”. If you pick anything else you will get players from other continents.
  • I see a lot of failed matchmaking when i have “5 bars only” set. I believe this is because these players have the “Ask” option turned off i.e. they are accepting games very quickly.
  • Capcom are only reporting on ping for connection quality. Other factors such as Packet-loss, Jitter, wifi/wired, up/down speed are not considered.
  • As the IP addresses of other players are encrypted i can’t run my own connection quality check in a custom overlay :frowning:

My recommendations:

  • Always set matchmaking to “5 bar only”.
  • Don’t select the “Ask” filter if you don’t have many players in your region.
  • Complain to Capcom loudly.

Fun fact:

  • there is a parameter in one of the pre-match api calls for “V-Skill version”. I think Capcom planned to have 2 v-skills per character at one stage but dropped the feature due to time.

Here are my notes on what each api request is. Would be interesting to see reports from players in other regions.

POST /sfv/match/matching/matchcandidates —> returns 3 candidates

4 SSL Tunnel requests are made.

POST /sfv/match/qostestreport/save —> reports quality of service stats of all 3 candidate players to matchmaking server. QOS seems to happen over 10 seconds.

QOS post parameters:
p1pidx=112539&p2pidx=2300778&p1pubip=6958&p2pubip=32&p1prvip=0&p2prvip=0&p1nattype=0&p2nattype=0&qosresult=0&pingtime=50&testtime=636653519850930000&testresult=9683
my player id, their player id. qosresult=successful test?, ping=50ms, testtime & testresult are a unique id of this matchmaking queues results.

POST /sfv/match/matching/askformatch —> ask for a candidate from the 3. Will return failed if none are still available. Sends the minimum QOS bars eg. 4 bar and ping results for all 3 candidates.

When asking for 4-5 bars, seems to limit you to sub 50ms connections.
When asking for 5 bar only seems to have much more limited candidates; i.e. is probably filtering by region. Ping is averaging around 25-32ms. 5 bar only seems to return a lot of failed (i.e. accepted another game)

GET /sfv/match/matching/checkmatch —> candidate returned. This where UI prompts user to press start if Ask is turned on

SSL tunnel request is made to return Connections Bars. i.e. 202 bytes sent and 107 bytes received is QOS check.

POST /sfv/match/matching/statusupdate —> update player status as having accepted match

POST /sfv/user/presence/4 —> update player status as entering match

GET /sfv/match/prebattleplayerinfo/2300778,112539 —> get full profiles of both players for VS screen. Includes which vtrigger and vskill (!!!) version the user players have selected.

POST /sfv/match/matchingrequest/enqueue —> confirm that player hasn’t dropped out; done between vs screen and match start

POST /sfv/match/disconnect/p2p —> at end of match report that they did not rage quit. Also reports whether they won or lost. i.e. both players report results to ensure no cheating.

GET /sfv/myinfo/162847 —> after each round, doesn’t appear to return anything useful

POST /sfv/match/matchingresult/post —> send match result; returns player stats for post-match menu

POST /sfv/match/matchingrequest/enqueue —> confirm that player hasn’t dropped out at rematch screen

3 Likes