Kongregate Statistic Issue

Discussion and feedback on Construct 2

Post » Tue Aug 27, 2013 8:28 am

Hi Guys,

For those who have uploaded their game to Kongregate, do they have any problems submitting highscores to Kongregate server?

For some odd reason my game isn't sending any data, both FireFox and Chrome. Previously only FireFox worked.

I tried both methods; exporting as Kongregate and also followed this tutorial by CanGame (https://www.scirra.com/tutorials/597/kongregate-highscores-achievements).

Anyone can help? Thanks in advance.
flipboxgames2013-08-27 09:05:44
B
29
S
12
G
6
Posts: 42
Reputation: 5,529

Post » Wed Sep 04, 2013 9:48 pm

Well, had the same problems, and after fighting it for a while, I realized that there's something wrong on the index.html file that C2 generates when you export it for Kongregate. I've looked through the console in Chrome, and it was pointing to an http that retrieved a GET error.

So open your index.html in an editor an replace this line:

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

To this one:

<script src="https://ssl.kongcdn.com/javascripts/kongregate_api.js"></script>

That should do the trick (Y)
B
15
S
6
G
3
Posts: 35
Reputation: 3,982

Post » Thu Sep 05, 2013 10:33 am

Awesome! Thanks for the reply.

That issue has been giving me tons of headache
B
29
S
12
G
6
Posts: 42
Reputation: 5,529

Post » Thu Sep 05, 2013 11:12 am

Hi lukedirago

Unfortunately it doesn't seem to work. Did you export it as Kongregate and then change the js url?
B
29
S
12
G
6
Posts: 42
Reputation: 5,529

Post » Thu Sep 05, 2013 10:36 pm

Exactly. Firefox was 50/50 times connecting. Chrome couldn't connect at all. I checked the console, and the js that goes to the kong API was getting errors; so I went to the URL and it redirected me to the ssl url that I posted here. After that, no problem at all. Here's the game in Kongregate

http://www.kongregate.com/games/lukedirago/derez-infinite
B
15
S
6
G
3
Posts: 35
Reputation: 3,982

Post » Fri Sep 06, 2013 1:29 am

I will give it a try again, it wasn't working for me for some reason.

Btw awesome game :) the pixelated effect confused me at first. I keep thinking whether my eyes were going blur or something haha.

Edit: May I ask 2 things?

1. how did you get the username to show on your main menu? Can't seem to find anything from the Kongregate plugin to show that.

2. how did you submit the score? Was it just "Submit statistic when game ends" or you used "On Login" > "submit statistic when game ends"?

Thanks in advance :)flipboxgames2013-09-06 01:35:27
B
29
S
12
G
6
Posts: 42
Reputation: 5,529

Post » Fri Sep 06, 2013 2:20 pm

@flipboxgames try to put my name like this @lukedirago so I get a notification ;) I just entered back here by chance!

Sure, let me show you how I did it:

- This is on the very first layout, so I make sure that it 'connects' to Kongregate, so this way you know if it's working with the API regardless of the statistic. Just put a text object (in my case is a SpriteFont, but conceptually is the same) and set text to "Welcome guest" if <I>is guest</I> and "Welcome "&Kongregate.UserName



And then, when I go to my layout "Death" this happens:

- Basically I have two stats, one "max" and other one that is "add". At the very last, I submit the two statistics.



Hope it helped, let me know if you need anything else ;)lukedirago2013-09-06 14:20:46
B
15
S
6
G
3
Posts: 35
Reputation: 3,982

Post » Sat Sep 07, 2013 4:37 pm

@lukedirago

Ah thanks. I didn't know that.

I tried using your methods but it's still showing Guest instead of Kongregate username. Double check to make sure I changed the url to the one you had provided but no luck :(

Are you using Construct 2 R139 or the latest beta?

Edit: After I left my game idle for a short while, it showed that I was disconnected from Kongregate server and trying to reconnect, to which it never did.

flipboxgames2013-09-07 16:40:08
B
29
S
12
G
6
Posts: 42
Reputation: 5,529

Post » Sat Sep 07, 2013 11:40 pm

@flipboxgames I'm using r143

Have you tried to look at the console output in Chrome? You don't get any errors?
B
15
S
6
G
3
Posts: 35
Reputation: 3,982

Post » Sun Sep 08, 2013 2:36 am

@lukedirago

seems like the problem is from my hosting.


pictures upload

Are you using your own hosting or dropbox? Or did you figure out how to upload directly to Kongregate since they allow uploads for HTML5 games (fingers cross on the last part :P).
B
29
S
12
G
6
Posts: 42
Reputation: 5,529

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests