To give your users the best experience, follow these easy guidelines.

Let Users Decide When to Send Data

When submitting scores or saving player data, wait until a player clicks a button to transmit data. One exception is auto save. However, players often prefer manual saves if it means replaying less levels again.

Offer Guest Features

local save example

When a user is logged in, show them their nickname so they know they are connected. For a guest, show a login button and a message that indicates what the login is for. For some live examples check here and here.

Use APIs Sparingly

When developing your game, always try to minimize requests to external APIs. Avoid unnecessary calls, check your browser’s network tab to detect bugs that cause API calls to repeat, etc. Always remember, 1000 players will make 1000 times more API calls, so amount of calls grow as your game grows popular.

If your game makes several calls per minute or less, it’s good. If it makes a call every few seconds, it is too frequent. In worst cases, too frequent API calls may get handled as service abuse, which will end up with call throttling or disabling API for the game.

By making you games efficient, you also save energy, trees, and reduce global warming, so this is always a good choice.

Handle API Errors Gracefully

Whenever your game makes a remote call to some API, keep in mind that this call can fail due to multiple reasons. Player may have now or very slow internet connection, servers might be experiencing overload, etc.

Always check if remote calls were successful and display appropriate errors, for example, if user_data/submit request has failed, you should warn player that game could not be saved, otherwise someone may be disappointed after playing for a while with lost internet connection.

Next Step

It’s time to start coding. Choose the langauge your app uses from the left side menu.