Very slow game on Iphone through Safari

Discussion and feedback on Construct 2

Post » Thu Nov 10, 2011 11:53 pm

Hi !

I'm making a small little game and, I tried to play it on my Iphone 4 through the Web browser, Safari.

It's quite slow.
On my PC, I have a dt of 0.016
On the Iphone, it's 0.1

So, my question is... is it normal ?
Is depending on my scripting ?

What's the problem ?


Thanks !!


Link to the game :
http://www.thenarrativ.com/games/christmasrush/




http://www.thenarrativ.com/games/christmasrush/
B
12
S
2
G
5
Posts: 73
Reputation: 3,570

Post » Fri Nov 11, 2011 12:32 am

Actually, When I putted the game in Fullscreen mode, it helps... but still slow...
B
12
S
2
G
5
Posts: 73
Reputation: 3,570

Post » Fri Nov 11, 2011 2:46 pm

i tested it on iphone os5 and the framerate is rather good, better than firefox on pc :) i get up to 0.040 / 0.050 , there are lot of improvements made from ios 4.0 to 5.0 concerning the browser/html5

also be carefull if you want to use sound, it will kill framerate to unusable > there is a workaround by somebody on the forum that was quite interesting, i will look it up

audio workaroundvtrix2011-11-11 14:49:34
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Fri Nov 11, 2011 3:44 pm

Yeah, are you using iOS 5? That's much faster.

Also, you have to remember mobiles have much weaker hardware than PCs. It looks like you're creating a lot of objects. Try putting in an object counter. You should try to keep it under around 50 objects on screen at any one time to have really good performance on a mobile. You have to specially design your games for mobiles - you can't assume any old game you make that runs well on your PC will run well on a mobile.Ashley2011-11-11 15:45:26
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Fri Nov 11, 2011 4:28 pm

Yeah... I have a lot of object...

Is it really the number of objects, or the number of Sprites ?
B
12
S
2
G
5
Posts: 73
Reputation: 3,570

Post » Fri Nov 11, 2011 5:03 pm

Any object that draws to the screen, but Tiled Backgrounds still count as 1 even if they're big, so generally it's on-screen sprites.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Nov 17, 2011 7:07 pm

IS it a limitation of Construct 2 ?
Or is it HTML 5

Is it something that will be improved, that can be ?
Or there always will be that limitation ?
For contruct I mean. (50-ish objects for this generation of smartphone)
B
12
S
2
G
5
Posts: 73
Reputation: 3,570

Post » Fri Nov 18, 2011 12:07 am

Are you on iOS 5? @vtrix said the framerate was fine on that. iOS 5 is much faster than iOS 4 so you should make sure you try it on iOS 5. It's neither Construct 2 nor HTML5 that is at fault, it's probably just that iOS 4 is slow.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sat Sep 07, 2013 12:22 am

how to put an object counter?
B
12
S
3
G
1
Posts: 347
Reputation: 2,866

Post » Sat Sep 07, 2013 12:25 pm

Please don't bump old threads with unrelated posts.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 12 guests