This might be more a game question then a programming question but I am mostly interested in the implementation.
I'm currently working on a game (times almost up :o ) and I want to be able to switch weapons while using a one button joystick.
I had considered making the player go somewhere (the weapon switch machine) to change weapons but the backtracking seems like it would be a problem.
I could choose to reach over the keyboard to change weapon but I gather some people don't like doing this.
I'm sure some games used the button and then a direction together but I don't really want to do that.
Would holding down the button until you got the weapon you wanted and release to shoot be effective or would this be annoying?
Quote from: awergh on 11:56, 29 October 18
This might be more a game question then a programming question but I am mostly interested in the implementation.
I'm currently working on a game (times almost up :o ) and I want to be able to switch weapons while using a one button joystick.
I had considered making the player go somewhere (the weapon switch machine) to change weapons but the backtracking seems like it would be a problem.
I could choose to reach over the keyboard to change weapon but I gather some people don't like doing this.
I'm sure some games used the button and then a direction together but I don't really want to do that.
Would holding down the button until you got the weapon you wanted and release to shoot be effective or would this be annoying?
I don't recall having a problem with it in Zynaps.
Quote from: AMSDOS on 09:39, 30 October 18
I don't recall having a problem with it in Zynaps.
Was a pain. One couldn't fire.
Better: Use a 2 button joystick. Button 2 changes the weapon.
A one button solution is always going to be a compromise (there's a reason modern controllers have so many buttons) - what works best will tend to depend on the type of game. For a frantic shooter having to hold down a button can be awkward because you can't shoot in the mean time. Similarly fire and a direction can be a pain if you end up switching weapons when you mean to move.
Using a keyboard key can be irritating on a real machine, but if it can be mapped to fire 2 as well it isn't so bad. And emulators may be able to map additional controller buttons to other keys. Or you can follow some of the GX conversions and map extra controls onto joystick 2.
Best strategy is to playtest options till you find something that works best for your game.
As I already have rebindable controls I have decided I will let the user choose what they want.
If they want the same key for shoot and change weapon it will cycle through them and they will have to manage any additional difficulty.
In Dawn of Kernel you can use down, down to change weapon and down + fire to use the secondary weapon (that is used occasionally).
I didn't have many complaints, but it probably works better with a gamepad than a joystick.
Two button joysticks are great, but not that common in my experience.
If somebody wants a 2 button joystick and both buttons make one 'fire 1' you can send me that joystick and I fix it - for postage money. I did that here to lot (I mean 2) joysticks already. ;)
As @andycadley (http://www.cpcwiki.eu/forum/index.php?action=profile;u=327) implied, it's certainly down to the type of game, really. Without knowing how you use the controls for the rest of the time it's hard to say whether it's bad or not...
Quote from: Gryzor on 10:04, 01 November 18
As @andycadley (http://www.cpcwiki.eu/forum/index.php?action=profile;u=327) implied, it's certainly down to the type of game, really. Without knowing how you use the controls for the rest of the time it's hard to say whether it's bad or not...
I think your right as it really depends on the game but I also think its the sort of thing I should have worked out before I started rather then thinking about it at the last minute.
Ultimately the game sortof works with a single button joystick but not really so its best to use a 2 button joystick or use the keyboard to switch weapons.