Tips on developing for a mobile shooter

So I’ve set up an OTS camera that works nicely, whew. I want to know the best ways of

  1. What is the best way to detect that the guy is trying to shoot w/o an explicit button? The TouchTap event isn’t as responsive as it should be. (@iRexBot @helperobc Updated!)

  2. Rotating the guy without the input from the button to walk around causing issues (GameProcessed doesn’t do this… Should I just do a bunch of math on the input?)

  3. Making sure the cursor stays in the centre of the screen - any API?

5 Likes

What does question 1 mean? I don’t get how you worded it. Explain more in-depth for me please

If you meant by how to tell if a player is shooting without using a fixed button then you could possibly tell the player to click roughly in the middle to shoot but then it’s a “fixed button”. Maybe trying if they’re dragging on the screen to move the camera possibly then the gun won’t shoot.

In my opinion the best method is just a changeable shooting button. You can resize and change the position of it. Most mobile FPS games do have this ability to customize your UI. Most of your UIs should allow users to change their size and position on the screen as a mobile screen is very big so having a 1 size fits all idea is bad. I play on a massive iPad Pro and I can tell you that UI customization is what I look for in mobile games.

Not sure about question 1.

As for question 2, not completely sure what to do about that.

As for question 3 I’m not sure if their is “mouse lock” (aka shiftlock) on mobile (guessing no.) I was going to say turn on shiftlock then just change the mouse icon, but being that it’s on mobile that may not work.

In a game I’m working on I turned the mouse invisible and just put a image in the center of the screen, it raycasts from the center of the player’s camera till it hits an object which is not the player itself then gets the distance and displays the distance next to the mage.

example Picture:

1 Like

I solved the problems myself.

  1. Touchtap wasn’t working great because of invisible UIs, now it is :ok_hand:
  2. I do math on the input to make sure its on the right hand side of the screen and that works well
  3. I just don’t have the “move cursor” code run on mobile, I just fix it to the centre of the screen.

But general tips are still appreciated!

2 Likes

I am very excited to see your mobile FPS game.

1 Like

Thank you!

Its OTS and primarily for PC, but I’m putting a lot of emphasis on Mobile and Xbawx too.

1 Like