R119: Kongregate plugin - minify

Bugs will be moved here once resolved.

Post » Tue Feb 26, 2013 5:31 pm

Link to .capx file (required!):
http://www.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 with the minify setting 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 do not set minify.

<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.

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.

Browsers affected:
Chrome: yes
Firefox: yes
Internet Explorer: yes

Operating system & service pack:
Win 7 and SP1

Construct 2 version:
119necromaster2013-02-26 18:15:59
=========================================
If you are on Linkedin, join other C2 professionals and network on the Scirra Construct 2 Developer Group at https://www.linkedin.com/groups?home=&gid=6732005
B
47
S
10
G
6
Posts: 193
Reputation: 7,584

Post » Tue Feb 26, 2013 6:17 pm

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 @ GamesWarpnecromaster2013-02-26 18:22:20
=========================================
If you are on Linkedin, join other C2 professionals and network on the Scirra Construct 2 Developer Group at https://www.linkedin.com/groups?home=&gid=6732005
B
47
S
10
G
6
Posts: 193
Reputation: 7,584

Post » Mon Mar 04, 2013 5:37 pm

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)
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Tue Mar 05, 2013 2:28 am

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 @ GamesWarpnecromaster2013-03-05 02:29:51
=========================================
If you are on Linkedin, join other C2 professionals and network on the Scirra Construct 2 Developer Group at https://www.linkedin.com/groups?home=&gid=6732005
B
47
S
10
G
6
Posts: 193
Reputation: 7,584

Post » Tue Mar 05, 2013 7:06 am

Ok, ignore and close my entire thread.

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

Thanks and regards,
Gavin @ GamesWarp
=========================================
If you are on Linkedin, join other C2 professionals and network on the Scirra Construct 2 Developer Group at https://www.linkedin.com/groups?home=&gid=6732005
B
47
S
10
G
6
Posts: 193
Reputation: 7,584


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests