QuickKong - Easy Kong API Integration page 2

Subscribe to QuickKong - Easy Kong API Integration 42 posts

avatar for scrauler scrauler 17 posts
Flag Post

http://www.kongregate.com/games/scrauler/test-cl
New version uploaded!
Everything is ok now!
Thanks a lot.

 
avatar for BlackRece BlackRece 1 post
Flag Post

This class has been added to http://wonderfl.net/c/9rjf

 
avatar for GamesOrNothing GamesOrNothing 9 posts
Flag Post
Originally posted by BobTheCoolGuy:
Originally posted by Isaacsonlinetwin:

what if you use stencylworks

Stencylworks already has Kongregate tools built into it, so no need for QuickKong

What tools? Please help. I wonna add KongAPIs. Such as leaderboards and/or highscores.

 
avatar for lycosluke lycosluke 3 posts
Flag Post

I have added the quickkong to my game. locally it works fine. it traces:

[QuickKong] connectToKong()
Alert: Kongregate API shadow services loaded due to local testing. API will load when the game is uploaded.
[QuickKong] loadedAPI()
Kongregate API: IKongregateServices.connect()
[QuickKong] Kong API Successfully loaded and extracted. Shadow Services alert should appear for local testing

It appears also to sent the stats right and I show also the username (QuickKong.userName). Of course locally it only appears as “Guest”. But when I upload it to kongregate nothing works. the stats don’t show up and it even can’t show the username. So I guess it doesn’t connect. Did somebody experienced something similar lately?

 
avatar for UnknownGuardian UnknownGuardian 8136 posts
Flag Post

Nope, I use it* for GDR and its been working.

Are you sure you are letting the API load before accessing the userinfo?

* Actually use a package with some more functionality I added

 
avatar for lycosluke lycosluke 3 posts
Flag Post

Yea I tried different positions where to load the API but always before I get the userinfo. I tried in the main.as before loading anything else. I tried on first frame in the timeline, I tried in the preloader. And everything works perfectly fine locally but once I upload it to kongregate nothing works. Do I maybe need to publish it first? I only tested it in preview mode. Or is there a debug mode I can try on kongregate ?

 
avatar for dodico dodico 19 posts
Flag Post

I’ve tested quick kong and I it works just fine. I’m just a bit confused as to what this class does that the normal kongregate api doesn’t do? (Other then the fact that it’s implemented into a class)
I’m new to actionscript. Sorry if I didn’t understand.

 
avatar for UnknownGuardian UnknownGuardian 8136 posts
Flag Post

Just a wrapper actually. You don’t have to go and read through the documentation to just load the API. You can just copy/pasta this into a class then run with 2 lines of code.

(Also, it keeps an easy-to-reference static instance for convenience.)

 
avatar for dodico dodico 19 posts
Flag Post

So it’s just basically packaged better is what your saying or?

I’m curious about a few things with the api.
What happens if my game isn’t on kongregate, will it throw any errors or does the api automatically account for that?
Is there anything we have to account for at all that might give us trouble with the api in general?
Also, what other methods of communication with the api do we have? I read only the one that you had listed, and also referenced the normal api awhile ago, it only excepts a positive integer, or?.

 
avatar for UnknownGuardian UnknownGuardian 8136 posts
Flag Post

Yep, better packaged.

If your game isn’t on Kongregate it should load the Shadow API which is the same as what would happen locally. A developer should account for any issues that would happen. I’ve handled a few of the base cases (such as user-id will throw an error, so I’ve put in a default one) but everything else is up to the developer. Fortunately, only the complicated portions of the API (probably kreds, messaging, etc) might cause issues, so I don’t think many people will run into them.

Communications with the API are through the static vars QuickKong.whatever or if the API is ever expanded you can always access the raw api instance through QuickKong.api.

 
avatar for expressionexp expressionexp 3 posts
Flag Post

UnknownGuardian, I was about to give up on API for my first game when I found Quickkong! Thanks so much!!

I loaded my game and it showed a highscore tab but it was blank. I hope that’s okay? Sorry I’m a complete dummy on this. Here it is: Justice Bao and the Royal Unfaithful

 
avatar for UnknownGuardian UnknownGuardian 8136 posts
Flag Post

I’m pretty sure its a Kong bug. A few other people are reporting it too. If the API worked for you locally with trace outputs and you’ve set up the correct variables when uploading you should be good to go!

EDIT Yep: Yer game’s highscores are working:

http://www.kongregate.com/high_scores.chat?game_id=158204

 
avatar for expressionexp expressionexp 3 posts
Flag Post

Thanks! One more question: You added “Access the rest of the API with QuickKong.propertyName”. I don’t know what it is so I didn’t include it. I’m guessing it’s for more advanced features so okay to exclude?

Sorry if I sound ignorant because I am. :p

 
avatar for UnknownGuardian UnknownGuardian 8136 posts
Flag Post

Well, its just example code. You replace “propertyName” with whatever feature of the API you want to access.

For example:

QuickKong.services //access the basic API
QuickKong.chat //access the chat API
QuickKOng.sharedContent //access the shared content API.

So just saying that all parts of the API are available through some QuickKong.x or QuickKong.api.x.

 
avatar for expressionexp expressionexp 3 posts
Flag Post

Thanks! It was really helpful.

 
avatar for molkman molkman 8 posts
Flag Post

This might be a silly question, but I can access QuickKong through every class from anywhere with just using “QuickKong.whatever” and I don’t have to create a reference in order to access it, right?

 
avatar for UnknownGuardian UnknownGuardian 8136 posts
Flag Post

Yep, you can do exactly as you said. QuickKong.whatever from any class after you’ve called QuickKong.connectToKong(stage);