среда, 8 августа 2012 г.
Some people asked me, what are the good books to start iphone development. Couple of years ago it was a problem for new people like me, since books about iOS programming presumed you had prior programming experience. But fear not, today there are a few that even total beginner to programming can use.
After reading up on some sites I decided to clone a pong game. It has single player mode vs Ai and two player mode on same device. It has music and sound effects! Hardest part by far was complicated collision logic using vectors and heavy nested if statements. For example if you hit the ball with top part of the paddle, it will go up, if you hit it with center it will go to center and if you hit with the lower part it will go down, regardless of angle it came with. That adds complexity and nice feeling of control. It also uses small particle effect when the ball collides with paddle for eye candy. The game was written in cocos2d 1.0