All posts by edmund

all about me

Objective-C Singleton Class

Using this SynthsizeSingleton.h to create a singleton class in obj-c.

Include the .h into project.


into the ClassName.h.

And add


into ClassName.m.

That…should be about it. Unless i missed some stuff out…. will look over…

oh You can then call the class by using

[[ClassName sharedClassName] someProperty];


Cocos2d Pop Scene With Transition

Pasting this here for my future reference. Originated from the cocos2d-iphone forum.

Add this to CCDirector.h, just after the declaration -(void)popScene (line 402):

- (void) popSceneWithTransition: (Class)c duration:(ccTime)t;

Then add this to CCDirector.m, just after the definition of -(void)popScene (line 768):

-(void) popSceneWithTransition: (Class)transitionClass duration:(ccTime)t {
    NSAssert( runningScene_ != nil, @"A running Scene is needed");
    [scenesStack_ removeLastObject];
    NSUInteger c = [scenesStack_ count];
    if( c == 0 )
        [self end]; 
        CCScene* scene = [transitionClass transitionWithDuration:t scene:[scenesStack_ objectAtIndex:c-1]];
        [scenesStack_ replaceObjectAtIndex:c-1 withObject:scene]; nextScene_ = scene; 

You can call the method like this:

[[CCDirector sharedDirector] popSceneWithTransition:[CCSlideInRTransition class] duration:0.5f];

First RotaPix Website Review

Yay, first website review and its a rather positive one. Helped bumped up download counts in the US quite a fair bit (compared to the first 3 days). Think of more ways to spread the love. Multiplayer mode is still being developed (more like… researched), but a update to RotaPix will be soon. Fixed support for older device and shopped a whole bunch of the current pictures to ensure no dead pieces (single colored pieces). Will tweak the timer countdown a little, and hopefully at least have a twitter/fb sharing function by this update.

Looking at the schedule, I guess multiplayer will not make it to the store until 2013 :O (itunes connect is not operating from 22nd to 29th Dec >_< ).

Will still have to carry on monitoring the markets acceptance of this game before I decide what direction to take next.



RotaPix Submitted

After almost 2 months since the idea hit me, the game is now finally submitted to Apple for review. DROP is now trailing behind, partly because I took a hit as another Singaporean Company had released a game of the very same game play as mine. I snoozed, i lose, will have to keep this in mind. I will carry on with DROP once ROTATE (RotaPix) gets its next update of achievements, IAP and multiplayer which I believe are important to make the game appeal better to the players.


and here’s a link to RotaPix page. Will later add link to App Store once it gets through Apple.

Adwhirl and Cocos2d-iPhone

I had previously meddled with iAd implementation in a cocos2d project before, so implementing it in ROTATE (a game project in progress) was simply copy-pasta. Then an issue was discovered as I researched into mobile ad networks: iAd is not as efficient as I hoped and it is not available for apps worldwide (it is limited to some countries as of now). Since I am looking to release both DROP and ROTATE to be free and ad-supported games, I need an effective solution. Adwhirl, that’s what I came across. It mediates ad banners from different networks and put them into your app.
Continue reading Adwhirl and Cocos2d-iPhone

Game Center: Leaderboard

My project Drop, which has been in development for almost a year, is being stalled due to various reasons. Pretty much stuck on the artistic side of stuffs, but it will be completed. Meanwhile I have already began work on another game project, one thats based on a much simpler premise and I foresee a development time of no more than a month.
Continue reading Game Center: Leaderboard

New SDK, New IDE

Upgraded my iPad2 to be using iOS5 and realised I needed the new SDK in order to build to a iOS5 device. After a 1.6gb download and install, I was faced with a shiny new XCode IDE. Fiddled around a little around to oriented myself with the new IDE. Cleaned the build and built to device, yep, no issues. Problem came when I tried to build to a iOS4.0 Simulator, fatal error.

dyld: Library not loaded: /usr/lib/libc++abi.dylib

Issue and solution highlighted in the following forum thread :

The Background

Due to various circumstances, the graphical design of my project, “Drop”, shall mainly lie in my hands. Yes, this programmer is going to do designing, but its for something that I wish to put out, so it has to be done. Armed with only my macbook, the internet, Pixelmator, a mouse and whatever placeholder art assets I had in place, THIS, is what i came up with for my game’s main gameplay scene’s background.

I am thinking of removing the “TOUCH HERE” text and had it coded in instead, as I am thinking of making the text scroll left, together with some other flavor texts, just to let this scene seem a little less static during gameplay.