Saving games on Kongregate

9 posts

Flag Post

So, after inadvertently deleting my 7+ hour save of Epic Battle Fantasy 3 (for, I believe, the third time now), it occurred to me that at least one game has the option to save your progress to your account. That game being Enigmata 2: Genu’s Revenge.

I’m curious to know why so few games seem to adopt this approach, although maybe you’d need to create a different version of the game if you wanted other sites to host it as well. I imagine there might also be an issue with server space if every game had save data linked to an account.

What goes into linking a save file to an account?

 
Flag Post

ShareObjects.

filereference save files.

 
Flag Post

While qwerberberber’s suggestion is great for local save storage, if you want the save to be tied to an account (like in Enigmata 2), you’ll have to use Kongregate’s Shared Content API to hold the save data.

Here are the basic steps to accomplishing this:
1) Collect all relevant data and put/encode it into a string.
2) Upload it to Kongregate using the Shared Content API.
3) Download the data (still as a string) at a later time from Kongregate (again, Shared Content API).
4) Parse/decode the save data from the downloaded string.

The difference between using the Kongregate API and Shared Objects is: if using the Kong API, all the save data must be stored in a string on uploading and parsed back into meaningful content on downloading.

Also, the Kongregate API saving method would not be possible on other sites unless they offered a similar API for data transfer, but I think shared objects also suffer from this problem.

 
Flag Post

Do Kongregate approve of using the ‘sharing’ API to store single player information like this? If so it seems like a good approach for Kong-exclusive games. (It’s pretty easy to save an object as XML which can be streamed to text, as long as you’re saving numbers and text in the leaf nodes, which SOs generally are.)

I’m curious to know why so few games seem to adopt this approach, although maybe you’d need to create a different version of the game if you wanted other sites to host it as well

I think you answered your own question there :) but it would be fairly straightforward to save to SO if the Kong API wasn’t available.

 
Flag Post

i’m not sure any of you have answered what he was actually asking, which was “why don’t more games save to your Kong account” (rather than “How to save to a Kong account”).

the answer is pretty much that it’s more difficult to save to a Kongregate account rather than to use a SharedObject.

 
Flag Post

Is there a way to save content privately through that API? If not that would really explain it :p

 
Flag Post

It should be easy enough to save the user’s Kongregate name with the file, and (on load) check to make sure the user’s name on the save file and the current logged-in user match.

 
Flag Post
Originally posted by BobJanova:

Is there a way to save content privately through that API? If not that would really explain it :p

Yes – at the very least, users can mark things private.

 
Flag Post

Yes, you can use Kong’s Level Sharing API for saves. But Playtomic’s is probably better for this, because it can be edited after being saved.