"twin stick" shooting experiment

For works-in-progress. This is the place to upload things that aren't done yet, or tech demos of specific systems or technologies.
Forum rules
This is the only download category to upload works in progress of your application or game.
Post Reply
User avatar
desertfish
Posts: 1041
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

"twin stick" shooting experiment

Post by desertfish »

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
Attachments
tank.zip
(5.87 KiB) Downloaded 42 times
DragWx
Posts: 313
Joined: Tue Mar 07, 2023 9:07 pm

Re: "twin stick" shooting experiment

Post by DragWx »

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.
Edmond D
Posts: 463
Joined: Thu Aug 19, 2021 1:42 am

Re: "twin stick" shooting experiment

Post by Edmond D »

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?
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.

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.
mortarm
Posts: 238
Joined: Tue May 16, 2023 6:21 pm

Re: "twin stick" shooting experiment

Post by mortarm »

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.
User avatar
desertfish
Posts: 1041
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Re: "twin stick" shooting experiment

Post by desertfish »

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
DragWx
Posts: 313
Joined: Tue Mar 07, 2023 9:07 pm

Re: "twin stick" shooting experiment

Post by DragWx »

I imagine the actual game engine would use key-down and key-up events instead of character input events, which would allow diagonals.
Post Reply