Detecting if the game is on Kongregate

Get help using Construct 2

Post » Sat Feb 28, 2015 10:51 pm

My game, Carnage in Space II, has a custom login system that lets players (optionally) sign in, automatically sync their save files between computers, and view highscores and achievements all on my website regardless of where it's being played from. Currently, you can play the game from my website (http://carnageinspace.com) or Newgrounds; I plan to add Chrome Store and Kongregate.

The problem is, Kongregate doesn't want any games to have login systems outside of their own.

What I'd like is to have the game check if you're on Kongregate, and then send you to the custom login or the Kongregate login. I can customize my website to allow Kongregate accounts alongside normal ones, storing their Kongregate name instead of an email address.

My problem: I don't see a way to detect that the game is Kongregate. How do I do that?
B
8
S
1
Posts: 97
Reputation: 826

Post » Sun Mar 01, 2015 4:44 pm

Update: I had an alternative idea - adding an extra login button which will open up the Kongregate login page. However, that doesn't work on my preview. Does it only work on live servers? Do you need to add your game's API key? Where do you do that?
B
8
S
1
Posts: 97
Reputation: 826

Post » Sun Mar 01, 2015 8:33 pm

you need to first make the events, then publish a test preview on kongregate there is no other way at the moment, there is no need for api key :) as you see on the kongregate object in properties bar there is no empty space to input it :) hope it helps never used it but i think thats how it works
ImageImage
B
54
S
14
G
64
Posts: 1,252
Reputation: 39,500

Post » Mon Mar 02, 2015 6:05 pm

I have the game published to both Kongregate and the Chrome web store using an iFrame/hosted app. This means that both apps point to the copy of my game on my own server. Do I really have to publish to Kongregate in order to use this feature? Is it possible to have one copy that Chrome, Kongregate, and normal web users can all play on?
B
8
S
1
Posts: 97
Reputation: 826

Post » Mon Mar 02, 2015 6:22 pm

You can do that easily by checking current domain name.
Domain name = kongregate.com -> do something
else -> do something else

You can skip the "hashing" part from there https://www.scirra.com/tutorials/1324/simple-protection-of-published-game-part-two/page-1 and juse use the part where it's comparing on what domain your game is currently running.
ImageImageImageImage
B
141
S
58
G
37
Posts: 2,549
Reputation: 31,736

Post » Mon Mar 02, 2015 7:08 pm

Keep in mind my game is running in an iFrame on Kongregate. Does the Browser.Domain return the iFrame URL or the top-level one?
B
8
S
1
Posts: 97
Reputation: 826


Return to How do I....?

Who is online

Users browsing this forum: Thndr, xrosax and 10 guests