- Home /
Duplication of the scenes for different resolutions ?
Hello, I'm am currently working on a game with all the resolutions for iOS.
Do you know if I earn a lot of size if I duplicate all my scenes for each resolution (I check at the launch of the game on which device is the user to change directly to the good scene) ?
I am not an expert in development and maybe for you it's longer to do this but for me I think it will be faster :) . I just want to know if the size of my app will increase like hell :D.
For instance if I have 40 scenes (40 for IPAD, 40 for Iph4 & 40 for Iph3GS)
Thanks in advance !
I wouldn't worry about it. Go for it.
Don't forget the iPad3 :O
If you duplicates your assets for each resolution, then yes it will takes a lot of space.
Actually I don't see what would be the gain to duplicate the scene, since scene and resolution are not linked to each other.
$$anonymous$$ - as the user says, it's often much easier to just use different SCENES for say iPad3 v. iPad2. Don't forget you literally use different ASSETS for the different platforms. In many cases it's easier to just plain make different scenes (or whole games) than have lots of if-type code.
Dont forget too the screen SHAPES are often different, typically it's all different for each device.
Answer by Mizuho · Jul 25, 2012 at 09:39 AM
Your scenes run off the same resources. Once you load them in a scene, they stay there for all scenes and AREN'T duplicated for each scene. In other words, scenes only references things. They don't create instances of them for each scene. Creating multiple scenes won't change anything significant in terms of file size.
If you look at a standard scene file, it falls around 25kB, and that's all the memory it will take when you create another one. So 40 * 3 * 25 = 3000
. It'll be about 3000kB, so roughly 3MB. Not too much.
Thank you very much for your answer, I will do this :) !
Well that is not entirely true. If you only use prefab and don't change their values, then yes the scene will only contain references to those prefabs.
But if you add gameobject not connected to prefabs, or change the default value of instantiated prefab in your scene, then the size will grow a bit as those values need to be serialized.
That said, the required space to store those changes is much less that the space taken by resources (such as texture). So in the end the size will not reach ridiculous high value (unless you have a lot of gameobjects and/or instantiated meshes).
Normally, if I make other scenes for the other resolutions, the gameobjects will be different too. For instance for 3GS, all my gameobjects will be different (size, textures & camera). But I think for 3GS I will make a script to change the camera settings and the size & texture of all my objects, I think it will be more simple. For Ipad, I will only change the position of my assets on other scenes.