# Touch Resolution Limitation for a 360 deg Shooter?

Discussion and feedback on Construct 2

### » Mon Feb 20, 2017 10:51 am

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?
Last edited by NetOne on Tue Feb 21, 2017 9:54 am, edited 1 time in total.
NOTE: There is a high a probability that I am wrong.
B
53
S
27
G
7
Posts: 489
Reputation: 9,049

### » Mon Feb 20, 2017 12:09 pm

Banned User
B
30
S
7
G
58
Posts: 1,229
Reputation: 34,945

### » Mon Feb 20, 2017 1:21 pm

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.
NOTE: There is a high a probability that I am wrong.
B
53
S
27
G
7
Posts: 489
Reputation: 9,049

### » Mon Feb 20, 2017 1:51 pm

NetOne wrote: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.
Banned User
B
30
S
7
G
58
Posts: 1,229
Reputation: 34,945

### » Mon Feb 20, 2017 3:53 pm

@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.
NOTE: There is a high a probability that I am wrong.
B
53
S
27
G
7
Posts: 489
Reputation: 9,049

### » Mon Feb 20, 2017 4:25 pm

NetOne wrote:@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.
Banned User
B
30
S
7
G
58
Posts: 1,229
Reputation: 34,945

### » Mon Feb 20, 2017 10:56 pm

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

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

NOTE: There is a high a probability that I am wrong.
B
53
S
27
G
7
Posts: 489
Reputation: 9,049

### » Tue Feb 21, 2017 1:19 am

NetOne wrote:@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......

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

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.
Banned User
B
30
S
7
G
58
Posts: 1,229
Reputation: 34,945

### » Tue Feb 21, 2017 10:40 am

@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....
NOTE: There is a high a probability that I am wrong.
B
53
S
27
G
7
Posts: 489
Reputation: 9,049