API calls issue

0 favourites
  • 6 posts
From the Asset Store
Basic clone of a 80's arcade game called Gyruss that was quite fun to play!
  • I have made a plugin, which calls an API via a function called in C2.

    API calls works perfectly fine when I don't minify while export, but API calls don't work when I minify while export.

    Can anyone help me around with that?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • See the “google closure compiler” section here for details what breaks when minifying.

    scirra.com/manual/22/runtime-overview

    That’s for code you write in your plugin. If you have a third party js library it’s better to add it as a “dependency” than to copy it into your runtime. Dependencies aren’t minifyed so you don’t have to worry about fixing that.

    scirra.com/manual/18/plugin-settings

  • See the “google closure compiler” section here for details what breaks when minifying.

    https://www.scirra.com/manual/22/runtime-overview

    That’s for code you write in your plugin. If you have a third party js library it’s better to add it as a “dependency” than to copy it into your runtime. Dependencies aren’t minifyed so you don’t have to worry about fixing that.

    https://www.scirra.com/manual/18/plugin-settings

    Dependencies won't work with our plugin as we are sending data from game via API calls.

    Any other way we can do that?

    Thanks in Advance

  • Dependencies won't work with our plugin as we are sending data from game via API calls.

    I don't see why this is a reason you can't use dependencies. It just means you move some code somewhere else where it is not minified.

  • Problem is, there are some conditions on which the API calls are executed, like gameover.

    Moreover, I found a work-around, if minify it externally, there are no problems in API calls via plugin

  • Problem is, there are some conditions on which the API calls are executed, like gameover.

    This still doesn't make sense - it's not a reason you can't use dependencies.

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