[Game Closure]Disable DOM use in HTML5 export

Get help using Construct 2

Post » Tue Feb 26, 2013 5:40 am

So i'm testing Game Closure here and there as time permits. I've managed to get pretty far in relation to getting a BASH commands for OSX running in windows. Most of it's good to go except I've hit a hurdle

First. In the GC web simulator the game works fine. However it's the android export where I have hit the problem. I'm using the HTML5 export.

When running on Android, the game continues to believe that it's running with as DOM. The canvas is being passed to C2runtime by hacked in code. No DOM reference should be made to jquery as it's the DOM reference is breaking the game. What can I do in the C2runtime for it to adjust this. There is a lot that controls the c2runtime and it's a little over my head.

Alternatively the CocoonJS c2runtime is more ideal, but I'm not sure if the CJS calls are the only ones in there. Can I extract the CJS c2runtime and use that instead?

edit: clarifying, hopefully :D
I tried this
this.isDomFree = true; //this.isDirectCanvas || this.isCocoonJs;
but it's still using jquery and getting hung up therejayderyu2013-02-26 06:30:56
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Tue Feb 26, 2013 6:33 am

hmmm. kept on tinkering. on the off chance of just not loading jquery into the app. I ended up stop getting any more C2/jquery errors :) :\ ????

B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Tue Feb 26, 2013 12:24 pm

Setting isDomFree to true should avoid any DOM/jQuery calls at all. Where are the calls still happening?

(You should also definitely remove the inclusion of the jQuery script as well)Ashley2013-02-26 12:25:23
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sat Mar 23, 2013 1:42 am

Hey guys. This is something I've been looking into a bit. Here's a write up I did about wrapping Space Blaster in the Game Closure DevKit and running it on a phone:

http://www.gameclosure.com/blog/2013/03/space-blaster-meets-mobile

Nice work on that game, btw. It's pretty awesome. Anyway, I hope this helps!
B
2
Posts: 1
Reputation: 252

Post » Sat Mar 23, 2013 8:07 am

Read it. My problems are solved with his solution.
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Thu Aug 08, 2013 10:43 am

Hi everyone,

Is anyone using GC to create Android / iOS games based on C2?
B
26
S
5
G
5
Posts: 151
Reputation: 6,279


Return to How do I....?

Who is online

Users browsing this forum: MarkThomas and 18 guests