Of Mice and Joysticks

The Prologue

Ah yes, the prologue. There has been a bit of tweeting about the old 8-bit joysticks recently.
 
Steve Turner was working on the Spectrum, so there was always a Kempston joystick close by. Playing on the keyboard was coded as an option, but hitting keys too hard might upset the carefully balanced RAM pack at the back and cause the machine to crash.
 
I have a couple of Arcade Pro joysticks which survived the onslaught of my games testing days. There were many others that perished along the way. What with playing Sheep in Space during my lunch hours and the hours spent testing the various control modes, plus the slamming down of the joystick when it all goes horribly wrong, there were always bits being thrown away. I'd have to say that the bigger and more complex the joystick, the less time it would last. We would often have to go to the local computer shop and get an emergency replacement.
 
Despite some joysticks having two buttons, they were wired to the same line so the computer couldn't tell which was pressed. We both found this extremely limiting to our control modes. Arcade games had 2, 3, maybe even 5 or 6 buttons, and we had 1. That meant that we had to code complex control modes to make different things happen when you held down the button for longer. For example, Gribbly can switch the power lines on or off, Paradroid can activate lifts, consoles and the transfer spark with a button hold. All that takes away the immediacy of just pressing a different button.
 

Dragon 32 Joysticks 

Interestingly, the humble Dragon 32 had an analogue variable joystick, allowing faster or slower movement. This provided a lot of extra control, especially for my graphics editor. The only downside was that the call to poll the stick could take about a quarter of a frame to work out where the joystick was positioned. It took longer to read right and down, but could read up and left very quickly. Who does that? Time is of the essence, people!
 
I once had to open up a Dragon 32 joystick and effect repairs. There were a lot of wires in there and I needed to re-solder some. They were all different colours. Now I'm brown/green colour blind, so in order to ensure I got it right I asked Steve, not Turner, whether I'd got the orangey/redy/greeny/browny wires right and he said it looked OK to him. Put it all back together and tried it out - no joy. Turns out Steve, not Turner, is even more colour blind than I am, virtually just seeing in grey shades. He knew that, but didn't raise it as an issue when I asked him to check the colours. So I unsoldered the brown wire from the green wire and fixed it all up again, got someone else to check it, and all was well.
 

In the Arcades

Now I never could cope fully with Asteroids nor Defender, both usually 5+ button games. I tended to forget about the hyperspace button. I'd seldom get a finger to the button in time, and even if I did, the game can randomly blow you up anyway. Of course as a last ditch action that's a chance worth taking, but I was busy trying to shoot my way out of trouble. I liked the 2 button games, like Slapshot, Terra Cresta, and Flying Shark.
 

2 Buttons are Nice.

You could put a function on each button, and do more with holding buttons or maybe pressing both at once. With 1 button you can also hold that down and then move the joystick to activate a different function, but 2 is easier. We were therefore even more disappointed when the 16-bit machines came along, and they too had single-button joysticks. The mouse had 2 buttons, and the new concept of the double-click would be along soon, but why did we still only get 1 button joysticks? The plug has 7 pins, so you'd think that power plus 6 switches is possible. That's all 4 directions and 2 buttons. 2, I say! Ooh yes, missus. So why didn't we get 2-button joysticks, chaps?
 

Then There's the Mice

Now nice analogue mice are great for pointing controls. The best example was probably Lemmings. I didn't get the game at first but after a week I was addicted. A pointer is just what you need, and a mouse drives that perfectly. There was an early 3D game called Virus, but I found that difficult to control. One wrong move and the ship would flip over. Your basic mouse has a fundamental flaw in that it is restricted by the amount of space it has to move on your desk. If you have to pick it up and move it back to the middle of your mouse mat, you're compromised. I did put mouse control in as an option on Uridium 2. That was because in 2 player simultaneous mode you need 2 input devices, and no-one's going to unplug their mouse. Only as a last resort would I expect anyone to try that. The 2-player co-operative mode is probably a little-used feature,
 

Along came the CD32

When the Amiga CD32 came along I did program in the 4-button controller that came with it as an option. Fire and Ice uses it, and I believe I coded an extra jump button if you wanted to use it, plus a snow-bomb fire button as well as the main fire button. The ill-fated Uridium 2 CD32 version also was getting a 4-button controller mode, but it was never completed. That game had a simpler control mode anyway.
 

PSX

When the PlayStation nee PSX arrived, it had a controller with more buttons than one really needed, including shoulder buttons and the now ubiquitous ABXY button cluster. That does allow us to code multiple ways of controlling the game. I think that's better than either using all of the buttons for specific purposes or coding in user-assignable keys.
 
The controller is a two-handed device, so since they don't put half the buttons on the left and half on the right, you're stuck with it the way it is. I'm left-handed but since left-handed devices are few and far between and expensive I've learned to use them right-handed. I've always thought that left-handed guitars look odd. If you play left-handed you can't borrow someone else's guitar.
 
Just while I'm on the subject, I went canoeing about 30 years ago and they dished out double-ended paddles. I got a left-handed one. Now my hands aren't on upside-down or anything, I just lead off with left, so why is one paddle rotated 180 degrees out from a right-handed paddle? I'm performing the same operation as the righties so why don't I get the same kit? I think they were "extracting the Michael". If you swap the ends over you get the same effect, right? That's a 30-year trauma I didn't need. I digress.
 
Back to the game controllers. I spend a lot of game development time getting the control mode right. I used to read that people deliberately mapped multiple fire functions onto one button to get higher fire rates. That's tantamount to cheating. It levels the playing field if the equipment is set up the same for everybody.  
 

PC

The Xbox One and 360 controllers have a plethora of buttons, and some analogue thumb-sticks and triggers. The wired controllers work on the PC (presumably the unwired ones do too) and I've written my API to get the inputs to the game from the XInput API. It didn't take too much code actually, they had the library calls down to a minimum, but you still need to get a digital version of the analogue inputs, and you need to know both whether a button is pressed now; or was just pressed down (and just released is good too, Uridium fires on button down and up!). You also need to watch out for a controller getting disconnected.
 
I intend to use the Xbox controllers as my input devices for any future PC games. They cost under a tenner and surely every PC games player has one or two of them? I might go with a couple of preset configurations, but believe me when I say that the control mode is integral to the game and I will figure out the best way to control it. I like the idea of the rumblers in there too and look forward to figuring out how best to use them.
 
The keyboard is just a bit too awkward, they always are. I was trying to play, well anything really, on my laptop and my fingers end up tripping over each other. There always used to be a problem with ghosting, if you hold down too many keys at once the driver can't figure out what you've pressed. The ctrl and alt keys are independent and need to be used a lot. Pity they put the almighty Windows key in between them. Like having a hand-grenade tucked in between your pineapples. Nobody likes that.
 
I am aware that mobile games use a lot less controls, so if a game idea springs to mind for a mobile game I probably won't do a PC version. I have seen some very simple one button games that do amazingly well.
 

With a nod and a wink to Frankie Howard, yes indeed.