Wednesday, November 12, 2008

Behind the Kong: API checking with "info"

This is the first (And hopefully not the last) "Behind the Kong". I hope to point out little known facts about kongregate, to help users further understand how the site works, and its history.

Anyone who often reads Greg's posts about badge creation will know he checks any game's API before giving it badges. He does this to make sure there will be no bugs, or "cheats" for getting the badges, or problems with receiving them. To Check the API you can add ?debug_level=3 to the end of any games URL. E.G. http://www.kongregate.com/games/Nabb/idle-2-konquest?debug_level=3

If you've done that, you'll notice that when you first 'boot' up the game the chat is flooded with stats, before the chat itself is even loaded. Once the chat is loaded normally after the chat loads the first five messages stored in the server, you'll get a few messages like you see to the left. Noticeably the all important "Hello message received from server" that's the first step to a game having API. (It means that the server is communicating with the game).

Side note, if you get that message you chatlight will be green. (At least to my knowledge, might be a few firewalls that prove it wrong)


Now, as you start to do things in the game you may notice that some messages may "pop up", these are telling you of attempts to communicate with the server. See the first highlighted message to the right saying "Events:27798" that is what the game's API is reporting. (Anyone who has played idle know that you get a new "Event" every ten seconds) So now (Unless the API is faulty) my "Event" score should be updated to 27798. I will know whether it worked or not be further reading the API! As you can see it later reports "Events:success" that means the API was successfully reported to the kongregate servers, and my score will be updated!

You may also notice that any givin game's API may report differently, Idle for example reports "Events" after you get three of them, so your chat will become filled with "info". While so games may only report when you load up, or save a game.

There's plantey more info on Kongregate's Info account!

3 comments:

Anonymous said...

LOL @ you having like 27k events.

n00b.

Thomas said...

I would have over 50,000 if I remembered to save. FYI I forgot to save when I removed the API URL add-on and lost all the events I gained while writing this :P

Anonymous said...

hahahahahaha