dogjune's Recent Forum Activity

  • In my particular case, some parts of my game take place in the console, so I'm trying to have as much control as possible over what shows up there so as to reduce noise.

  • Is it possible to turn off the console logs that come from c3runtime? Preferably just stuff at the level of .log and .info? Any ideas beyond manually scrubbing it would be tremendous. Thank you!

  • I don't think I'm familiar with collectors... what are those?

  • It seems like with the Platformer behavior, anything steeper than 45 degrees is treated as a wall. Is there any way to allow my player to go up steep inclines? My use case is making a minecart-style level where the player goes up and down hills on a track.

  • I should also add so if it helps anyone, I was able to get it working by replacing all instances of "ga" in the minified c2runtime with another variable (I used "xx"). With Sublime Text, replacing with the regex ga(?![a-z]) case insensitive did the trick.

  • I've been having a problem where mysteriously, Google Analytics wouldn't work with my game, but only when it was minified. As it turns out, with this particular game, my minified c2runtime.js includes a global variable named "ga". Unfortunately, Google Analytics uses "ga", so then i end up with conflicts and analytics stops working. When I run the exported game with the GA debugging extension, it tells me there's already an object named "ga" so errors may occur.

    This seems mostly hopeless, but is there any way to control what globals are used when the code is minified? And I realize I'm an edge case, but it would be nice if in the future construct could avoid colliding with popular code libraries when minifying.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay, so in case anyone ever happens to have this same odd question, here's what I learned. There do appear to be some differences inside c2runtime.js that check for cordova specifically. Most of them seem relatively minor.

    But the biggest difference is that within index.html, there are a couple listeners that will suspend the game when the app moves to the background. That turns out to be essential because if you don't suspend the game when the user switches apps, iOS will most likely kill and reboot the app, losing the user's progress.

    So if you ever end up in a situation where you're building a cordova app where you load in a construct game (rather than just exporting a single construct game as a cordova app), make sure you listen for cordova's pause and play events, then call cr_setSuspended accordingly.

    Aaaaand this will probably help no one. But I was pleased with myself that I figured it out.

  • I'm working on a cordova app that's going to house multiple games, some made with Construct, others from scratch. So far, I've built the cordova app from scratch and I've just been exporting my Construct games as HTML5 (in embed mode). They seem to be working fine within the cordova shell I've built.

    Is there any advantage to exporting as cordova if I'm not going to be using the config.xml Construct generates?

    Or to put it another way, does Construct export cordova differently than HTML5 other than just the inclusion of config.xml?

    Thanks!

dogjune's avatar

dogjune

Early Adopter

Member since 16 Mar, 2016

None one is following dogjune yet!

Trophy Case

  • 8-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

10/44
How to earn trophies