Cocos2d-iPhone and a start
Well during Christmas and my holiday break at my parents I did a fair bit of reading up on iPhone development, and game development for mobile devices, iPhone in particular. I got a new book which I have only skimmed through so far but seems pretty interesting and has some good ideas in it which should help during the production of my app.
I have started to get the hang of using Xcode after using it for a longer time now. I’m not overly keen on the Interface Builder however as I’m using Cocos2d-iPhone I shouldn’t need to make much use of Interface Builder. I feel that after really learning how it all works and what does what then it is a really powerful tool, however currently it just seems to be quicker for me to hand-code what I’m trying to do. This could be a stupid idea on my part but only time will tell.
My application has started to take shape finally after a few weeks of sitting in a state where I could register taps on the screen as screen co-ordinates in console, which seems to be pretty much game development 101 sort of stuff. Now moving on a bit from that I have (with a bit of back down to earth help from my dad) managed to get a virtual 20x20px grid working in my touch layer of the game so that a touch within a certain 20x20px cell is registered as one location on screen, for example, if a user touched the screen at screen co-ordinates (3,19) then that would be cell (1,1) in the console, however if a user touches (25,19) then that would be grid cell (2,1).
This has taken me a while to get working as for some reason I completely forgot that screen co-ordinates are only numbers, and there can only be a certain amount of pixels on the screen, once my dad had reminded me of this fact I was away and could finally get my grid working. Currently the only thing it can do is log the start location, end location, and also track a drag through the grid cells to the console.
The next step for me is to get a 20x20px sprite to stick to the location where the user has tapped but to use the grid cell as its reference, for example, if cell (1,1) is screen co-ordinate (0-19, 0-19) and a user touched (13, 5) then the sprite would not use (13, 5) as its anchor point, but instead will use (0, 0) as its anchor, sprites should anchor from the bottom left corner using this method. Once I have a single sprite working I will then look into getting multiple sprites working at once, and then onto tracking a drag work either placing a sprite or removing an instance of one depending on where the user has dragged their finger.
Once I have this working I’ll actually get around to posting some example code in a short post soon.
Popularity: 11% [?]

Hey im fresh on here, I came accross this site I have found It incredibly accommodating and its helped me loads. I should be able to give something back & guide others like it has helped me.
Cheers all, Catch You Later.
Hola! I came across your web site while i was on Yahoo researching some recent Twitter trends to discover what’s been popular recently. Hung around a little to check things out and read a few of your articles… first rate stuff. I will be sure to return in the future some time and catch up.
Leave your response!
»
Moving sucks
Well I’ve been pretty busy these past few weeks after the realisation hitting that I’m not going to be able to stay in Lincoln after the tenancy on my student house is up due to …
»
iPhone App in a day – Warm-Up Weights
After spending a while sorting out my MacBook Pro with all my audio software I needed a break from that so decided to challenge myself into building an iPhone application that I personally would find …
Follow me
last.fm
Archive
Blogroll
Tag Cloud
Andy Reader App-in-a -day Audio engineering Auto-Tune Celldweller Chris Sands Christmas cocos2d content management content management systems CSS Digital signal processing dissertation Drupal Ebullient Ebullient studio General government grid HTML Interface Builder internet iPhone Japan Ken Myers Lincoln MacBook Pro Mantis MP3 musician Objective-C PHP Pitch correction privacy Pro Tools ProTools engineer Reading Remix sound engineer subversion The Pavement University Wi-Fi Xcode