Game Runs Slow

Show us your works in progress and request feedback

Post » Fri May 01, 2015 7:15 pm

Hi guys,
I am developing a mobile game and just developed 11 stages out of 40. When I test it on my mobile, I noticed that it's running slow at first time and later runs normal when I go to next stage. Also my mobile is getting hot, while I'm playing it. I think it's because of extreme usage of ram.

I want the game to run smoothly. Please help.
B
24
S
7
Posts: 335
Reputation: 2,220

Post » Fri May 01, 2015 7:59 pm

We need more information, buddy:

What phone
What behaviors are you using in your project
How many objects are you using and when
What kinds of events and actions are you running on the stage that runs slow
Are you testing over a web browser on your phone, or exporting to Crosswalk, CocoonJS
Using the debug mode, do you notice anything strange in CPU usage during that stage or any other strange quirks
ImageImageImageImage
B
62
S
19
G
51
Posts: 633
Reputation: 30,826

Post » Sat May 02, 2015 6:29 am

Right...

Phone: Htc desire 816
Behaviors: sine and fade (for now).
Objects: 47
Events: Im using total 219 events for displaying score and time, storing score and time, using buttons like reload, menu, etc, determing gameover, moving an object on win, destroying an object on touching it.
Test: Im exporting to crosswalk.
CPU Usage: It's reaching nearly 60%. Not only on a particular stage but on all the stages.
B
24
S
7
Posts: 335
Reputation: 2,220

Post » Sat May 02, 2015 6:48 am

On debug mode (inspect), im getting CPU usage of approx. 50 to 60% and game is running slow but when i did the same in watch and profile mode im getting CPU usage of not more than 10%.
B
24
S
7
Posts: 335
Reputation: 2,220

Post » Sat May 02, 2015 7:02 am

hi,

1- to mesure cpu usage for ios (use safari to preview because it gives you approximatly the same on device)

2- to mesure cpu usage for android better use chrome for preview

3-now you have to read 3 or 4 tutorial of ashley and other members on how to save your memory usage and optimize the game (cpu usage)

4-avoid every tick actions

5-beware of collisions check (desable them and enable them only when it is necessaire)

6-beware of behaviors (desable them and enable them only when it is necessaire) to

7-for me if i get cpu usage more than 40% its much .... your game will certainly run slow

8-try to enable Webgl if you want to use webgl

9-set pixel rounding to on and sampling to point in project propriety this will give you huge performance and remember to use render cell to on if you have large layout with collisions checks

10-we need to see your capx for more details and determine what is going wrong

good luck
B
45
S
16
G
8
Posts: 792
Reputation: 8,306

Post » Sat May 02, 2015 7:23 am

Yes, im using chrome for testing on desktop.

Im using every tick action for only object, which will be activated when the user wins.

Collision checks/sec is running around 300 (~8/tick), sometimes even it reachs to 500. How to disable and enable them?

I need behaviours running from the begining to the ending.

I think by defaulf webgl is enable but I don't know its purpose
B
24
S
7
Posts: 335
Reputation: 2,220

Post » Sat May 02, 2015 2:05 pm

After disabling unnecessary collision, my game CPU usage is reduced from 50% to 30%.

Now, could you tell me is there any other way to further reduce the CPU usage?
B
24
S
7
Posts: 335
Reputation: 2,220

Post » Mon May 04, 2015 6:27 am

I noticed that my game is running at GPU memory 10.5 MB and 30 to 40 FPS. Could this be another reason of getting more CPU Usage? If Yes, how to improve the performance?
B
24
S
7
Posts: 335
Reputation: 2,220


Return to Works in Progress/Feedback Requests

Who is online

Users browsing this forum: No registered users and 2 guests