Game Development Reference
In-Depth Information
some memory right now. It's like your mom threatening not to buy your new computer
if you don't clean up your room right now! Please oblige.
Cocos2d and Kobold2D automatically free memory by calling the
purgeCachedData method whenever the AppDelegate class receives an
applicationDidReceive MemoryWarning message.
If you're developing on a device with 512MB or more memory, keep in mind that a
great number of iOS devices are models with only 256MB. It's a good idea to have an
actual device around from the oldest generation of devices that you aim to support. You
might want to buy a cheap, used, third-generation device to test your game primarily
with that device in order to catch memory warnings and performance issues early in
development. That's when they are still easy and cheap to fix, especially if they require
a change in the game's design. In general, it's advisable to use the device for develop-
ment that's the weakest one available to you in terms of hardware capabilities.
You can measure the memory usage of your app using the Instruments application, ex-
plained in Apple's Instruments User Guide:
strumentsUserGuide/Introduction/Introduction.html .
The iOS Simulator
Apple's iOS SDK allows you to run and test iPhone and iPad applications on your Mac
with the iOS Simulator. The primary purpose of the iOS Simulator is to let you more
rapidly test your application, because deployment to an iOS device takes longer and
longer as your game gets bigger and bigger. Games in particular use a lot of images and
other assets that need to be transferred, slowing down deployment.
However, there are several caveats to using the iOS Simulator. The following sections
reveal what the iOS Simulator does not allow you to do. For all these reasons, I recom-
mend that you test your game early and often on a device. At least after every major
change or near the end of the day, you should run a test on your iOS device to verify
that the game behaves exactly as intended.
Can't Assess Performance
Search Nedrilad ::

Custom Search