Monday, November 21, 2011

Check list for all future projects

I like to slowly build up some sort of template/check list which I can follow and gradually improve on every future projects to make sure I don't miss anything important and sort of maintain a standard for the quality of work.Things I can think of at the moment listed as below, will keep updating this list:1. Handle device rotation properly2. Test for memory leak3. Handle different devices correctly - including icon, launch image, size of sprite, screen resolution, ...etc4. Save game state/data on different scenario5. with sound/audio6. proper menu/high score 7. help/tutorial 8. [future] Game...

Things learned from "iLabyrinth"

Was reading the code of iLabyrinth game by UD7 Studios and learned quite a few things worth written down even though only looked at a few files:1)The way they handle the loading of different sprite/map files according to different device/resolution:2) The "isDeviceIPad()" is a macro defined as below for detecting if the device is an iPad, very handy.static BOOL isDeviceIPad(){#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 30200    if ( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad )...

Tuesday, November 15, 2011

Malware detected in iphonedevsdk.com forum by chrome 14.0.835.202

I got a chrome session with iphonedevsdk.com forum left overnight, and this morning when I look at it, Chrome says "Warning: Something is not right here!" and the content talks about malware. The chrome version is 14.0.835.202, wonder if the forum admin guys aware of this, probably some sort of injection atta...

Monday, November 14, 2011

5th Open Source Game (1st in Cocos2D) - Dice in Cup

Finally got 5th Open Source Game (1st in Cocos2D) "Dice in Cup" all done (or in other words - sick of working with it and wants to start another new one :-) ). The source link is at the end of this post.As I mentioned before, I purposely picked this simple game idea to have a chance to get familiar with Cocos2D.A high level flow of the game from code's point of view is as below:1. Game first started, "init" calls "initialiseGameVariables" which set "GameState" to "kGameStateStarted"2. "init" creates...

Strange error in Xcode 3.2.3 "texture_ undeclared"

While still working on the project, I copied the "Dice in Cup" project (with Cocos2D 1.0.1 and named "Cocos2dDiceInCup") from my MacBook Pro (which the project runs perfectly with Xcode 4.2/OS X 10.7.2) to a test VMWare box running Xcode 3.2.3 on OS X 10.6.4, strangely it won't compile at all. As shown below, keep complaining about "texture_ undeclared" error. If I right click on "texture_" and select "Jump to Definition", as below you can clearly see "texture_" is properly defined in CCSprite.h",...

Sunday, November 13, 2011

Almost ready - 5th Open Source Game (1st in Cocos2D) "Dice in Cup"

Sort of "almost" finished my 5th Open Source Game (1st in Cocos2D), still working on code tidying at the moment - hopefully this won't break the code :-)...Although I called it "Dice in Cup" - which is what I first intended to do - it now looks quite different. The "Dice" is now actually the "Seeker" image from Cocos2D, and the "Cup" is actually a ugly green rock image I created in Inkscape in 5 minutes.It's a very simple game and everyone can easily understand it within seconds. Though it's quite slow and simple at the beginning, when you reached level 9 and above, the cups move really fast and...

Saturday, November 12, 2011

Strange behaviour when method in "@selector" missed a parameter

I was reading and trying some of the code from this article (Cocos2D iphone tutorial: Die, Grossini, Die! – Part I) about some basic Cocos2D stuffs. One of the things I have is to create a clickable "Restart" text as below:-(void)stateChange_gameOverDisplay {        CCLOG(@"inside stateChange_gameOverDisplay");        [CCMenuItemFont setFontName:@"Marker Felt"];    [CCMenuItemFont setFontSize:30];    CCMenuItem *play_menu = [CCMenuItemFont itemFromString:@"Restart" target:self selector:@selector(restartGame:)];  ...

Monday, November 7, 2011

Cool! Face Detection in iOS5 works even with Johnny Deep's multiple eyes photo!

Was following this example from ManiacDev.com which as below quickly detects the eyes and mouth in a few seconds time and highlighted all of them.I then quickly tried it with the Johnny Deep's multiple eyes photos and it sort of works too! Except the left side picked up the wrong one, not bad isn't ...

Page 1 of 66712345Next