As an indie developer, there are 3 options for implementing highscores, achievements, etc.
While OpenFeint supports all your needs, my main gripe with it, is, that it is so unbelievably ugly, that I lack words. I am not prepared to spend 6 months designing a ( hopefully ) great looking game, luring the playing into a dark world of sex, money and insane violence, just to have some YDRK gamescore screen pop up. No way!
Next option would be GameCenter. While it also holds the capacity for great ugliness, it can at least be minimized, and you have much more freedom in design. On top of that, GC is supported by Apple, includes any cool feature you can ever dream of, multiplayer, you name it, and of cause it is for free. How good does it get?
Well, it doesnt work on 3G and older. What you scream in disbelief? Not even the simple highscore parts? No I tell you.
So in my book there is plenty of room for a lightweight scoring and achievement system, which works on all devices, and where you have 100% freedom of how to implement it. Such a system is CocosLive. But there are also drawbacks here.
Main problem is, that the server has been down a few times, or closed down, due to excessive data transfer, and you cant really expect somebody else to pay for your server traffic. But it still is a nice lightweight system. well tested. Easy to use, so what if I could set up my own server? For free that is.
Riq from cocos2D, has insisted that it wasn’t hard to do, but as I know absolutely nothing about servers, App Engines, and Google ( apart from surfing for … hmm … thats for another blog ), I was sceptic. On the other hand, I knew several other indies were interested in doing likewise, so I sat down and tried until it worked, documenting the steps I went through.
This is a completely über-noob take on this, and there might be faster or more clever ways of doing this. But this makes sense to me, and works.
First you go http://code.google.com/appengine/downloads.html, and download the Google App Engine Launcher ( GAEL )
From the first page, select the GAEL for Python, which matches your OS, download and install it. This should be pretty straight forward, and you will be rewarded with a small notebook-looking application, with a couple of icons at the top.
Next download the cocoslive source code ( I think it is )
Open the application Terminal, and enter the following line: svn checkout http://cocoslive.googlecode.com/svn/trunk/ cocoslive-read-only
This black-magic-ninja line, will for some reason download the cocoslive source code to your computer. If in doubt where it landed ( wont land in normal transfer folder ), seach for cocoslive-read-only.
From GAEL, select [File]-[Add Existing Application], and browse to where the cocoslive source code landed. Don’t select the “cocoslive-read-only” folder, but a sub folder just named “cocoslive”
A line should appear, with the name cocoslive, and a path to the source code.
From GAEL, select [Run], and a local copy of cocoslive will launch. Select [Browse], and it should open.
While this is cool for testing when you are offline, I don’t think it is to much use in this case. As we are setting up our own private score server, so we can just as well use that one, no-one will be bothered, even if we break it.
Next step will be to transfer the cocoslive score server, to a Google server, so that the millions of people playing your application, can get access to it.
For that you need a Google account, and register for their App Engine. This is pretty straight forward, and well documented by Google, so I will not go into that here.
When you have an App Engine account, you need to log in, and create an application. It would make sense to name it after your game, but for now I will call it myapplication. When you create it, you need to check if the name is available, and in that process you will see the address, which becomes the address of your score server. In this case “http://myapplication.appspot.com”
Back in GAEL, you click the [Edit] icon, and in the small texteditor that pops up, you change the first line from
application: cocoslive to application: myapplication
After that, the name on the front page of GAEL, will have changed to myapplication
And now for the exiting part :)
In GAEL, click the [Deploy] icon.
If you did everything right, a lot of greek, latin and alien language will scroll down in a console, and if you are in any luck, one of the later lines will read “Deployment successful”.
If that is the case, your own private score server is now up and running, and in stead of “http://cocoslive.net”, you can access it on “http://myapplication.appspot.com”
Final step will be to tell cocoslive where to look for the score server.
Open CLScoreServerPost.h and CLScoreServerRequest.h, and replace “cocoslive.net” with “myapplication.appnet.com”
And that is it.
You now has you own private score server up and running, like all the other huge companies have, and that is kewl. Just ask Sony.