Received memory warning. Level=2

Monkey Targets Forums/iOS/Received memory warning. Level=2

anawiki(Posted 2011) [#1]
Hi
Our game is working on iOS (except issue with music), but during start up I get the message in debugger window:

Received memory warning. Level=2

Sometimes it's Level=1


It doesn't crash the game and happens only at setup stage.

Any ideas what can it be?

cheers
Roman


anawiki(Posted 2011) [#2]
Answering myself:

http://stackoverflow.com/questions/2915247/iphone-os-memory-warnings-what-do-the-different-levels-mean


Looks like we need to use less resources :D


therevills(Posted 2011) [#3]
What device are you testing with? Ive only seen level 1 on a 2nd Gen iPod.


anawiki(Posted 2011) [#4]
iPad 1st gen. We use a lot of art. At the moment I am packing whatever I can on single texture files to save ram. On PC or Mac it didn't matter.


therevills(Posted 2011) [#5]
Ahh - looking at the wiki the 1st gen iPad has 256MB of RAM, I've been testing on a 2nd gen iPod which only has 128MB of RAM!

Yeah texture atlases seems the way to go for mobile devices... are you using DrawImageRect to draw the images afterwards?

What version of XCode are you using?


anawiki(Posted 2011) [#6]
I'm using xcode 3.2.6. Yes, I'm using DrawImageRect. The hardest part is to decide what pictures to put on one texture to save on texture swaps and texture size.