Very slow performance on Mobile

Discussion and feedback on Construct 2

Post » Sun Sep 25, 2016 10:52 am

Local storage actually uses the indexedDB and not the webstorage, also it is asynchronous when used in C2.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Sun Sep 25, 2016 10:57 am

Thanks @Aphrodite.

Any Input about the game play problem? :)

Thanks!
B
6
S
1
Posts: 56
Reputation: 548

Post » Sun Sep 25, 2016 11:17 am

I can only guess but I'd say you are using physics objects and somehow moving the player makes the game slow down, does the player also has that behavior? How do you check for collisions?

I'd say use rather bullet objects if that is not already the case.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Sun Sep 25, 2016 11:34 am

I played the game on my computer and it seemed fine. On my phone there is a little lag. The only thing I can see is for you to make less ice needles come down or resize the large ice needle to be a little smaller , since the large ice needle is whats causing the slowdown. Either way will help performance.

Also how big is your background sprite?? I lasted long enough to see it end and the background is white. Are you scrolling it through code or do you have a super long background and just have it moving downward? That could be the problem.
Check out my awesome Android Game releases https://play.google.com/store/apps/deve ... ames&hl=en
B
38
S
18
G
24
Posts: 681
Reputation: 16,613

Post » Sun Sep 25, 2016 11:41 am

Ah... Guilty... :) it was just a quick fix (the long tilemap) but does a huge stretch of a tile map adds to the size?
also the big ice needle is really a small graphic... something like 50kb... weird.

+ do you know what is the best way to make the tile map to loop? (I am thinking about a loop like this: if tilemap.y >= something... so jump back up)

Thanks
B
6
S
1
Posts: 56
Reputation: 548

Post » Sun Sep 25, 2016 11:55 am

Yes I knew it was that haha!!

This explains how to do it left to right, so use y instead of x.

https://www.scirra.com/tutorials/857/fl ... tes/page-5
Check out my awesome Android Game releases https://play.google.com/store/apps/deve ... ames&hl=en
B
38
S
18
G
24
Posts: 681
Reputation: 16,613

Post » Sun Sep 25, 2016 2:02 pm

saiyadjin wrote:80mB of memory usage? memory usage shouldn't be a problem

also how do you intend to make a big game with 80 mb of usage?
some games need up to 400-500MB per layout to work..
i don't think it's a memory problem it's more of a game design problem and people wanting to do more then can be done.


Well, memory usage is actually one of the most important factors in achieving good performance in mobile next to cpu usage.
I thought it was already obvious when I said "memory usage" that I am not implying to dormant memory considering that devices these days have more than 1GB of RAM.
That means that I am referring to the images that are currently inside, non-destroyed & present in the layout. 80mb is an actual limit of 'active' graphic memory usage to achieve good performance.

Regardless... Regarding what you said about the Total Graphic Memory Usage. I am quite surprised.
400- 500 mB for mobile is too heavy. :shock: .... I certainly do not agree that it will work out on higher range of mobile devices...
I actually tested it on low spec devices.
Reason:
1)It will take too long to load & impractical.
2)If you have a 1GB Ram memory device. It doesn't mean you can use them all for your game. A phone's system already consumes about 40% of memory to run & 5 to 20% for background processes. That means for apps, you only have 40% or less to spare. That is 400mB left or less and that's the common reason why app crashes happen due to lack of memory.
Will it work: Yes, theoretically. No, practically.
Effects: Crash.

But I have only tested this on low spec devices before. Devices Tested:
Samsung Galaxy Win (Android Jellybean): Crash
Samsung Galaxy E7 (Android Kitkat): Very Slow Loading & huge performance impact.
Samsung Galaxy J7 (2016 Model) (Android Marshmallow): Slow Loading & moderate performance impact.

My Recommended Mobile Total Graphic Memory Usage:
Android:
Stretched Limit: Less or Equal 250~300. (Honestly, I didn't test this one :lol: )
Recommended: Less or Equal 150 to 200.

Your recommendation is more like suitable for PC games in my opinion.

Since every tester have different test results, I won't argue with your opinion. But in my test result, I believe having a 'Total Memory Usage' of 400-500mb can only
work on high spec devices. And that will limit your game's download rate.


BTW. I replaced "memory usage" to "active memory usage" to avoid confusion. That may have triggered you to question what I posted.
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
64
S
18
G
90
Posts: 1,118
Reputation: 59,565

Post » Sun Sep 25, 2016 7:52 pm

Hi All,
I Reduced the tile-map and made it to go back every time as @pixelpower suggested.
But it is still slow... :(

what can I do?

http://yurinkastudio.com/games/ice3/index.html

Thanks
B
6
S
1
Posts: 56
Reputation: 548

Post » Mon Sep 26, 2016 1:01 am

If it only happens while moving the character, consider what you're doing when the character moves. Try deactivating each part and testing again until it runs smoothly.

It's hard for us to tell from an exported game instead of looking at your code, but it appears for example that you're creating a ton of sprites or particles on the ground. I don't know how powerful the device you're having difficulty with is, but if it's old enough, that effect could be what tips it above what it can handle at 60 fps.

Transparent pixels take more work to render than opaque ones. 100% transparent pixels still take work to render unless the object is invisible. Creating and destroying objects takes more work than it might seem. Text boxes take more work to render than sprite fonts, especially if you're updating them every tick instead of only when they change. Make the text box as small as possible because you don't want the GPU to waste time drawing invisible areas. Do you have your project set to clear the background? That also uses more processing power, and your background is hidden, so you can turn that off. If you're using effects on mobile, don't because they're crazy intensive.

Also, read this page. https://www.scirra.com/manual/134/performance-tips

All of these things and more can add up.
Moderator
B
94
S
33
G
33
Posts: 3,006
Reputation: 27,749

Post » Mon Sep 26, 2016 1:46 am

yurinkab wrote:Hi All,
I Reduced the tile-map and made it to go back every time as @pixelpower suggested.
But it is still slow... :(

what can I do?

http://yurinkastudio.com/games/ice3/index.html

Thanks


Ok disable the moving background that should work. Afterwards post it and we will see the performance.What resolution is your game also?

I ran into problems with slowdown myself because of scrolling background. I could only use scrolling background smoothly with 650x350 resolution. My latest game that is 800x480 resolution I had to take out my scrolling background and I had fewer sprites than you.

If that not the problem then its you destroying and creating the main hero. If that the case its easy just have him move left to right instead of destroy and create.
Check out my awesome Android Game releases https://play.google.com/store/apps/deve ... ames&hl=en
B
38
S
18
G
24
Posts: 681
Reputation: 16,613

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: paxto22 and 7 guests