Search Unity

Kongregate Games and Unity?

Discussion in 'General Discussion' started by brandon199511, May 30, 2013.

  1. brandon199511

    brandon199511

    Joined:
    Sep 21, 2010
    Posts:
    268
    Does anyone use Kongregate games to host their games for their ad revenue? If anyone does, can you answer some questions I have please.

    Is their a tutorial or explanation on how to use the API's in the client?
    Can you update the game if you use Unity (New versions that apply bug fixes)?
    Is there an age limit?
     
    Last edited: May 30, 2013
  2. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Yes, but the ad revenues are very small unless you have a runaway hit game, e.g. it's about $1 per 1,000 plays.

    There was a nice free Kongregate example project somewhere that was a great help for the basic API, just try googling for it.

    Yes you can update the game after release.

    I don't think there is an age limit but check on the Kongregate dev forum for that, should also be in their T&C's if there is.
     
  3. jamieo01

    jamieo01

    Joined:
    Nov 24, 2009
    Posts:
    68
    One of my games is on the site so i'll try to answer your questions.

    1. I didn't use the API so I can't answer this question, but I have heard that it is quite easy to implement.
    2. You can update to your hearts content.
    3. I don't believe there is any age limit, but don't quote me on it.
     
  4. Somedays

    Somedays

    Joined:
    Jan 2, 2012
    Posts:
    214
  5. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    I think you would have better luck trying to have some creds (there IAP) altough you would need to get alot of downloads to get that, and people will have to rate it highly -- which gets it on the front page -- once its off the front page - or doesnt get there its pretty much dead.
     
  6. GibTreaty

    GibTreaty

    Joined:
    Aug 25, 2010
    Posts:
    792
    I made Match Cubed and this is how I implemented the API.

    I made this script and applied it to a GameObject named Kongregate. Note where it says "initAPI('Kongregate'..."
    the name inbetween the single quotes is the name of the GameObject. So if you called the object KongregateGameObject then you would change the name on that line to 'KongregateGameObject'.

    KongregateAPI.cs
    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4.  
    5. public class KongregateAPI : MonoBehaviour {
    6.  
    7.     public bool isKongregate;
    8.     public int userID;
    9.     public string username = "Guest";
    10.     public string gameAuthToken = "";
    11.  
    12.     void Awake() {
    13.         Application.ExternalEval(
    14.           "if(typeof(kongregateUnitySupport) != 'undefined'){" +
    15.           " kongregateUnitySupport.initAPI('Kongregate', 'OnKongregateAPILoaded');" +
    16.           "};"
    17.         );
    18.     }
    19.  
    20.     public void OnKongregateAPILoaded(string userInfo) {
    21.         isKongregate = true;
    22.  
    23.         string[] par = userInfo.Split("|"[0]);
    24.         userID = int.Parse(par[0]);
    25.         username = par[1];
    26.         gameAuthToken = par[2];
    27.     }
    28.  
    29.     void OnKongregateUserSignedIn(string userInfo) {
    30.         string[] par = userInfo.Split("|"[0]);
    31.         userID = int.Parse(par[0]);
    32.         username = par[1];
    33.         gameAuthToken = par[2];
    34.     }
    35.  
    36.     public static void SubmitHighscore(int difficulty, uint score) {
    37.         Application.ExternalCall("kongregate.stats.submit", "Highscore" + (difficulty + 1), score);
    38.     }
    39.  
    40.     public static void SubmitWin(int difficulty) {
    41.         Application.ExternalCall("kongregate.stats.submit", "Wins" + (difficulty + 1), 1);
    42.     }
    43. }
    44.  
    The SubmitHighscore and SubmitWin functions are what I use to submit the scores to Kongregate. It's very simple, just call the function, that's really all there is to it. You'll want to set up your own functions if you want different types of scores besides what I have though.

    As for achievements and badges, I read that you have to have a rating of at least 3.85 to implement them. I haven't gotten that high of a rating yet so I'm not sure how to actually implement them when the time comes.

    Kongregate FAQ

    Here's some docs on how to implement the statistics on Kongregate's side...
    http://developers.kongregate.com/docs/single-player/stats


    You can update your game whenever you want, even make a game breaking bug if you'd like (I recommend testing your game BEFORE you upload though).


    As for age, I'm sure you have to be at least 18 to actually receive the money that you made from Kongregate.


    Congrats! I've only got about 488 plays on mine.
    Edit: Tried it out, gave it a rating of 5 ;)

    All of the Infectonator games (if I found all of them that is..) add up to 11,075,255 plays. That amounts to $11075.26! They're great games so that's awesome that they got so many plays.
     
    Last edited: May 31, 2013