My second iphone game

CatchThemAllV0.1.0

Just finished my second iphone game. While I have not tested it on device yet!!

My first iphone game was taking the accelerometer into game play and this game is all about multi-touch. While it is quite straight forward to play, but it holds the ability of being engaging and addictive.

The game play is to choose the color which is displayed maximum times on screen. There are only 5 colours, but then one has to count the number of times. There is a simple counter runs to show how much time one is spending in a particular question. If the counter reaches 1000, the question changes to the next question and the player looses one point. The interesting part of the same is, each of the colours is assigned a different touch input. That means, if the player has to choose a particular colour, he/she may have to touch with 3 fingers, similarly there are 2 finger touch, 4 finger touch etc are available.
The game play is going to be interesting if you are trying out in device, on the simulator, its a waste and boring thing.
Hope, I will test it soon with a real device and come up with my first experience with it.

Code is hosted at Github and the direct location is here.

Happy Gaming :)

Making random numbers in ObjectiveC, the quick and dirty way.

This is another part of my iphone development experience, where I really feel the pain over and again. So putting up my quick way to do get a random number. There are a lot of methods regarding the random number generation in objectiveC and there are even third party attempts to get the best random number possible.
The three most obvious functions are rand(),random() and arc4random(). While a lot can be heard around of not getting a random number by the first two functions, the last options is better. At least I get decent random numbers with it.
Now to get a random number between 2 points, the code would be

//random number between 0 and 5 not 5, till 4
int i=arc4random()%5;
//random number between 10 and 15 not 15, till 14
int j=10 + arc4random()%5;

Hope that makes my next random number creation search leads me to look at this post.
Happy coding :)