hi . i am creating a game which is very simple just like ant smasher if you know that game , just one enemy fall down the screen in random time,formation,opacity and so on , it is just 2 layouts , one for the game , one for GameOver , and the player has only to tap that enemy to gain score else if the enemy managed to exist the screen it will game over , but i am facing an issue regarding the sensitivity for the finger touch when i run my game on android devices . i tried all the performance tips i can find here ex: use sprite font , no more than 20 sprite created , use webgl , clear background to no, no effects , the only sprite is in the game is cut clean to avoid much transparent , actually i followed most of the tips in this link
but still when taping the enemy is not fast as it should be . i test it in more than device , it still no as it should be .
the enemy size is not big and the max speed that will reach is 120 only in advance levels ( times ) . i dont use gravity .
i am using intel xdk and also CocoonJS .
when i debug the game it never reached 60fp , it go between 30 to 52 fp . the CPU is less than 20 on my pc . most the indicators show that it is not exhausting that much of cpu,gpu to slow the touch response .
it run fine on PC till i reach the stat where 15 enemy fill the screen and speed is around 100+
i have the latest version of the C2
So any tips to make the touch response faster
Develop games in your browser. Powerful, performant & highly capable.
Any help ?
There are two things I can think of that are worth considering here. 1 - if you are using cocoonjs then your game should be running respectably fast - what hardware are you testing on? 2 - it could be that you need more optimization. Have a look at the debugger profile page and see which events are using up most cpu time - then work on those. With 15 sprites on screen there should be no problem at all for an average phone to handle, so the problem could lie with your events. Have a look at your collision polygons as well - for this sort of game you only need rectangles.... Lastly, use a check of is touching / trigger once - rather than on object touched; it uses less cpu power...
the device is sony Z2 ( so it is super powerfull and support webGL
also i am using cocoonjs
i changed the collisions to be square ( just 4 points )
i am using on tap object just once
and i can see the cpu didnot go beyond 5%
but still the taping is not responding in a decent way
i already tested in another device ( samsung s3 ) and still the same . even i start to notice some color and gpu issue with it .
I just know the best way to do that ))
use Corona SDK
Yes . i think it is better to spend more time learning how to use it rather than have bad performance using Construct 2 and other similar NO-Coding engines ,
i was able to do the same event with 200 Spawned Actors without any lag using corona SDK
I was wondering which Touch condition you used.