Jump to content

API integration, anyone else hate it ?


Recommended Posts

If you think about it all the client APIs are looking out for much the same game events:

  • game start
  • level complete
  • player score
  • game end
  • etc

I've found the simplest thing to do is make each game dispatch events to a generic client API handler at these points. Then whenever I configure a build for a client with a new API I just have to add their function calls in to the existing generic client API handler, which takes only a few minutes to do. 

Where it potentially gets more complex is when you have to expose methods of your game to calls from the client side like sound on / off, pause / unpause. But then if you get it working once you can just copy that across any future games.

Link to comment
Share on other sites

The APIs that require users to log in are the hardest to implement, sending a http request to /login.php and waiting for the response, checking the response, updating the game, ugh.


That aside, the only APIs I have used is the gamejolt api, for their user logins, leader-boards, high-scores, achievements, etc... 

and the clay.io api, for advertisements, leaderboards, and stuff. 


Haven't done any games yet that require user payment. I can only imagine the horrors within... : /


That said, I've never sold a html5 game before, so I can do whatever I want with it. ( yay )

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...