Modern game controllers usually have 2 analog sticks, which allows for a type of game called "twin stick shooter".
One stick is used to move around with, while the other is used to aim independently of the movement.
I made an experiment to kinda approach this control scheme on the X16.
It uses the mouse to do the aiming combined with WSAD keyboard controls to move around with across the horizontal and vertical axes.
Try It Now!
Personally, I think it's too awkward in this form. Maybe someone can come up with a better control scheme, another type of game that does match this better, or perhaps you can even get used to it?
Here's the source code in Prog8 : https://gist.github.com/irmen/cacd8d79d ... 5135fe413b
"twin stick" shooting experiment
Forum rules
This is the only download category to upload works in progress of your application or game.
This is the only download category to upload works in progress of your application or game.
- desertfish
- Posts: 1137
- Joined: Tue Aug 25, 2020 8:27 pm
- Location: Netherlands
"twin stick" shooting experiment
- Attachments
-
tank.zip
- (5.87 KiB) Downloaded 279 times
Re: "twin stick" shooting experiment
It's not awkward at all. In fact, I was certain keyboard movement + mouse aiming was a common control scheme for 2D shooting games, twin-stick or otherwise.
I know this is just for demonstration purposes, but you would definitely want to change the mouse cursor to something more see-through, like a targetting reticle or similar.
I know this is just for demonstration purposes, but you would definitely want to change the mouse cursor to something more see-through, like a targetting reticle or similar.
Re: "twin stick" shooting experiment
It does seem to be a little awkward to me. I'd probably get use to it if there was an enjoyable game with targets to hit, rather than just a proof of concept.desertfish wrote: ↑Fri May 03, 2024 9:04 pm
Personally, I think it's too awkward in this form. Maybe someone can come up with a better control scheme, another type of game that does match this better, or perhaps you can even get used to it?
In a real tank there is a driver and a gunner, two people. Perhaps whatever is developed becomes a two player game where they work together to destroy the enemy. One player uses the mouse/gamepad and the other uses the keyboard or another gamepad.
I could see if the mouse was used in a mode where moving the mouse sets the direction of the tank. The distance of the pointer to the tank might control the speed. Clicking and holding the left button swings the turret (tank rolls to a stop perhaps), and a right click launches the round.
A simpler mode would be a left click as move to the pointer and a right click to fire to the pointer.
I did see that the shell goes to the mouse pointers direction and position, so if the pointer is over the barrel then one never sees the round.
Re: "twin stick" shooting experiment
I played a ton of FPSs back in the day, and I always used a mouse+KB, so it felt pretty natural to me. And just for S&G, I tried going diagonal using key combos like WD, AS, etc., and it worked while still aiming the turret independently.
- desertfish
- Posts: 1137
- Joined: Tue Aug 25, 2020 8:27 pm
- Location: Netherlands
Re: "twin stick" shooting experiment
Weird, how could you go diagonally? On my system if I press 2 keys at the same time, only 1 of them starts repeating so I get for example W+D: wdddddddddddddddddddddd
Re: "twin stick" shooting experiment
I imagine the actual game engine would use key-down and key-up events instead of character input events, which would allow diagonals.