本文へ移動
HZBench
すべての記事

ハウツー

How to test a game controller for stick drift in your browser

Stick drift shows up as a reading when the stick is not touched. A browser can measure it from the values the controller reports, and suggest a deadzone that hides it.

執筆 HZBench編集部公開:

この記事は英語のみです。

Browsers read controllers through the Gamepad API [1]. Each stick appears as two axes, and the specification requires axis values to be normalised to the range −1 to 1 [2][3]. A centred, untouched stick should read close to 0 on both axes. Drift is a reading that stays away from 0 when nobody is touching the stick.

What to measure

ReadingWhat it tells you
Largest offset at restHow far from centre the stick reports while untouched. This is the drift.
Jitter at restHow much the reading moves while untouched. A noisy stick can trigger small movements in games.
Deadzone that hides itThe smallest deadzone that would ignore the rest offset, with a safety margin.
Largest deflectionWhether the stick reaches the edge of its range when pushed fully.
Difference between directionsWhether one direction reaches less far than the others.

Step by step

  1. Connect the controller by cable or Bluetooth and press any button. To limit fingerprinting, browsers return no gamepads until they see an input from one [2].
  2. Start the stick test. Rotate the left stick slowly around its full edge twice, then the right stick.
  3. Let go of both sticks and do not touch the controller while the rest phase runs.
  4. Read the rest offset and the suggested deadzone. Save the result so you can compare it later.

How to read the result

HZBench suggests a deadzone equal to the largest rest offset plus a 10% margin. If your game's deadzone setting is at or above that value, the drift should not move your character. Range and direction differences are only shown after a full rotation; without one there is no honest way to judge the edges.

There is no universal pass mark. Compare the same controller over time: a rest offset that grows from one month to the next is more telling than any single number. HZBench does not label a controller as healthy or faulty.

What usually helps, and what to expect

  • Raise the deadzone in the game to the suggested value. It hides drift at the cost of a little precision near the centre.
  • Use the calibration option in your system or console settings if the controller offers one, then measure again.
  • Update the controller firmware through the manufacturer's app or console.
  • If the rest offset keeps growing over weeks, the stick module is wearing out. That is a repair or warranty question, and a saved history of measurements helps make the case.

What a browser cannot see

  • Readings come from what the operating system and driver report. Some drivers or launchers apply their own deadzone before the browser sees the value.
  • The standard layout covers common controllers [2]; unusual controllers may map sticks to other axes.
  • A browser cannot open the controller or tell you why it drifts.

出典

  1. [1] Gamepad API, MDN Web Docs (閲覧 )
  2. [2] Gamepad (W3C specification), W3C (閲覧 )
  3. [3] Gamepad: axes property, MDN Web Docs (閲覧 )

訂正

記事の執筆と訂正の方針誤りを報告