Unity Package Size issue - ios

I am working on unity game. For single project have lot of scenes and resources and images files. In android it's working fine. But iOS it's not working. For iOS reduced the Image size as 1k from 4k. Some of the images have the blur issue but app working fine. I changed some of the image alone to the 2k and try to run the app images are not loading. Please anyone help me on that.

check this steps:
try to compress images for iOS, https://docs.unity3d.com/Manual/class-TextureImporterIos.html
do not use textures larger than 2048px
pack your image resources with Sprite Packer: https://docs.unity3d.com/Manual/SpritePacker.html

Related

Keep Image Size Proportional + Work with SVG

Language : Swift 3 ---- IDE : Xcode 8 ---- iOS SpriteKit Project
I use a png image loaded in Assets.xcassets and used in program as SpriteKitNode. I created the project working on iPhone SE Simulator. Although If I run the game on another iPhone or iPad images still stay small. (I have the same image made also for x2,x3). Is there a way to load an image and use it proportional to the screen size?
Also I read that on iOS the best image format to work with is SVG. Does anyone know how to work with it? I tried to load a svg image on Assets.xcassets but it doesn't load. Then I dragged the svg image in my project and still couldn't load it on a SpriteKitNode.
Xcode doesn't support SVG yet. It does support PDF though so if you can export/save your SVG as a PDF, you can import that into your assets catalog and get all the scaling goodness of SVG.

SpriteKit Vector graphics performance

For my SpriteKit game I am using a single pdf vector graphics for my SKSpriteNodes rather than many png sprites for all device resolutions for every entity in the game. the benefits of not having to worry too much about the graphics of the game have dramatically helped but my question is simple, would using vector graphics be a bad idea performance wise?
Wait, you are NOT using a PDF as texture for the SKSpriteNode
Instead you are probably using a PDF into the Xcode Asset Catalog right?
In this case, first of all this is a really good idea and it does NOT impact the performance of your game.
Infact when you load a PDF image into the Xcode Assets (and you set the Scale Factors to Single Vector), you are not using the PDF into your app or game.
As soon as you compile the app, Xcode automatically generates the PNG versions for the several resolutions.
E.g. if you game does support any device running iOS 9 then Xcode
automatically generates the 1x, 2x and 3x PNG (bitmap) images from your
original PDF (vector).
Another great benefit of this approach: if in the future Apple does release a device with a 4x pixel density, Xcode will likely be updated to support that and you'll just need to recompile your app to automatically generates the 4x images.
Answer
So the answer to your question is: NO. The PDF image will not impact your game performance simply because the game is not using the PDF, it's using the PNG instead (even if you can't see it).

How to minimize app size with heavy images in iOS Development?

I am going to work on client application, in which he need to have whole app locally resources loading, and I have almost 70mb images files for iPad. I am going to start development soon but before that I need healthy suggestion and guidelines to reduce my app size with these images use locally. I don't want to make this heavy size like any 3d game? So I am looking for suggestion what should I do? Thanks in advance.
There are few ways:
zip all the image resources in the bundle. On first launch, extract that zip folder into documents directory and refer the image from there only. You will have to do it on first launch only.
create jpeg version of your images with some reduced quality. Apart from icon and splash, you can use jpeg version of images.
If possible, use 1 pixel width/height images for repetitive gradients.

phonegap IOS application size

I created phonegap app for both android and IOS using eclips and xcode4.5
The size of Andorid app is 650KB
The size of IOS app is 9MB!!!
I created empty phonegap app (just did create on terminal) and got the same size
How can I reduce the IOS application size ?
Thanks!
The standard iOS App includes lots of Artwork, e.g. for the CDVCapture plugin.
If you don't use the Capture API (which is likely), you could save 2.3MB by deleting the Capture.bundle in the Resources folder and removing CDVCapture from the Plugins list in the Cordova.plist.
Of course much of the filesize is caused by the various splash screens, icons and maybe artwork you use yourself. There is a very good way to minimize the cost of these. Get ImageOptim and drop your Xcode project folder on it. This will reduce the filesize of your images dramatically (without losing quality). One last step: Xcode recompresses all of the artwork, so they have a bigger filesize again (stupid, right?). Go to the Build Settings tab and type PNG into the search field. Set Compress PNG files to NO.
further reading on imageoptim & Xcode
The whole process should reduce your App by at least 50%, please report back how much you could achieve, thanks.
That would be the retina splash screen images.
10MB is a normal app size, don't worry about it.

Retina Display images looks fuzzy and blurred. No Reason why?

I am a Cocos2d game developer. I am developing a game using retina display images.
I have created texture files with and without HD suffix using zwoptex.
I have added those zwoptex plist texture files in app-delegate like [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:#"Background.plist"];
I have enabled the retina display to YES [director enableRetinaDisplay:YES];.
I have used the png files from the plist wherever i want using ccsprite *background = [CCSprite spriteWithSpriteFrameName:#"sample.png"];.
All those png files which I have included are high resolution images with both sizes 960*640 and 480 * 320. But in no reason the images look blurry and fuzzy when i run the game in simulator or iPhone. Anyone please help me to solve this issue …..
(The following image was posted as an example in a comment.)
cocos2d applies anti-aliasing to sprites by default. You need to turn that off:
[background.texture setAliasTexParameters];
hope this helps.
The screenshot you posted (I took the liberty of adding it to your question) shows that it was taken from the iPhone Simulator and not the iPhone (Retina) Simulator. Therefore it will not use the HD images.
With the iPhone Simulator running go to the Hardware -> Device menu and select iPhone (Retina) as the device. Then restart your app.
Note also that the iPhone Simulator will only render the game with a color depth of 16-Bit, regardless of settings in cocos2d or your Mac. The iOS Simulator renderer is limited to 16-Bit rendering for performance reasons (it only uses software rendering, no hardware acceleration). Only by looking at the game on an actual device can you make judgement calls about image quality.
To test whether the game is actually loading the HD assets or for some reason just loads the SD images, try running it without the SD images. If the game tries to load the SD images it will cause an error. If not, it is loading the HD images and the "blur issue" has a different cause. You could also log which files are loaded by adding a NSLog statement to the CCFileUtil class method fullPathFromRelativePath which performs the file name changes to load -hd images whenever possible.
You'll find that even miniscule amount of scaling or rotation applied to a sprite may have it look blurred, so check if you happen to do that. Any change in blend modes (using ccBlendFunc) could also cause blurred images. Also check that your images are fully opaque (opacity == 255).

Resources