If I was to create a game where the Target Device is (iPhone + iPad) and on startup load a scene specifically designed for iPhone or iPad (see pseudocode below):
//Pseudocode:
if (device is iPhone)
{
load iPhone scene;
}
else if (device is iPad)
{
load iPad scene;
}
I’m interested in the community’s views and the pro’s and con’s of designing a game based on separating things out like this into different scenes based on the type of device. Do others design this way or just have the one scene then try to customize the single scene based on the type of device?
I don’t think such a multi scene setup to get support for different deploy targets going is a good idea in the long run. It can easily lead to having to do changes which should affect all versions in several places over and over and that is a very annoying time waster. In some rare cases it may be the case that the content varies so heavily that t doesn’t make sense to keep it in same scenes but in most cases usually one can get away with having it in one scene for various deploy targets. I meanwhile try to create my gui screen dimensions/ resolution independant, load assets which vary a lot from deploy target to target at runtime and have conditionals in code which handle platform specific stuff. It can be quite some work, too, but i prefer it over having to do each change several tiimes at several places.
I don’t think it’s a good idea to have different scene for different device. Resolution independence is the most important thing for UI and you should adjust your game scene at runtime based on device/platform. We do that for our game and it’s work very well There are lot of technique to deal with multiple device or resolution!
Yeah I guess it would also increase the size of the build as well. I’ve been designing for the iPhone however I’ve managed to get my hands on an iPad recently and after I built to the iPad it was obvious a few things have to be fixed in order to support both iPhone iPad devices. I had a moment of laziness come over me and I thought about the possibility of creating a scene specifically for iPad for a short term solution. I’ve quickly come to the conclusion that it’s a bad idea, … but I was also interested if anyone has done this before.
Hi !
Did u get any solution? I think you can check the model of your device by
iPhoneSettings.model
and can load different scenes according to the model based on the high and low resolution and/or can load resources depending on the model from Resources folder.
UI tends to be one of the bigger problems when it comes to iPad vs iPhone, mainly due to the different aspect ratios and screen sizes. Buttons that appear tiny on an iPhone may be overly large on an iPad. From my experience, it is generally good practice to do a whole new UI for iPad ports. Something you might try is setting up your game scene to work at all aspect ratios and screen resolutions, and then loading in the UI additively with a scene set up specifically for that device.
Well I will say I think it’s okay to set out a set of scenes for iPad only. Most apps I see today are usually iPad apps or phone apps…it’s perfectly acceptable to do a completely separate app for the iPad generations. Normally you want to just make sure your phone app will work on older gen devices and the retina displays. This saves a lot of heartache down the road.