[Game Closure]Disable DOM use in HTML5 export

0 favourites
  • 6 posts
From the Asset Store
C3Clonet's puzzle game immerses players in a vibrant world of unique colored squares.
  • 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 there

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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 :) :\ ????

  • 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)

  • 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:

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

    Nice work on that game, btw. It's pretty awesome. Anyway, I hope this helps!

  • Read it. My problems are solved with his solution.

  • Hi everyone,

    Is anyone using GC to create Android / iOS games based on C2?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)