Using Keymaps in GameSalad Creator
This feature, gamepad controller support for Android, Kindle, FireTV, and Mac desktop games, is currently available in the 0.13.6 release for the Mac version of Creator and will not be available for Windows users until release 0.14.0.
If you open up a scene and look under attributes you’ll see that some new attributes have been added: “Player Type” and eight “Player {x} Keymap” attributes.
“Player Type” has two choices available for you to choose from: Single Player and Multiplayer. If Single Player is chosen, every controller input will be funneled through Player 1.
If Multiplayer is chosen, each controller that you connect will be assigned to the first available Player that doesn’t yet have a controller.
In each of the Keymaps you will see text attributes for each button that is on the controllers. You can edit these keymaps (they don’t have default values) to assign different keys on your keyboard to perform the actions that the controller would do.
(double click in the red area to edit the attributes)
The strings for the keys are the same strings that are used in the keyboard event.
Looking under the “Devices” tab you will now see that a “Players” dropdown has been added.
This holds information on the controllers that are connected for each player as well as booleans for all of the buttons that controller has.
Notes: The left and right triggers are set to -1 by default (not being pressed). They change to “0” when pressed down halfway and change to “1” when pressed all the way down.
Left and right stick X change to “-1” when pushed to the left and change to “1” when pushed to the right. Left and right stick y change to “-1” when pushed up and change to “1” when pushed down.
Currently Supported Devices
Mac Desktop/Creator Preview
- XBOX 360 Wireless and Wired gamepads
- XBOX One gamepad (USB only)
- PS2 Dualshock 2 (with the HVG@ USB adapter only)
- PS3 Dualshock 3
- PS4 Dualshock 4
- Steelseries Free
- Steelseries 3GC (Red Mode recommended)
- Logitech F310 (Both Modes)
- Logitech Dual Action
- Game Elements Recoil
- Gtron Retro USB Super Classic Controller
- Steam Controller (GamePad Configuration)
Fire TV / Kindle / Android:
- Fire TV Remote,
- Fire TV Gamepad,
- XBOX 360 Wireless and Wired gamepads
- PS4 Dualshock 4
- Steelseries Free
- OUYA Gamepad
- Logitech F310 (X Mode)
- Game Elements Recoil
- NYKO Playpad Pro
- Any gamepad made for Android (Android version 4.1 or higher!)
Additional useful notes
When submitting a game to Amazon the app can be for all devices (when publishing use the Kindle target), not just Fire TV, so make sure the splash screen is in the right orientation and that it works for both the Fire TV and smaller devices.
When using the Multiplayer player type, the Fire TV remote will be pushed down the player list as gamepads are connected. If you do not want to support the Fire TV remote, uncheck the Fire TV remote support option in publishing and the Fire TV remote will never be assigned to a player.
Player type can be set at runtime. Setting it to “1” will make it single player and setting it to “0” will make it multiplayer.
If you’re not using a Fire TV remote or gamepad, make sure the gamepad you’re using actually works in the Fire TV UI. Because if it doesn’t work there, it’s probably not going to work in a GameSalad app either.
Use the command “adb kill-server” to stop the adb server from listening over USB and use the command “adb connect IP address of the Fire TV box” to have adb start listening over tcp/ip. (More information on Android Debug Bridge here: http://developer.android.com/tools/help/adb.html)
Useful links
Tips for publishing to Fire TV from Amazon