Skip to main content

Play Services

After a lot of work trying to figure out issues with Google and Android SDK libraries, I've got the Google Play Games API working! (by "a lot of work" I mean maybe 3 or 4 hours....I guess that's not so bad)

Based on the results of the votes, the answer sounds like I should go ahead and use the games services to their full potential. Here's a test run of unlocking the first achievement!



This tutorial was super helpful in figuring out how to get started. Although there were a few hiccups that I'll document here in case the answer is helpful to anyone (or myself next time!)

First, I got all sorts of errors with not being able to find the right libraries. As many forums have mentioned, the dependencies specified in the build.gradle file have to match the SDK version that you download using the Android SDK manager. The working combination that folks are recommending as of today (Apr 2015) is the following in build.gradle:

        compile 'com.android.support:appcompat-v7:21.0.3'
        compile 'com.google.android.gms:play-services:7.0.0'

With that, you need to download the v21 (Android 5.0.1) SDK in the Android SDK Manager. Also, you have to scroll ALL THE WAY TO THE BOTTOM of the SDK Manager, and find "Google Play Services" in the "Extras" folder:


Once that is done, I'd either need to recreate the IDEA project file (using the "idea" task in gradle), or manually add the jars for those files to the classpath in IDEA. (I'd recommend recreating the IDEA project file -- I tried adding them manually, which worked for development, but not for deploying to my phone, so I ended up having to build/deploy from the command line).

Also, the example code from the tutorial linked above is out of date for making calls to the games service. As this forum post discusses, instead of trying to use gamesHelper.getGamesClient(), you need to make static calls using the Games class:

   Games.Achievements.unlock(gameHelper.getApiClient(), "(your achievement id)");

Once I did that, I was almost there! The only other thing I had to do was go back and sign my apk with the same production key that I used to create and push the app on the play store. Once that was done, everything just worked!

Comments

Popular posts from this blog

Retrospex 32 Review

RetrospexInternational recently sent me a couple units of their new handheld device, the Retrospex 32, a new dedicated GameboyAdvance emulator handheld.  To make the unit playable out of the box, they pre-loaded a handful of homebrew games, including Anguna, which is why they were kind enough to send me 2 of the units to play with.  I was pretty excited to get my hands on the device and try it (I loved my old GBA micro with a good flash cart!), and see Anguna running on it. So here's my thoughts after playing with it.



Their website lists the Retrospex 32 for £59.99, which is around $100 USD. It seems like it's marketed toward people into retro-gaming (which makes sense for a dedicated GBA emulator device). At that price, with that target market, and such a limited set of functionality (why not make it a multi-machine emulator, and emulate all the old consoles?), it would hopefully do a really good job of it.

The short version of my review: it doesn't. It has one job (emula…

Making the game fun

The real trick for Spacey McRacey (as I'm calling it now) is going to be making it fun.  And that's what I'm rather unsure about at this point.

I have a game design that basically works. The technical issues are mostly sorted out, I just need to get a few more implemented before I can seriously play test it.

But fun? It's hard to know if it's actually going to be any fun to play.  With a 4-player party-style game, it's seems like it might be hard to hit that fine line where everyone is close and competing, where everything feels exciting and tense, as opposed to tedious and boring.  And despite envisioning my game as fun, it might just be boring to play.

Some of that comes down to tweaking it. Tweaking the speeds, difficulties, etc, will make a difference. (If it's too easy to shoot people from behind, then it will be nearly impossible to hold a lead for very long, which could ruin it and make it no fun. If it's too hard to kill the guy in front, it wil…

Killer Queen

So at PRGE, I played an arcade game that just left me amazed.  Killer Queen.

It's a 10-player game. You have 2 cabinets linked together, and 5 players huddled on each one. Each one is a team of 5 people, working together to play a simple one-screen 2d platformer.  But what made it work was the high quality game design.

First, the game is relatively simple, yet there is a lot going on at once.  One player plays the queen, the most important and powerful character on the team. The others start as workers, but can become warriors who can fly around and attack in a very joust-like flappy contest of height.  The real trick is that there are three completely different ways to win: either collect a bunch of berries and bring them back to your base, or ride a REALLY SLOW snail across the screen (while other people try to kill you, and you hope your team protects you), or kill the enemy queen 3 times.  There's some other things going on as well (using berries to upgrade, capturing upgr…