2
0

intro.bbdoc 1.3 KB

123456789101112131415
  1. Provides support for handling game controllers and for mapping joysticks to game controller semantics.
  2. #TSDLGameController is an abstraction for gamepads ("controllers") similar to the xbox360-pad: They have a DPAD, two analog sticks,
  3. 4 buttons on the right (often called A, B, X, Y), shoulder buttons (two of which might be axes) and 3 buttons in the middle
  4. (Start, Back and usually some kind of logo-button).
  5. This includes devices that have a similar layout, like the Playstation DualShock Controller, but different button names;
  6. #TSDLGameController uses the naming-conventions of xbox360/XInput for all supported devices, so you'll know that #ESDLGameControllerAxis.LEFTX
  7. is always the X-Axis of the left Analog Stick, or #ESDLGameControllerButton.B is always the rightmost buttons of the 4 buttons on the right,
  8. for example. This makes providing consistent input bindings (for this kind of device) to your users easy,
  9. like "press B to jump, move around with the left analog stick" - with the Joystick API (and the underlying APIs like DirectInput) it's
  10. impossible to know which SDL (or DirectInput) axis or button corresponds to which physical axis/button on the device.
  11. If you are running your game from Steam, the game controller mapping is automatically provided for your game.