In all of my past iOS games I have had the game set up as a simple View-Based Application with one view controller, .h file and .m file. I set up an NSTimer
set at 30, 40, or 60 frames per second that called the main run loop. Later into development, I split up graphic updates (at a higher FPS) and game calculations (lower FPS) to reduce lag. I never understood how to implement multithreading/concurrency in games as the graphics and computations are dependent on one another...
Given that I have never had the opportunity to read the source code of a "real" game, am I setting it up in a reasonable fashion, or am I taking a totally wrong approach to the main framework of the game and run loop?
I ask this because I have noticed that my apps have a lot of lag compared to other apps on the App Store (for example, my app lags horribly on an iPhone 3G, yet Doodle Jump, Fruit Ninja, Cut the Rope, etc. run relatively smoothly).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With