Touch Resolution Limitation for a 360 deg Shooter?

0 favourites
  • 9 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • Has anyone here made a twin touch (not analogue stick) 360 shooter?

    What I mean by 360 is that the player can fire in 360 degrees i.e. any angle. Like geometry wars……

    So I am endeavouring to make a twin touch 360 Shmup

    and have come across a potential game stopper

    When making those small virtual analogue sticks we are limited by the resolution of the touch screen / digitiser.

    The virtual throw of the stick is measured in touch screen “pixels” and has to be reasonably small. In my case I think the xy throw is around +-30 x/y

    As angles can only be calculated to the touch resolution. The small resolution of the virtual analogue stick severely limits the number of angles a gun can be pointed in.

    It becomes especially visually apparent when dealing with lasers which is what I have seen in my game

    i.e. it is actually impossible to have aiming in full 360 degrees.

    It is more like you can only fire at 10, 20, 30, 40 degrees etc but not in between these angles.

    So you basically cannot aim properly in 360 degrees if you use touch.

    I’m at work now but will try to put a capx up later to demo

    to visualise if you can imagine a touch stick where the xy throw is only +- 2 pixels x/y

    you will have a 4x4 grid with 0, 0 in the middle

    if you set a circular max throw at 2 i.e. sqrt(x^2+y^2)<2

    then you can only have 8 potential angles that you can fire in.

    which are defined as

    (2,0) [0 deg], (1,1) [45 deg], (0,2) [90 deg], (-1,1) [135 deg], (-2,0) [180 deg], (-1,-1) [225 deg], (0,-2) [270 deg], (1,-1) [315 deg]

    Even if you move your thumb on the screen perfectly smoothly these are the only angles you can fire at.

    Is there any way around this limitation or has anyone tried a 360 shooter on touch any ideas you could throw my way?

  • Do you need the stick?

    Here is my 360 shooter with CAPX:

    https://www.scirra.com/tutorials/9438/make-your-own-spinning-turret-shooting-game-includes-capx

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks

    lamar

    I have both sticks working, left for moving and right for aiming.

    Its just that aiming one is jumping between angles of around 10 deg due (I think) to the low resolution of touch sensors over the small touch stick area. All it is doing is calculating a distance and an angle from central position using touch xy coordinates and feeding to the gun angle.

    I could use rotate towards angle to make the movement smoother but this doesn't solve the issue of the restricted angles.

    Maybe Im being thick and there is something Ive missed or maybe a bug has crept in as I was copying from one project to another.

    I'll have a look at your tutorial/capx tonight. (at work presently) and get back to you. Ill try to chuck up a capx tonight myself if can get home early enough.

    cheers.

  • Thanks

    lamar

    I have both sticks working, left for moving and right for aiming.

    Its just that aiming one is jumping between angles of around 10 deg due (I think) to the low resolution of touch sensors over the small touch stick area. All it is doing is calculating a distance and an angle from central position using touch xy coordinates and feeding to the gun angle.

    I could use rotate towards angle to make the movement smoother but this doesn't solve the issue of the restricted angles.

    Maybe Im being thick and there is something Ive missed or maybe a bug has crept in as I was copying from one project to another.

    I'll have a look at your tutorial/capx tonight. (at work presently) and get back to you. Ill try to chuck up a capx tonight myself if can get home early enough.

    cheers.

    Just thinking out loud but the closer your touch to the center of the stick the more gap between angles which is why I asked if you needed the stick.

    I am thinking you could set a touch sensor circle out from the stick that would increase angles covered but I would have to try it and see.

  • lamar

    Yea I think this is what is happening.

    I did set a "deadzone" of radius 6 so the laser does not fire until you are this far from the centre maybe I need to increase it.

    Actually just checked out your game on the arcade and it doesn't seem to suffer this issue even when finger is close to the ship. Although it is hard to properly tell.

  • lamar

    Yea I think this is what is happening.

    I did set a "deadzone" of radius 6 so the laser does not fire until you are this far from the centre maybe I need to increase it.

    Actually just checked out your game on the arcade and it doesn't seem to suffer this issue even when finger is close to the ship. Although it is hard to properly tell.

    On my game if you are touching on the turret it will fire backwards which is why I made the turret a little bigger so people would use a larger touch circle and that may be what you need.

  • lamar

    There you go,

    The issue is exacerbated by the floating stick as it maintains the small resolution.

    use only with touch as mouse has more resolution it seems.

    the limited angles are really apparent when moving around slowly......

    https://www.scirra.com/arcade/other-games/test-touch-resolutions-15558

    so.... just make the throw larger it seems will make things better but a large floating touch feels really bad.

    I might return to a fixed one with a large dead zone to avoid small throws........

  • lamar

    There you go,

    The issue is exacerbated by the floating stick as it maintains the small resolution.

    use only with touch as mouse has more resolution it seems.

    the limited angles are really apparent when moving around slowly......

    https://www.scirra.com/arcade/other-games/test-touch-resolutions-15558

    so.... just make the throw larger it seems will make things better but a large floating touch feels really bad.

    I might return to a fixed one with a large dead zone to avoid small throws........

    Yup pretty obvious loss of angles with the smaller throw.

    I think the feel is about right at 1/2 inch to a little wider from the center point and that seems to cover the angles well.

  • lamar

    Ahh you see ...... that is the issue.

    Is that

    1/2 inch on a 4 in screen?

    or 1/2 inch on a 12 inch screen?

    this is exactly the mistake that I was making.

    I have been developing and testing on a surface pro 12 in screen.

    to make the throw comfortable on the big screen I have been inadvertently making the throw really small in touch pixels terms. even though it is still big on the big screen.

    it seems that we have to pick a size that works across most screen sizes as scaling throw size is not really an option.

    players with bigger screen will have to move thumb further.

    good lesson learnt...... (ps. I took gamestopper out of the title. as I think it will be ok now)

    cheers....

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)