Jekyll2016-07-12T09:47:43+00:00https://suikki.github.io/Suikki devblogMy devblogGoogle Play - Unexpected error (4800403)2016-07-12T00:00:00+00:002016-07-12T00:00:00+00:00https://suikki.github.io/dev/2016/Google-Play-Unexpected-error-4800403<p>Just documenting a solution to an error I came across for other poor souls that may encounter it.</p>
<h2 id="the-error">The Error</h2>
<p>I’m using my own personal google account to access the Google Play Developer Console. I have configured this personal account to have administrator access to a project that is owned by another account.
One day, out of the blue, I started getting an error every time I tried to save something under the Game Services.</p>
<blockquote>
<p>An unexpected error occurred. Please try again later. (4800403)</p>
</blockquote>
<p>I’m not sure what changed and I’m fairly certain everything worked on both accounts before. The number 403 in the error suggested to me that it’s some kind of an authorization problem.</p>
<h2 id="the-solution">The solution</h2>
<p>As a Google search gave no hits with the same error code, I contacted Google support. Their first suggestion was to check permmissions in both the Play Console and Google API Console. Indeed, adding my personal account also to the API console fixed the error.</p>
<p>(Under https://console.developers.google.com/iam-admin/projects I selected my project and added the other account with the permissions I needed.)</p>Just documenting a solution to an error I came across for other poor souls that may encounter it.70 Leaderboards Ought to Be Enough for Anybody2016-06-04T00:00:00+00:002016-06-04T00:00:00+00:00https://suikki.github.io/dev/2016/70-Leaderboards-ought-to-be-engough-for-anybody<p><em>Google Play Games Services</em> allows games to easily integrate stuff like achievements, leaderboards and online multiplayer. It’s the obvious service to use on Android, as almost every user is pretty much guaranteed to have an account ready to use without a hassle.</p>
<p>I had glanced at the API when implementing support for Apple’s <em>Game Center</em> to make sure the same game features would work on both. However, I missed one major limitation: the Google service <strong>has a hard maximum limit of 70 leaderboards per game</strong>.</p>
<p>The game we are developing is a great fit for online leaderboards as the whole idea of the game is racing on separate levels to grind the best possible time you can for each level. This also requires that we have a separate leaderboard for each level. So we are basically forced to limit the number of levels in the game to 70 or use some other third party solution instead of play services.</p>
<p>I also basically wasted 2 days trying to figure out if there was a feasible workaround to get around the limit and still use <em>Google Play Games Services</em>. I finally came to the conclusion that it’s basically not possible without sacrificing the UX. One solution would be adding a separate game entry to the game services for the extra leaderboards and connecting to that separately (but that would ruin the smooth UX with as you would need to sign in separately either by using oauth or using a separate proxy APK).</p>
<p>This basically limits every game like this to 70 levels max. If we want to release more levels after the release we basically have to make it a separate app. I really hate that.</p>
<h2 id="it-might-be-a-long-wait">It might be a long wait</h2>
<p>There really isn’t much I can do but to limit the level count for now and hope that Google improves their service, or start researching using some third party service and hope they are still up when your game comes out.</p>
<p>Also doesn’t 70 seem like a strange limit to use. I would think that the de facto standard for number of levels in a game is 99. Wouldn’t it make a lot more sense to make the limit nice even 100? A better solution would be to add support for leaderboard grouping. For example Apple’s <em>Game Center</em> uses a much more reasonable limit of 100 leaderboards in a group and max 500 total leaderboards.</p>
<p>As a side note: I feel kind of bad for having to say that Google should take a look what Apple is doing. Apple may build great hardware, but the <em>Game Center</em> is just an abomination. Terrible UX (especially for developers), buggy and slow.</p>Google Play Games Services allows games to easily integrate stuff like achievements, leaderboards and online multiplayer. It’s the obvious service to use on Android, as almost every user is pretty much guaranteed to have an account ready to use without a hassle.