-
-
Notifications
You must be signed in to change notification settings - Fork 183
New Game controller system
lordloki edited this page May 29, 2018
·
6 revisions
The new Game controller system is though this way:
- If you have a game in Steam it uses the joystick mapping from Steam Big Mode.
- If you don't have the game in Steam it uses by defect the joystick mapping passed through environment variable SDL_GAMECONTROLLERCONFIG. (i.e export SDL_GAMECONTROLLERCONFIG="[the string you received from controllermap]"
- If you don't use the variable SDL_GAMECONTROLLERCONFIG, it will load the file "gamecontrollerdb.txt" from the directory release/datafiles/gamecontroller/.
- If your controller is not recognized by any of those previous methods then through an error asking for mapping pointing where you can obtain the apps for this task. Anyway, before to generate your own mapping you should try replace "gamecontrollerdb.txt" by another one more updated from https://github.com/gabomdq/SDL_GameControllerDB.
The tools for generating the mapping for the joystick (in the case that is not supported yet) are:
- Steam Big Mode joystick configuration
- Antimicro (https://github.com/AntiMicro/antimicro). Executables for Windows and Linux
- SDL2 Gamepad Tool (http://www.generalarcade.com/gamepadtool). Executables for Windows and MacOS. Linux soon.
- game controller mapping app compiled from SDL2 sources
For example, in linux you can generate a bash script to include special mappings if needed as this way:
#/bin/bash
export SDL_GAMECONTROLLERCONFIG="[the string you received from controllermap]"
exec blenderplayer name_of_main.blend