If you looked at the ZakStunts shoutbox on the ZCT258 deadline day, you may have noticed that @Erik Barros , @Overdrijf and me have been doing a few test with playing Stunts on alternative controllers. I'll open this thread with a report on using a Xbox 360 controller.
Setting it up
First, here is how I (with some help from Erik) have set up the controller on DOSBox. I'm currently using DOSBox Staging 0.80.1 on Linux. The operating system shouldn't matter much; however, DOSBox Staging has improved support for controllers, including the ability to have more than two analog axes recognised as such (see the 0.75.1 release notes).
With the default configuration, DOSBox Staging will map the x and y analog axes (steering and accelerator/brakes) to the left analog stick, and joystick buttons 1 and 2 (shift up and down) to Xbox buttons A and B. While that is reasonably faithful to what you'd get with the kind of joystick originally supported by Stunts, it is also suboptimal in that it is not very comfortable to have steering, accelerator and brakes on a single analog stick, specially given the wealth of options offered by the Xbox controller:

Xbox 360 controller diagram. Source: https://github.com/dosbox-staging/dosbox-staging/wiki/Keymapper
Changes to the controller layout are done through the DOSBox mapper, available by pressing Ctrl + F1 in DOSBox. DOSBox Staging, allows you to remap the controller however you like, removing some limitations found with plain DOSBox (please reply if you run into difficulties with that!). My favourite mapping so far, which should work with no further configuration in both plain DOSBox and Staging, is a hybrid one: accelerator and brakes on buttons (as analog makes no difference for them), and steering on the left stick:
With the mapping done, select joystick input in the Stunts option menu, and perform the in-game calibration as usual.
Compared to the standard Stunts input devices, this hybrid setup is rather like an improved version of mouse controls (steering on x axis, accelerator and brakes on the buttons), free of the jerkiness that makes using the mouse so unwieldy.
Test drive
A natural thing to ask about using analog controllers in Stunts is whether the input is actually analog. After all, replay files store input in a digital format, a direct transcription of keyboard key presses. In the case of accelerator and brake input, there is indeed nothing analog about the input, even if you map an analog stick or trigger to the joystick y axis. As for steering, however, Stunts has a trick up its sleeve. In joystick mode, steering without moving the analog stick all the way left or right will keep the car wheel in an intermediate position as well. The game achieves that by sending key presses in the appropriate rhythm to keep the wheel roughly at the same place. That is demonstrated in the attached JOYTEST5.RPL, in which I spent more than a minute moving in circles, with the LM002 wheel held at one fifth of the way left.
What about actual driving, though? Though effective driving with non-keyboard controls will surely take a lot of getting used to, the first impression was far better than expected. After some warming up and acclimatising, for instance, I got the attached XBOX4.RPL: Default, Indy, classic line, 1:07.40. Slower than on keyboard, but a very normal lap, all things considered -- and the potential to improve is certainly there.
One difference between joystick and keyboard steering in Stunts is that with the joystick mode the movement range of the car wheel is only about half of what we get with a keyboard, presumably so that the analog steering wouldn't become too sensitive. That will probably mean a disadvantage in full powergear tracks and other scenarios which require extreme sliding tricks. On the other hand, I expect that it will be possible to put analog steering to good use in different situations, specially in OWOOT + NoRH driving.
(A practical detail worth mentioning: there seems to be a minor Stunts bug such that accelerating with joystick controls doesn't interrupt the leaving-the-truck animation. One way of skipping it without losing any time is holding the accelerator and then pressing shift down.)
Space and Enter
On a final note, these experiments made me think of a (perhaps obvious) hypothesis for why the keyboard controls have two pairs of keys for shifting (A/Z and Space/Enter). It sounds plausible that A/Z were originally meant as the "proper" shifting keys. However, as the two joystick buttons must handle both shifting and menu confirmation, it makes sense for a joystick button press to be translated to both. Given a reversible mapping, we'd end up with Enter (and Space) playing both roles on keyboard as well.
Setting it up
First, here is how I (with some help from Erik) have set up the controller on DOSBox. I'm currently using DOSBox Staging 0.80.1 on Linux. The operating system shouldn't matter much; however, DOSBox Staging has improved support for controllers, including the ability to have more than two analog axes recognised as such (see the 0.75.1 release notes).
With the default configuration, DOSBox Staging will map the x and y analog axes (steering and accelerator/brakes) to the left analog stick, and joystick buttons 1 and 2 (shift up and down) to Xbox buttons A and B. While that is reasonably faithful to what you'd get with the kind of joystick originally supported by Stunts, it is also suboptimal in that it is not very comfortable to have steering, accelerator and brakes on a single analog stick, specially given the wealth of options offered by the Xbox controller:

Xbox 360 controller diagram. Source: https://github.com/dosbox-staging/dosbox-staging/wiki/Keymapper
Changes to the controller layout are done through the DOSBox mapper, available by pressing Ctrl + F1 in DOSBox. DOSBox Staging, allows you to remap the controller however you like, removing some limitations found with plain DOSBox (please reply if you run into difficulties with that!). My favourite mapping so far, which should work with no further configuration in both plain DOSBox and Staging, is a hybrid one: accelerator and brakes on buttons (as analog makes no difference for them), and steering on the left stick:
- Joystick axis x-/+ (steering): left stick x-/+
- Joystick axis y- (accelerator): A button
- Joystick axis y+ (brakes): X button
- Joystick button 1 (shift up): RB bumper
- Joystick button 2 (shift down): LB bumper
- Esc key (menu): Start button, or Y button
With the mapping done, select joystick input in the Stunts option menu, and perform the in-game calibration as usual.
Compared to the standard Stunts input devices, this hybrid setup is rather like an improved version of mouse controls (steering on x axis, accelerator and brakes on the buttons), free of the jerkiness that makes using the mouse so unwieldy.
Test drive
A natural thing to ask about using analog controllers in Stunts is whether the input is actually analog. After all, replay files store input in a digital format, a direct transcription of keyboard key presses. In the case of accelerator and brake input, there is indeed nothing analog about the input, even if you map an analog stick or trigger to the joystick y axis. As for steering, however, Stunts has a trick up its sleeve. In joystick mode, steering without moving the analog stick all the way left or right will keep the car wheel in an intermediate position as well. The game achieves that by sending key presses in the appropriate rhythm to keep the wheel roughly at the same place. That is demonstrated in the attached JOYTEST5.RPL, in which I spent more than a minute moving in circles, with the LM002 wheel held at one fifth of the way left.
What about actual driving, though? Though effective driving with non-keyboard controls will surely take a lot of getting used to, the first impression was far better than expected. After some warming up and acclimatising, for instance, I got the attached XBOX4.RPL: Default, Indy, classic line, 1:07.40. Slower than on keyboard, but a very normal lap, all things considered -- and the potential to improve is certainly there.
One difference between joystick and keyboard steering in Stunts is that with the joystick mode the movement range of the car wheel is only about half of what we get with a keyboard, presumably so that the analog steering wouldn't become too sensitive. That will probably mean a disadvantage in full powergear tracks and other scenarios which require extreme sliding tricks. On the other hand, I expect that it will be possible to put analog steering to good use in different situations, specially in OWOOT + NoRH driving.
(A practical detail worth mentioning: there seems to be a minor Stunts bug such that accelerating with joystick controls doesn't interrupt the leaving-the-truck animation. One way of skipping it without losing any time is holding the accelerator and then pressing shift down.)
Space and Enter
On a final note, these experiments made me think of a (perhaps obvious) hypothesis for why the keyboard controls have two pairs of keys for shifting (A/Z and Space/Enter). It sounds plausible that A/Z were originally meant as the "proper" shifting keys. However, as the two joystick buttons must handle both shifting and menu confirmation, it makes sense for a joystick button press to be translated to both. Given a reversible mapping, we'd end up with Enter (and Space) playing both roles on keyboard as well.