VectorStorm gamepad support

So I borrowed a couple of gamepads from various friends, and have been spending the morning fixing VectorStorm’s gamepad support, and have reached what I consider to be “stage one” support.

“Stage one” support is that the system is set up correctly to work with an XBox 360 gamepad by default, and the Preferences game mode (or menu option, in the ‘Game in a Week’ standalone games) has a ‘Gamepad’ screen where you can configure the controls onto any gamepad controls you like.  Note that your gamepad is calibrated at app startup time, so you might end up with miscalibrated joystick axes if you’re holding the joystick in a direction when the application starts up.  This initial automatic calibration step was required in order to identify ‘trigger’-type joystick axes which center at -1 or at other strange points.

“Stage two” will be coming next, which will store control mappings separately, based upon how a gamepad identifies itself to the system.  By this I mean that if your gamepad identifies itself sensibly (many do, some don’t), then VectorStorm will store that gamepad’s configuration automatically, and will then automatically recognise that particular gamepad in the future and re-load its custom configuration data.  This will make it much nicer, swapping between various gamepads.  I’m hoping that stage two will also add support for hotswapping controllers during gameplay.

I haven’t yet rebuilt any of the binary builds with this (I’ll probably wait for “Stage two” before I spend time migrating the changes around between all the various build branches),   but there should be new versions of everything, with fixed gamepad support sometime tomorrow).