Idiot cardgame for Facebook
Posted: Last updated:A couple of years ago I created a simple javascript version of the cardgame Idiot. It was very simple, no animation, tracking of scores or anything like that. Still, it got a few users, and there was some activity on it every day. A few months ago I wanted to learn some new technologies. I wanted to try Google App Engine, learn more about jQuery and try creating a Facebook app. So, I decided to use Idiot as a test project and create a better version of the game.
I worked on it on and off for months. No pressure to finish since it was just a hobby project. And finally, on November 18th I launched the new version at https://cardgames.io/idiot/ and at http://apps.facebook.com/idiot-cardgame/ to play it within Facebook itself.
UPDATE 24.05.2011: Because the game is better known under the name Shithead I bought a new domain for that, shithead-cardgame.com. Unfortunately both Facebook and Google App Engine were unhappy with a domain with profanity in the title so I forked the code and made a simple anonymous version that's not a Facebook app. Go there to play shithead card game online.
The new game has animated playing of cards, shows your avatars and tracks statistics. You can also choose cardbacks and cardfronts, animation speed and some other options, and there is a High scores page which shows the 10 best players.
Now, 6 weeks after launch it has about 250 registered Facebook users plus a lot of anonymous users. I wanted to allow anonymous play as well instead of forcing everyone to give their Facebook credentials. However, tracking of statistics and saving preferences requires Facebook registration. There are around 6-700 games played every day and the computer player wins around 45-50% of them.
All in all I'm happy with the game. I've been adding a few small features and fixing bugs since launch. The next major feature I'm planning is the ability to play against your friends. The newest App Engine SDK includes support for Comet style connections which would make this a lot easier than it was a few months ago.
Finally, some lessons learned:
- Create your basic game engine in vanilla javascript and use events (or callbacks) for rendering the actions. I did this and can run games for testing in a simple command line script, which is really nice while you're developing the basic game.
- Make the human player and the computer player implement the same interface, and let the Game object be ignorant of which player is which. This gives you the ability to play two computer players against each other during testing, which helps a lot if you don't want to actually play the game thousands of times during development. I even have hidden options to do this in production so I can just watch an animated game play out.
- Facebook SDK documentation is complete crap. Best resource to test things is http://fbrell.com.
- App Engine regularly throws errors when connecting to the Datastore. Not all the time, but it is something you have to plan for.