Sign In Register

How can we help you today?

Start a new topic

JavaScript SDK

Seems like there are some service calls missing from gamesparks-functions.js, and I think some improvements could be made to the API, error handling, etc. Can you put the Javascript SDK on bitbucket so we can fork it/submit pull requests?


ah.. looks like you updated it in Dec which fixes the onError issue, etc. Thanks for the update! (Still, if you can post it to a bitbucket/github repository it would be much easier to stay up to date and post suggested changes.) 

Hmm.. looks like error handling could still be improved even after the December update. For instance, when it gets this WebSocket Message back (from an invalid secret):


WebSocket onMessage: {"@class":".AuthenticatedConnectResponse","error":"VALIDATION FAILURE","requestId":"0"}


The message handler doesn't check for the "error", so the onError callback never gets called, and the error flag isn't set... therefore it gets into an unending loop because the websocket close event always calls connect() again (when the error flag isn't set), even though its guaranteed to fail.


Can I submit a pull request somewhere with a fix for this?

Is the SDK mentioned in this thread a lot different from the one which supports Node and seems to be more up to date? Found here: https://bitbucket.org/gamesparks/gamesparks-node-server-sdk

I want to use JS for dev tools from command line, not from a browser game client.

Login to post a comment