I have an app that works on iPad 1st gen. This is a game, made using cocos2d framework.
The first iPad does have 256mb ram and using instruments(the memory monitor tool) i was able to determine that the app works at around ~90-110mb ram on the device (well lets just trust "Physical Memory Used" chart though the "Physical Memory Free" at the very beginning shows it is ~128mb free and then gets to ~3-4mb free after playing several levels and never gets higher)
So while it does have enough memory it caches the assets and when it runs out of ram the cached assets get released.
What i did is added the high res graphics to it. Almost all of the assets are loaded as 4bit assets so say if i have an asset 100x100 pix it will consume 100x100x4 = 40000 bytes ram; the same hd image will be 200x200 pix and will consume 200x200x4 = 16000 bytes ram; which is 4 times bigger!
So the question is - will it work fine on iPad 2 hd screen which has 512mb ram?
See if i multiply ~110mb*4 it will be ~440mb, what means it will be 512 - ~440 = ~72mb left for system. So i do not know if that is enough for system and it won't close the app. I am not sure but i think the 1st gen iPad may give around ~120-130mb ram for the app and then will close it. So that makes me think this won't work on the iPad2. Am i likely correct?
ps: i've tested the app on the 3d gen iPad which has 1gb ram and it runs just fine
The iPad 2 has the same screen resolution as the original iPad, so it will not use the new retina artwork that you are adding to the app. This means it should run fine on the iPad 2 if its already running original iPad.
The iPad 2 does not have a retina screen, so the physical resolution of the iPad 2 is the same as on the iPad 1. Only do the retina style images on a device that supports it, this way you keep memory low on device that can't handle the retina resolution.
Related
iPad Pro simulators are so slow that they become practically useless when running my cocos2dx game. Theoretical FPS displayed is 60, but all animations take minutes instead of seconds (e.g. 30 seconds instead of a fraction of a second).
I made sure 100 times that Slow Animations are turned off on my simulator.
I've found this topic: iOS Simulator games run very slow (low fps) where the reasons for possible poor simulator performance are explained, but:
First, I can't deduce HOW slow their simulators are (they complain about bad FPS, my theoretical fps is good (???)). I'm getting the impression that they are able to test something while I am not
Second, I need a solution to this problem as I need to test my stuff on an ipad pro 12.9 inch and I don't have the funds to buy one for tests now :) . However, I am thinking on getting a better macbook.
I am using Macbook Air 2014 with 4GB RAM. Do you think this might be the reason? Can anyone tell me whether they are using ipad pro simulators when testing their games (Cocos, Unity, SpriteKit?), and if you get decent speed, then what are your Mac specs that might affect performance (processor, RAM?)
The simulator is not a device and it's performance varies depending on the machine you're running it on, but also the type of device you're simulating.
The iPad Pro devices are both large and have a retina display. The simulator has to process 2732 x 2048 (12.9" 5.6M pixels) and 2048 x 1536 (9.7" 3M pixels). The iPhone 6/6plus and later models have similarly high pixel counts. This takes a lot of CPU+GPU power to render all those pixels.
Your Macbook Air is decent, but it's screen has a much smaller resolution than the simulator and its GPU was chosen with its smaller screen-size in mind. The integrated intel graphics aren't that performant.
If you can test out running the same game/app as a Mac application instead you should see better performance.
My advice:
Use 30fps during daily testing (or when in debug mode) director->setAnimationInterval(1.f/30.f);, if your game requires 60fps for its gameplay then you may want to look into other options.
You can also add one of the non-retina iPad simulators for testing. iPad Mini or iPad 2. Test on the Pro simulators periodically only to check for any positioning/scaling issues.
Render to a small(er) frame buffer and then render the frame buffer scaled up into the final screen buffer.
It is always recommended to get an actual device when doing mobile development as the simulators/emulators don't provide real world performance characteristics.
Even though it's not what you're asking I'd still repeat the key point in the linked answer: Only worry about performance when running on an actual device, and find a way to not have it affect.
I made an iPhone app using Apple's SceneKit. On iPhone 5s the app runs with 60fps with very occasional drops to 40fps (I think that happens when not much is changing in the scene). I tried to run the same app, made absolutely no chnages to the code, on an iPad 3 and the app has a huuuuge lag. fps never go above 16. I was comparing the gpu models of 5s and iPad 3 and they are both A7. Why am I experiencing such drastic drop in fps? Is this a hardware problem and I need to lower the graphical intensity of my app?
Edit: the iPad is 3 years in use iOS9, 5s 7 months and runs iOS8.4
They have different GPUs and CPUs.
The iPad 3 was the first with a retina display which means 4 times display resulution over the iPad2. The Pad was quickly replaced with the iPad 4 wich had a stromger GPU with higher clockspeed. Btw the iPad 3 had aARM-Cortex A9 CPU with 1 Ghz and the iPad 4 came with one of Apples first oen CPUs called Apple Swift running at 1,4 GHz.
As for your scene. Might be best if you create less objects on that device or exclude it from the compability list.
I'm developing a game that requires a decent amount of memory. I've optimized it for basically every iOS device that can run 8.0+, except for the iPads with 512MB of RAM. Do I have to support the iPad mini, or could I write a disclaimer stating that it won't run that device. Or is there some way that I can half the size of every image that is loaded by code? What is the best way to go about this?
I make a game on iOS, but on iPhone 4/4S, crash due to memory pression.
The Image is a map that the retina size its 4MB. I have it in two small parts (For design proposes), of 3MB and the other of 1MB.
I know they are kind-of big images but not enough to crash, the weird part its that when it loads on a UIImageView that loads on a UISCROLLVIEW it expands to 50MB (I check it with instruments).
on those phones, that its killing me, because if I consume more than 100MB apple kill the app, and its just the map, then I load the gameplay.
How can I handle this, why 4MB expands to 50MB. All my assets are 70MB (iPad, iPad Retina, iPhone & iPhone Retina)
Edit:
I have 2 posible solutions:
1-. Disable #2x on iPhone 4/4S (I don't know how to do this)
2-. Tiled the map in like 1000 small pieces of about 100px x 480px. and load it while the user it's scrolling?
What do you think?
Thanks
I am developing an iphone application and i am using a background picture for my app. I know that before iphone 4 , the resolution of the screen was 480x320 and after 960x640. I read that i should use 2 images like : MyImage.png and MyImage#2x.png with the 2 different resolutions and the app will know which one to choose according to the phone. My question is very simple. If i just use the 960x480 , whats the difference? I am developing on an iphone 3gs and i am using this resolution and everything works perfect. So why have a small resolution for these phones?
The difference, in my opinion, is the following: the phone is going to resize the doubled-resolution to half the size, and this will lead to (1) the final image is not as smooth as if you would have exported it from a image application like Illustrator or Photoshop - at least from my own experience, when I export both resolutions, in non retina devices, the images don't look as good if I had exported the normal resolution. Also (2) the device will waste time/performance to make this conversion, although I don't know how much it is significant. And (3) finally, you may overload memory with no need, considering that the doubled sized images are bigger files, and you could use smaller files instead.
If you don't mind about this issues, you can go ahead. Try yourself.
If nothing else, the high-resolution images will tax the memory much more. One full-screen image at 320✕480 is around 600K in memory, whereas the 640✕960 is almost 2.5M, four times as much. On the older devices the memory is much more scarce than on the new ones and you might run into problems later in the development cycle, when there are more resources in play.
Even if you are able to test the app on all older supported devices and you can guarantee that there are no immediate performance problems or visual glitches, the app will take more memory, forcing the OS to kill other apps more frequently (= worse overall user experience).
if you use one version of image, (960x640) , there will be a memory overhead when the app run on non-retina. you dont need to display the high res in non-retina, only in retina display, making two versions of images .png and #2x.png will tell ios which image version it should load, depends on what device is currently in use.