SSBM/Latency

From SuperCombo Wiki

The purpose of this page is to document all of the seperate sources of Visual or Audio Latency in the context of SSBM.

Latency refers to the period of time that separates the action of the player pushing buttons and tilting sticks on the controller, and the TV finally displaying the frame that reflects the player's inputs. Assuming ideal conditions, SSBM has approximately 3 to 4 frames of latency, or approximately 50ms to 64.67ms. These measurements vary slightly, but the core experience that competative SSBM players have come to accept as the standard falls within these parameters.

There are always several factors at play when Visual and Audio Latency is measured and calculated:

  • The TV Screen being used
    • Type of Screen
      • Cathode-Ray Tube (CRT) VS. Liquid-Crystal-Display (LCD) VS. LED/OLED/QLED
    • Interlaced VS. Progressive Scan
    • Make/Model of screen
  • Controllers
    • Brands
      • Nintendo-Brand VS. Non-Nintendo Brands
    • Wired or Wireless
  • Console and Hardware
    • GameCube/Wii/Personal Computer
    • I/O
      • Composite VS. Component A/V Cables
      • Wii Analog-To-Digital HDMI Adapter
      • Controller/Port Arduino Devices
      • Audio Connections, Devices, Adapters, and Drivers.

Links:

Kadano's Article on SSBM Input Lag on Console and Dolphin/Faster Melee: Contains technical information about various sources of Input Latency in SSBM.
Fizzi's Game-Side Latency Debugger Display: A Gecko Code developed for displaying statistics related to game-side sources of latency in SSBM.
"how to host SSBM tournaments without CRTs" by Hax$: Explains Game-side Latency in SSBM using various visualizations.

Visual Latency

Visual Latency refers specifically to the delay between a player pressing buttons on the controller, and the frame that reflects those inputs being visible (i.e. it has nothing to do with Audio).

Developer Oversights That Cause Visual Latency in SSBM

When SSBM NTSC 1.02 is played on a GameCube or a Wii, there a few different facets of the system that work in tandem to translate the inputs of the GameCube Controller to data that is displayed on the screen in distinct frames (Note: These systems are present no matter the non-console equipment used to play SSBM:

  • The Read Alarm is the protocol that interprets Controller Inputs and deems them suitable to display on the upcoming frame. The Read Alarm runs at 60 Hz.
  • The SSBM Game Engine generates frames of data to be displayed. The SSBM Game Engine runs at 60 Hz for the first 1000 frames of a match. Once the match reaches the 1001st frame, the SSBM Game Engine is slowed down to 59.94 Hz.
  • The GameCube Display Rate is the technical limitation of the speed at which the GameCube can display frames of data. The GCN Display Rate is capped at 59.94 Hz.
    • The Polling Rate is the rate at which the hardware of the GameCube pulls controller inputs, at a constant Clock Speed of 119.88 Hz, which is synchronized to the fixed GameCube Display Rate of 59.94 Hz.

There exists a discrepancy between the Clock Speeds of each of these separate systems, which can be seen as oversights by the developers of SSBM; In a perfect world, all of these systems would match their Clock Speeds 1:1, however this is not the case in vanilla SSBM. These discrepancies cause two different sources of latency: The Visual Buffer Phenomenon, and the Polling Drift Phenomenon.


Visual Buffer Phenomenon

The Visual Buffer Phenomenon is the first source of latency that is a consequence of the discrepancy in Clock Speeds of the previously mentioned systems.

In a standard match of SSBM, the SSBM Game Engine produces frames of data for the GameCube to display on the Screen via its A/V Out bus. However, the rate at which the SSBM Game Engine produces frames of data is faster than the rate at which the GameCube can display them. The ratio is 60 Hz:59.94 Hz, or 1000:999 when converted to integers.

This can be interpreted as such:

On frame 1, the SSBM Game Engine has told the GameCube to display 1.001 frames of data.
On frame 2, the SSBM Game Engine has told the GameCube to display 2.002 frames of data.
On frame 2, the SSBM Game Engine has told the GameCube to display 3.003 frames of data.
(. . .)
On frame 999, the SSBM Game Engine has told the GameCube to display 999.999 frames of data.
On frame 1000, the SSBM Game Engine has told the GameCube to display 1001.000 frames of data. <--- DE-SYNCHRONIZED

Upon reaching frame 1000, the SSBM Game Engine has produced a whole full frame of data to be displayed by the GameCube, which is not handled cleanly;

On frame 1000, the displayed frame is exactly one frame behind the SSBM Game Engine's 1001st frame, which is the actual present state of the match. 
On frame 1001 that is displayed on the GameCube is actually the 1000th frame generated by the SSBM Game Engine.
On frame 1002 that is displayed on the GameCube is actually the 1001st frame generated by the SSBM Game Engine.
On frame 1003 that is displayed on the GameCube is actually the 1002nd frame generated by the SSBM Game Engine.
On frame 1004 that is displayed on the GameCube is actually the 1003rd frame generated by the SSBM Game Engine.
(. . .)

Since the SSBM Game Engine is the part of the system that the player is actually interacting with, the player's input is now a whole frame delayed from what they are reacting to on the screen, compared to the usual latency during frames 1-999. This is what causes the added frame of latency, or 16.67 ms of latency. 1000 frames at 60 Hz equates to about 16.67 seconds, which is the time elapsed in a match before this added frame of latency becomes apparent.

It is worth noting that this discrepancy between the Clock Speeds of the SSBM Game Engine and the GameCube's Display Rate is eliminated once frame 1000 is reached; The SSBM Game Engine at this point is slowed down from 60 Hz to 59.94 Hz, which enables no extra latency to be introduced at this point from this specific discrepancy. However, this change in Clock Speed of the SSBM Game Engine results in a different source of latency, the Polling Drift Phenomenon.

Polling Drift Phenomenon

The Polling Drift Phenomenon is the second source of latency that is a consequence of the discrepancy in Clock Speeds of the previously mentioned systems. Specifically, after the Visual Buffer Phenomenon ends in the added singular frame of visual latency, and a change in the Clock Speed of the SSBM Game Engine, a new discrepancy emerges between the 60 Hz Read Alarm and the newly capped 59.94 Hz SSBM Game Engine.


Game Navigation

General
Controls & Notation
HUD
Game Mechanics
FAQ
Universal Strategy
Netplay
Glossary
Links
Metagame
Stages
Tiers
Controller Meta
Archived Information
Gecko Codes
Disc Files
Characters
Dr. Mario
Mario
Luigi
Bowser
Peach
Yoshi
Donkey Kong
Captain Falcon
Ganondorf
Falco
Fox
Ness
Ice Climbers
Kirby
Samus
Zelda
Sheik
Link
Young Link
Pichu
Pikachu
Jigglypuff
Mewtwo
Mr. Game and Watch
Marth
Roy
Non-Playable Characters
Male Wireframe
Female Wireframe
Master Hand
Crazy Hand
Giga Bowser
Sandbag