« July 2009 | Main | September 2009 »

August 12, 2009

.NET iPhone development...

Somebody just gave me this link: http://www.mono-project.com/MonoTouch

I wonder if it is any good for game development. Or how it manages form elements. It's to late to apply it to my current project but maybe the next one...


August 03, 2009

how to optimize the speed of your iPhone game

I use quartz for my 2D game, which does not require many sprites to move, in fact I am staying away from pre-rendered images and use only Quartz shapes, and code in any effects also.

At first it was running really slow on my Touch. But I figured out some tricks to make it run smoother. You have a timer, right, that gets called every fraction of a second. Doing all the gameplay  updates PLUS the rendering (setneedsdisplay function) EVERY time the timer is called makes for slow gameplay and unresponsive touch screen. However, using a counter that gets incremented every time the timer method is called and then reset after it reaches a certain value allows for one iteration to do game physics, one to display, and so on. I split the game physics between two iterations.
I also have a second independent timer that updates less often just to measure the time in the game, otherwise the time would be out of sync with the real time. The reason for that is that calling the NSTimer very often yields inaccurate timing because the time it takes to actually run the method that is called by the timer gets added onto the time between timer calls.


So now my game runs almost smooth on the device.

August 01, 2009

If iTunes says: "iPhone or iPod detected but not recognized " then...

...eject any CDs or DVDs from your drive(s), disconnect your device, close iTunes, then reconnect your device. It should work now.

After I provisioned my Touch on the Mac, all of a sudden it stopped connecting to iTunes in Windows, where I have my music library and the device's backup files.

After a lot of googling I found this trick mentioned somewhere, and as silly as it sounds, it fixed my problem

Hosting by Yahoo!