Tuesday, January 24, 2012

Adding GameFeed to your OpenFeint Enabled Cocos2d App

In order for us to add the new GameFeed feature of OpenFeint to our Word Crank app on iOS we needed to upgrade to the latest version of OpenFeint, version 2.12.5.  After a few issues with linking errors we were finally running with the latest and greatest that OpenFeint has to offer. Complete instructions for upgrading are included here.

Next we wanted to include the GameFeed component, but only on the home screen.  We used a similar approach to how we included AdMob in the free version.  Some code snippets are included below to help others.

 

[sourcecode language="objc"]
-(id) init
{
if ( (self=[super init]) ) {

CGSize s = [[CCDirector sharedDirector] winSize];

controller = [[RootViewController alloc] init];
controller.view.frame = CGRectMake(0,0,s.width,s.height);

gameFeed = [OFGameFeedView gameFeedView];

[controller.view addSubview:gameFeed];
[[[CCDirector sharedDirector] openGLView]addSubview : controller.view];
}

return self;
}

- (void) dealloc
{
[controller.view removeFromSuperview];
[controller release];

[super dealloc];
}
[/sourcecode]

Do you know a different way to do it? Leave a comment below.

Tuesday, January 3, 2012

2011 in Review

The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.



Here's an excerpt:
A San Francisco cable car holds 60 people. This blog was viewed about 1,500 times in 2011. If it were a cable car, it would take about 25 trips to carry that many people.

Click here to see the complete report.