Hey, you’ve got to hide your love away

50 years on and the Beatles still sound as fresh as they did when they first released that record. But extrapolating John Lennon’s demeanour from the 80’s would now pitch him somewhere in the region of a cantankerous Naom Chomsky with an inferiority complex. Sorry, I was always more of a McCartney fan.

I can imagine Paul using Facebook; sharing his status, his photographs, his youthful inspirations: Constantly. John, I could see hurling out acerbic barbs like shurikens on Twitter. Ringo wouldn’t care about any of that nonsense, he married Bond girl Barbara Bach. George, ever the voice of reason, searching for a higher plane, would be trying to unify everything using some aggregation platform.

George was my favourite Beatle, I think he wrote the best songs and I’d be with George, I want to unify all these channels so I don’t want to worry about who posts where using what: I just want the stream.

Therefore, when it comes to writing a game that accesses this information there are some interesting choices: Do you post to Facebook, Do you post to Twitter, Which friends list do you use, Should you use OpenFeint, what about Google’s new Facebook killer how do we incorporate that, what about the oldest social stream of all, email?

A friend, Mark Delaura (Google’s Game Developer Advocate) just wrote a piece about the demise of the phrase “social game” http://www.satori.org/2010/08/the-demise-of-the-term-social-game/ but the piece is really about the need to make use of social graphs and the need to have an abstraction to let you get to the data without worrying about the mechanics of it, as per the questions above.

What will no doubt occur is a server based API (it has to be server based as all the underlying social services are in a state of flux, witness the number of times Facebook changes its API) therefore a server based abstraction will let the developer get on with the job of worrying about their game and not the protocols. This is what has largely happend with graphics and sound, although when you want to do something at a lower level you exchange convenience for a more inflexible but more precise implemtation.

This project will also produce a server based API to deal with social graphs and I think I’ll release parts of it as I go along to see if any other developers can make use of it. I think this sort of middleware needs to be open sourced and away from the main providers of social graphs, not that I’ve anything against them, just they may well come and go (Bebo, Friendster, MySpace, even Google aren’t immune to this Say Hello, Wave Goodbye Google Wave), but the game development community I suspect will carry on as it always has. Essentially, as a developer you don’t really care to access 10 different APIs to retrieve the user’s friend list, you just want a single abstraction such as:

FriendList usersFriends = SocialGraph.getFriendList(user);

Where usersFriends is a collection of that user’s friends across multiple social networks, a Friend object could then provide more granular information such as flags to see what networks they’re on, e.g. boolean Friend.onTwitter which could be used with the current user’s preference as to which networks they read and write from e.g. boolean User.useTwitter. You could argue at this point that the abstraction should be more abstract and the API shouldn’t expose the physical network, but  I think you’ll have to compromise somewhere. What the developer needs is a nice interface that doesn’t change in a way that will break what they have implemented in the past so they can code against without worrying about the underlying network API changing a la Facebook.

If you’re reading this and want to use the social networking API we’re developing just drop me a line.

Leave a Reply