Android. Idle - 60 fps. 1 of 200 objects moves - 5 fps. Why?

Get help using Construct 2

Post » Sun Sep 18, 2016 6:41 pm

In my game there's a 11*15 field of sprites with a bunch of UI elements which makes about 200 objects visible on the screen. When the only thwo things changing on the screen are a sprite font element showing current fps and the timer (sprite with width changing accoding to the timer value), the game shows perfect 58-60 fps. But when I launch the player sprite in any direction the game drops to 9 to 1 fps. The only logic executing during the player's movement is a condition like
Code: Select all
If (distance_traveled >= target_distance) { player.stop }

I'm exporting the game for Android and thenbuild apk via Intel XDK.
Why there's such a huge drop in the fps?
B
5
Posts: 13
Reputation: 243

Post » Sun Sep 18, 2016 6:53 pm

when nothing moves on the screen, nothing is redrawn, if one thing moves, you get to see the true performances, so my guess is that the player mouvement is not what causes actively the slowdown.

I could be wrong though.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
54
S
22
G
18
Posts: 2,123
Reputation: 17,150

Post » Sun Sep 18, 2016 7:50 pm

Message: thelander can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Looks like I won't get anything good from C2. This project http://prntscr.com/cjjhju gives me around 35 fps.
B
5
Posts: 13
Reputation: 243

Post » Sun Sep 18, 2016 8:02 pm

What device are you testing on?

What kind of numbers do you get from the following performance tests?

http://www.scirra.com/demos/c2/sbperftest/
http://www.scirra.com/demos/c2/particles/
http://www.scirra.com/demos/c2/renderperfgl/

Is your device/browser webgl enabled?
Mistakes were made.
B
55
S
28
G
115
Posts: 1,709
Reputation: 65,116

Post » Sun Sep 18, 2016 8:06 pm

Make a capx. Screenshots are pointless.
Image ImageImage
B
172
S
50
G
189
Posts: 8,510
Reputation: 118,739

Post » Sun Sep 18, 2016 8:29 pm

Message: thelander can only post plain text URLS until they have 500 rep. 4 URLS modified. Why?
I'm testing it on ZTE Nubia Z9 mini. I've uploaded the apk of this demo project to dropbox.
Capx: http://bit.ly/2cRaiBd
https://www.dropbox.com/s/ [ delete this ] esz14y16tcatk3b/performance%20test.capx?dl=0

APK: http://bit.ly/2cwEiyF
https://www.dropbox.com/s/ [ delete this ] 7uykwcgwb7qee8n/cordova_project-armv7.android.20160918191838.apk?dl=0

I can't upload files yet.
B
5
Posts: 13
Reputation: 243

Post » Sun Sep 18, 2016 9:46 pm

The Zte doesn't look like its real fast, (1.5 ghz?) and multiple cores don't really do anything for games.
What does it look like on html5 export?
Anyway I'm going to say it's probably hardware, even though I didn't test the apk, it did run 60fps on desktop.
Image ImageImage
B
172
S
50
G
189
Posts: 8,510
Reputation: 118,739

Post » Mon Sep 19, 2016 8:24 am

Got my hands on Samsung Note 10.1 2014. Both test project's and my game's apks are running at smooth 50-60 fps.

WebGL is on. Thank you, oosyrag. I'll try running those tests on my phone.

Still it looks like I have to find a way to autoadjust game's quality so one build could run smoothly on devices with big screens but different hardware.
B
5
Posts: 13
Reputation: 243

Post » Mon Sep 19, 2016 8:25 am

https://9r1bqw-ch3302.files.1drv.com/y3 ... png?psid=1

tested the apk on my own device (HTC Desire 620 it seems according to its default name when I plug it) and it is a 60 fps almost constant

Perhaps my device is really stronger than I expected (after all it was a carrier device so I expected muck less than that)
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
54
S
22
G
18
Posts: 2,123
Reputation: 17,150

Post » Mon Sep 19, 2016 8:54 am

@thelander
Its hard to help without a capx or something to go on , so we do it this way. I made a game that has at least 30-40 sprites and animations going off at the same time. Download it and try it on your device , it should run as fast with no slowdown or glitching

blast-ad-shooter-arcade-action-space-shooter_t181773

Also did you look at my mobile optimizing tips in this post
viewtopic.php?f=146&t=181811

Let me know if you still have an issue.
Check out my awesome Android Game releases https://play.google.com/store/apps/deve ... ames&hl=en
B
39
S
18
G
25
Posts: 682
Reputation: 17,175

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 19 guests