How do I stop my game lagging on mobile?

Get help using Construct 2

Post » Mon May 26, 2014 10:09 pm

if you use the default browser then webgl is off and that is the reason you see this terrible performance
you need to install in your computer the intel xdk and export from c2 as "android".
read the tutorials here on how to do this and create your apk.
it will be wrapped in chrome(canary) and it will take advantage all the speed boost that the xdk gives.
you never EVER export in mobile as plain html! :)
edit: i just read that you already used xdk. the latest build gives terrible performance but your game is very simple from what i read for this to be a problem.
please try cocoojs and tell us your results.
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Post » Mon May 26, 2014 10:45 pm

Roccinio wrote:if you use the default browser then webgl is off and that is the reason you see this terrible performance
you need to install in your computer the intel xdk and export from c2 as "android".
read the tutorials here on how to do this and create your apk.
it will be wrapped in chrome(canary) and it will take advantage all the speed boost that the xdk gives.
you never EVER export in mobile as plain html! :)
edit: i just read that you already used xdk. the latest build gives terrible performance but your game is very simple from what i read for this to be a problem.
please try cocoojs and tell us your results.


I managed to get the "raw" HTML game to open in Firefox mobile and it worked amazing. I think that Intel XDK is just crap and doesn't work in that case, I will try cocoonjs.
B
7
S
1
Posts: 25
Reputation: 477

Post » Mon May 26, 2014 10:49 pm

solado wrote:
Aphrodite wrote:" When I run it on my Desktop and over the web via "preview" to the device it works flawless."

Do you mean that the preview on the device runs great? (if so, does the HTML5 exported runs great in the chrome browser of the device too? If so, then I'd say it is a problem not on your side IMO)


I exported it as a regular HTML 5 and just put the files on the device, It didn't run through chrome because "Exported games won't work until you upload them" JavaScript error happened. No idea what this means and no idea how to fix it.

But when I preview the game via my localhost in chrome on the mobile device it works fine (other than the Audio takes forever to catch up).


I meant like acessing the html5 export via the web (exemple: dropbox) from the mobile browser
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
52
S
22
G
18
Posts: 2,122
Reputation: 17,093

Post » Mon May 26, 2014 10:49 pm

the reason people do not export for mobile using html is because a huge percentage of people use the stock browser that does not support webgl.
if chrome was standard on android then there wouldn't be a reason for an apk.
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Post » Mon May 26, 2014 11:10 pm

Roccinio wrote:the reason people do not export for mobile using html is because a huge percentage of people use the stock browser that does not support webgl.
if chrome was standard on android then there wouldn't be a reason for an apk.

So I just downloaded the cocoonjs apk file and installed it. Just gives me a black screen so I give up for tonight.

I don't understand why Intel XDK gives me such bad performance? Is it the newest version that's broken or do I need to set the browser in the XDK to wrap it in?
B
7
S
1
Posts: 25
Reputation: 477

Post » Tue May 27, 2014 12:36 am

I think (and could be wrong) you aren't using crosswalk, but another exporter of the intel XDK, crosswalk is the one that gives the best performances.

"the reason people do not export for mobile using html is because a huge percentage of people use the stock browser that does not support webgl."

In fact some people are actually doing this (since the whole point of HTML5 is to be playable everywhere, and C2 is really great to that regard), the apk being more a bonus exporter to support even more people at the end, and I think newest android are using chrome as the stock browser, but I could be wrong on that.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
52
S
22
G
18
Posts: 2,122
Reputation: 17,093

Post » Tue May 27, 2014 1:03 am

CocoonJs is garbage. No one uses it. Stick with the Intel XDK.

If you want us to actually find the problem, then youll need to go to File > Save Project. Then upload the .capx project to this thread.
B
56
S
15
G
13
Posts: 825
Reputation: 17,643

Post » Tue May 27, 2014 3:50 pm

Tekniko wrote:CocoonJs is garbage. No one uses it. Stick with the Intel XDK.

If you want us to actually find the problem, then youll need to go to File > Save Project. Then upload the .capx project to this thread.


I deleted some of the later levels and messed up some code just so people dont stick my game on the playstore when they get it working.

http://www.sendspace.com/file/ft7i5a
B
7
S
1
Posts: 25
Reputation: 477

Post » Tue Jun 03, 2014 5:44 am

Roccinio wrote:the reason people do not export for mobile using html is because a huge percentage of people use the stock browser that does not support webgl.
if chrome was standard on android then there wouldn't be a reason for an apk.



Actually Chrome is standard for Android.. However starting at Android 4.0+.. Most of the market share still uses Android 2.3.3 to 2.3.7
Image
B
81
S
16
G
4
Posts: 501
Reputation: 8,934

Previous

Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests