0 Favourites

R119: Kongregate plugin - minify

  • Link to .capx file (required!):

    kongregate.com/games/GamesWarp/pachinko-parlor

    Steps to reproduce:

    PART A

    1. Use Kongregate plugin in the game project.

    2. On Start of Layout, have a condition that says Kongregate->On Login. Make the game do something on logging in (eg. making a sprite visible).

    3. Compile game <font color=Red>with the minify setting</font> and upload it to the server.

    4. Get the URL to index.html and fill it into Kongregate's IFrame URL box.

    5. Run game on Kongregate.

    PART B

    6. Repeat steps 1 to 5, but in step 3 <font color=Red>do not set minify</font>.

    <PS. I made a copy of kongregate_api.js and placed it on my server. I also updated index.html to point to the new path on my server (and not pointing to Kongregate.com). At least it would be more responsive during testing.>

    Observed result:

    PART A: Game does not detect that player has logged in (with minify set).

    PART B: Game detects that player has logged in (with minify not set).

    Expected result:

    PART A: Game should detect that player has logged in and the condition should have been triggered.

    PART B: Game detects correctly that player has logged in and the condition is triggered.

    <font color=Blue>My suspicions - Apparently, the minified script shows "kongregate.xl.blah();" etc, whereas the unminified script shows "kongregate.services.blah();". Could minifying have caused a problem? Is there a workaround or quick-fix to this bug? - I prefer to have my project minified.</font>

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Internet Explorer: yes

    Operating system & service pack:

    Win 7 and SP1

    Construct 2 version:

    119

  • Oops.. Kongregate finally fulfilled my request to "delete" my app. The link is no longer applicable.

    Ashley, If you need a capx, I will create one for you tomorrow.

    Regards,

    Gavin GamesWarp

  • I've gone over the Kongregate plugin code carefully and it looks like it ought to minify OK. Can you post a minimal .capx that reproduces? (Note we require this anyway, exactly for this kind of situation)

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Hi Ashley,

    You are right.

    I have been repeating the tests extensively at my end and apparently I am confusing it with two issues:

    1. The above bug symptoms which I list above.

    2. And the fact that it does not load kongregate_api.js for me.

    After refreshing my browser cache thoroughly and testing with less used browsers like Safari and Maxthon, I found that the code executes when minified.

    However, my second problem:

    In index.html, it says:

    <script src="//www.kongregate.com/javascripts/kongregate_api.js"></script>

    To get my game to work, I always had to do this: Download the javascript file and place it on my server, then modify index.html file with:

    <script src="http://myserver.com/mypath.com/kongregate_api.js"></script>

    Otherwise, my game would appear to have "stopped" at the loading screen.

    If you have an idea as to why this might be happening, I would love to hear your thoughts.

    In conclusion, please close the original bug.

    Sorry for the wild goose chase and keep at what you are doing.

    Great job!

    Thanks,

    Gavin GamesWarp

  • Ok, ignore and close my entire thread.

    Attribute the problem to my inexperience with the Kongregate platform and plugin.

    Thanks and regards,

    Gavin GamesWarp

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
1,069 148,712
han96's avatar
han96
Unread hot topic
0 Favourites
[plugin] firebase
687 65,175
cybertron7's avatar
cybertron7
Unread hot topic
0 Favourites
[PLUGIN] Canvas
627 186,724
zenox98's avatar
zenox98