gamepad-quicktest

command module
v0.0.0-...-dfade71 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

gamepad-quicktest

Very basic program to test a gamepad with Ebitengine (v2.5.0 or higher required):

go run github.com/tinne26/gamepad-quicktest@latest

Interactive web version also available at tinne26.github.io/gamepad-quicktest.

Sample visual output:

(Notice that the official example on ebiten/examples/gamepad is also very complete and you can test it interactively too)

Platform differences

Notice that the behavior for gamepads can vary quite a lot between platforms and different browsers:

  • Buttons with an analog response may be detected as binary buttons on some platforms or as axes on others. This is common with the bottom triggers on the front face of the controllers (also known as R2/L2, ZR/ZL, RT/LT... and many other names). Be aware of this, it can cause some problems. Notice also that the threshold for deciding if an analog trigger is pressed or not is fairly arbitrary. Ebitengine uses a threshold of approximately 0.12.
  • Vibration support is still fairly limited on Ebitengine, but also on many browsers. Chrome seems to do quite well. If vibration doesn't work for your gamepad on one browser... try another. In my experience, Firefox is not great on this front.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址