Table of Contents

Joystick inputs

Orx supports up to 16 joysticks or gamepad devices.

Joystick buttons

Here's the list of the available joystick buttons for the input config system (replace the * with the ID of the joystick you want to use, a number between 1 and 16):

There are also special re-mapped named buttons to suit just about every controller:

Joystick axes

Here's the list of the available joystick axes for the input config system (replace the * with the ID of the joystick you want to use, a number between 1 and 16):

Each is a axis. For example: JOY_LX_1 is the left/right of the left analog stick on controller 1, while JOY_LY_1 is the up/down axis of the same stick on controller 1.

JOY_RX_1 and JOY_RY_1 will be the left/right, up/down of the right stick on controller 1.

Each controller will implement its layout differently. But Orx makes use of the SDL_GameControllerDB community database internally to make the mapping consistent for all controllers playing your game

To allow the user to customise mapping, it is helpful to consider providing remapping in your game.

Triggers

Triggers are technically an axis as well. They are read as a range of values rather than on/off like a button. These are available on newer console controllers like the Xbox 360 or PS4:

Joystick half-axes

Here's the list of the available joystick half axes for the input config system which allow you to easily use the axis like an 8-way old school joystick (replace the * with the ID of the joystick you want to use, a number between 1 and 16):