[Example] Movable Touch Analog

Get help using Construct 2

Post » Wed Oct 03, 2012 4:39 pm

today when i saw @kyatric videos i asked my self why don't i do something too ^^ and with some old capx i made an analog example which most of the new games use it now in the mobile and tablet devices.

*i hope you put this in [URL=http://http://www.scirra.com/forum/how-do-ifrequently-asked-questions_topic45416.html][How do I]Frequently asked questions[/URL] , so most of people can see it and use it .

and here you can test the game (On Chrome the PC browser)
and to go to the game frame click on the (X) this is just informations and stuffs like that.

and here you can test the (on Cocoonjs launcher)
or from here to copy : https://dl.dropbox.com/u/90034817/cocoonjs/newproject.zip

i want you to check the frames and tell me how many because it has really few sprites and i tried it on my iphone 4 and only has 41 frames i don't know why so tell me what is your mobile and what are the frames . also this game made with the iphone4 resolution.

so last but not least this is the
Analog.Capx


i hope you enjoy it and leave me if there is any bugs or something like that :)

thanks for hearing
by salem zsangerous2012-10-21 11:46:43
B
48
S
15
G
6
Posts: 795
Reputation: 12,035

Post » Wed Oct 03, 2012 8:23 pm

I had 40 frames too maybe until is compiled to get 60 fps.
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Wed Oct 03, 2012 9:33 pm

@Joannesalfa what is your device??
B
48
S
15
G
6
Posts: 795
Reputation: 12,035

Post » Wed Oct 03, 2012 9:45 pm

iPod Touch 4 with iOS 6
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Sun Oct 21, 2012 11:51 am

^^ i have re-uploaded the files with sime bug fix ^^

*fixed the 2 fingers support so now when you use 2 fingers it will not get any bugs and you can put anything in the 2nd finger :)

also i have tried the mobile version on galaxy note2 and of course the fps reached 60+ , so i think my iphone4 and @Joannesalfa 's ipod are really slow :P

also this example doesn't support all ratio for example in my note2 it doesn't fit all the screen because the ratio isn't like it but this problem isn't important while i'm just giving an example ^^

if you have any thing to ask or any report ill be happy to hear :)

by salem
B
48
S
15
G
6
Posts: 795
Reputation: 12,035

Post » Tue Nov 27, 2012 3:36 am

Thanks for this example, it's helped me a ton! I wanted to make a more precise control so I modified your capx. The ship now moves at 360 degrees(rather than 8 direction) and also takes into account distance from the center of the control for speed. I am having a problem though. The green objects in this modified capx are set to solid and I can't seem to find a good way to stop against them. Any ideas?

I tried this post from Yann but couldn't apply it properly.

UberLou2012-11-27 03:37:22
B
77
S
49
G
25
Posts: 346
Reputation: 17,409

Post » Wed Nov 28, 2012 10:57 am

@UberLou , i'm really happy to some people use my examples ^^ .
first of all your way to fix this problem is really hard but it can be fixed but i don't like it ^_^

2nd thing i have made an fixed capx you can download it from here :
https://dl.dropbox.com/u/90034817/scirra/fixed%20movment.capx
the fixed capx has something called boundary behavior which you can stick something in the game when every you want if he is platform or 8 direction or physics or even drag and drop so this is the best way to solve your problem i hope you enjoy using it and understand it ^^

by the way the screen of my example is too small i just made it just to fit most of the mobiles so i suggest for you to make a bigger screens ^^

if you have a question feel free to ask ^^ and ill answer if i knew it
B
48
S
15
G
6
Posts: 795
Reputation: 12,035

Post » Mon Dec 03, 2012 1:42 am

I just wanted to say thanks for looking at this problem. Appreciate the help and I'll post on here if I have anymore questions. Thanks!

B
77
S
49
G
25
Posts: 346
Reputation: 17,409

Post » Wed Jul 31, 2013 12:49 pm

Very nice controller! i love 360 degree version. but there is the same problem as i got when i created my own controller. it always spawns a certain distance away from where the touch input came from.
i went crazy while trying to fix this. have you got any idea?
B
23
S
6
G
5
Posts: 132
Reputation: 4,487

Post » Sat Aug 03, 2013 12:35 am

@philx , i really don't get it , maybe the problem in your mobile that shift the sprite position,

also if you are using android you can show the touch input from : sitting >> devolopers (or something like this) then click on the box that says : show touches , and maybe you can see the shift in the screen...

also maybe its from your finger is too fat or maybe the origin point of the sprite isn't on the center or or or .. there are many reason that cause the same problem.

as to make sure i have tried the demo on the pc and it works fine when i re-downloaded the capx file and played , the link that has the demo is broken from the server i don't know the reason :(

anyway try these steps and i hope it fix it :)

B
48
S
15
G
6
Posts: 795
Reputation: 12,035

Next

Return to How do I....?

Who is online

Users browsing this forum: Vallar and 21 guests