Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ideas for strafing #7

Closed
B1adedriver opened this issue Feb 24, 2023 · 11 comments · Fixed by #8
Closed

Ideas for strafing #7

B1adedriver opened this issue Feb 24, 2023 · 11 comments · Fixed by #8

Comments

@B1adedriver
Copy link

Hey, just tried out the new update, its working great on my PB. The game window is much larger and more visible. The number switcher is also a smart addition.
I was thinking it would be cool if you used the physical buttons for strafing, but that might be too difficult to use. I wanna integrate the physically buttons in some way lol. You could try adding 2 extra strafing buttons on the right side above the ctrl button. That might make it more fluid to move and shoot.

@imustafin imustafin mentioned this issue Feb 25, 2023
@imustafin
Copy link
Owner

I agree that we should utilize physical buttons somehow. Given it is harder to press them, I think they can be only used for rare and specific interactions. Maybe ESC for menu/pause or M for map. Anyway, on different devices physical buttons can be placed differently (bottom or right sides).

Do you think that strafe buttons should be near the fire button? This way it can be hard to strafe and shoot, but maybe very easy to walk and strafe.

Do you know any other FPS games with touch controls? Maybe we can borrow good control schemes from them.

We could make a joystick-like control, but I guess it would not be that different from what we have now (arrows cross).

Still, nothings stops us from experimenting. Here is a version with strafe buttons on top of ctrl Download. What do you think?

@B1adedriver
Copy link
Author

B1adedriver commented Feb 27, 2023

The way I ended up using the strafe buttons was navigating rooms. I don't think they can work for running and gunning, because combat is limited to tank controls at the moment. Strafing buttons on the left side seems like they would overload the left thumb, leaving the right thumb with only the task of shooting.

Most mobile shooters use a virtual joystick. It's better than the 4 button d-pad layout because it would allow 360 degrees of motion, making movement more fluid. If on the left side we had a virtual joystick for movement, and on the right side two buttons for looking left and right, that would eliminate the need for dedicated strafing buttons, streamlining movement a lot.

PUBG mobile allows you to use the entire left side of the screen as a joystick, with wherever you placed your thumb last acting as the center-point. I don't know how feasible this would be to implement, but I thought it was worth sharing. Imagine this: the game window is rotated 90 degrees utilizing the whole screen, movement is handled by a virtual (and invisible) joystick, while the physical backwards and forwards buttons handle looking left and right, and home/menu handle interaction and shooting. That's my rough idea for the ideal control scheme lol.

@imustafin
Copy link
Owner

I see. I will get working on the joystick stuff then 👍 . Should be pretty straightforward.

Just to confirm, do you propose these things?

  • Virtual joystick for movement (strafing, not rotating) on the left
  • Look Left and Look Right buttons on the right
  • Fire/Use buttons also on the left

In theory we could also add a joystick on the left for looking left/right. Might be even close to vanilla gaming as if you were playing with a joystick (strafe button always pressed) and a mouse (aiming and shooting).

The right side in this case (in theory) can work as a regular laptop touchpad. You can touch-hold-move for looking and touch-release-touch-move to constantly shoot while still being able to look around.

If this touchpad control scheme works well, physical buttons will be free for other uses.

@B1adedriver
Copy link
Author

I think the joystick and the use button should be on the left, while the rotation controls and fire button should be on the right. Also a rotation joystick is a good idea!

@imustafin
Copy link
Owner

I did some experiments with joystick for strafing, download here. What do you think?

It seems that vanilla Doom does not give us much speed control. If you push joystick forward even lightly, you go forward full speed (as if the forward button was pressed) and so on for the other directions.

In this version I did some cheating and made joystick controls to be aware of how much actually you pushed the joystick. So, pushing it slightly will accelerate you slightly.

Full speed was too fast, and not really suitable for a virtual joystick.

However, it still feels very unnatural to me. I guess this is because in Doom we don't accelerate immediately but build up speed gradually.

I guess in other mobile games you (almost) immediately gain the speed equal to how far you pushed the joystick.

I think we should check what other Doom ports do in terms of joystick controls. We can reference both touch controls (mobile games) and computer/console games with gamepad support.

@B1adedriver
Copy link
Author

It's definitely a move in the right direction. I think the joystick feels pretty natural with the hack you did. Switching to sprinting/running after a certain threshold from the center-point might be a good way to add running without an additional button. I'll look into mobile Doom ports and see what they do. Maybe we should try a fixed joystick too.

@B1adedriver
Copy link
Author

I just tried Freedoom and watched a video about Delta Touch, both are android ports of GZDoom. Freedoom uses 2 invisible joysticks on either side of the screen, while Delta Touch uses fixed joysticks.
I'm leaning more towards fixed joysticks, as they let you start at top speed by pressing the edge of the touch zone.

@imustafin
Copy link
Owner

Finally got time to try implementing these fixed joysticks (both for movement and turning). Download here.

Movement joystick is now a fixed circle but you still can start moving when pressing outside the circle.

Turn panel is not calibrated yet but I think it still shows how it can work.

I think fixed joysticks are a bit better indeed for playing on devices bigger than a phone. This is closer to the fixed d-pad that we had before but more convenient.

What do you think?

@B1adedriver
Copy link
Author

Hey, sorry for the late response. I think this version of the joystick is better, I feel like I get finer and quicker control of the movement, definitely an improvement.

I like the turn panel as well, very cool analog slider idea. However, one problem I noticed is that it's not adjusted to my screen size, making it overlap with the other UI.

scr0007

@imustafin
Copy link
Owner

Hi. I've fixed the overlapping issue. Download here

Looking at the fixed joysticks again (after some time has passed), I again agree with you that fixed joysticks work better with practice.

I think we can make a new release with these improvements. In future we might add sensitivity/dead-zone configurations for this.

@imustafin
Copy link
Owner

I released this as v0.0.5. Thanks again for the fruitful discussions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants