Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Is publishing for a "variety" of devices' Magic?

Discussion in 'General Discussion' started by lunaticCoder, Jul 16, 2017.

  1. lunaticCoder

    lunaticCoder

    Joined:
    Nov 11, 2016
    Posts:
    43
    Okay so I'm a newbie and just finished making my game (Hurray), but found out that the resolution I designed for won't fit on the rest of the world's devices, But hopefully, found out that google Accepts Multiple APK's and all I need to do is to design my game for multiple resolutions, that means I have to scale a few hundred UI, Sprites etc, (Oh God what about my beloved Hand?), and to top it off, Apple does not support Multiple APK's.

    Okay so back to the Question, How do you guys make your games run on sooo many devices, is it magic, if not then how do you do it?
    Please guide me, I'm in the deepest, darkest pit of Game Development.

    I think I'll be fine redesigning to publish for the GooglePlayStore, WTH should I to publish on the AppStore?
     
  2. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    Yes, making things run on vastly different devices is a bit of magic :)

    On Android you can use different secondary APKs, but on iOS you don't do it at the macro level - you include different textures for different device classes and the end-user gets only the assets they need. There's supposed to be some support for app-thinning and on-demand resources in Unity now. Different asset bundles for different sizes is the way to go there.

    There are many posts on these forums about setting up for scalability. If your game is 3D you only have a little UI to worry about, but 2D games need more work. Dig into the 2D section. At least the GUI in Unity now has options to design scalable interfaces.

    As to why you should be on the Apple app store? Revenue. Using the freemium model typical of mobile games these days, it seems iOS is still in the lead. I don't have very recent numbers, but for 2016 there were several articles about iOS games getting up to 90% more revenue, offsetting a surprisingly low lead Android has in volume of downloads. If there is more platform parity in that regard, that's still a potential doubling of income. If it's still as it was, triple the numbers. More potential customers in any case!

    If you're not an iOS dev expert I suggest you release it on Android first and see how it goes. If things go well you can probably pay somebody to do the boring work to get it running on iOS and uploaded to the store later.
     
    theANMATOR2b likes this.
  3. DanielK2

    DanielK2

    Joined:
    Jul 17, 2017
    Posts:
    13
    What do you mean with saying that "resolution" is a problem on other devices? Is your game content not identifiable anymore? Or do you mean that different "aspect ratios" are the problem? I'm working on a game that needs the same aspect ratio independent from the screen aspect ratio of the device it is playing on. My solution was to obtain the devices screen size via code and then configure the camera to 16:9 screen aspect. So the camera ignores screenspace outside of this area, which leads to stripes that are left blank (either on top and bottom of the screen, or on left and right of the screen, depending if the screen is wider or narrower than 16:9). To prevent grafic artefacts on the stripes I have a second camera that fills the whole screen with plain black before the main camera is drawn. In the end it looks like a TV screen that has these black bars when watching widescreen movie.
     
  4. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,010
    I suggest that you spend some time learning about how to make the Unity UI work for you in a flexible way across multiple aspect ratios. Using the right anchoring points, canvas settings (such as 'Scale with screen size'), and various nifty layout components, it's quite possible to control a lot of how the UI behaves when screen size changes.

    If you have a specific problem, post it in the UI section and someone will probably be able to help you with figuring out how to fix it.
     
  5. lunaticCoder

    lunaticCoder

    Joined:
    Nov 11, 2016
    Posts:
    43
    You know, Scaling UI is not that big of a problem, I mean, anchoring pretty much solves everything, but what about the sprites, I tried slapping them on a canvas to see if it'd scale just like the UI but noooo, everything went berserk, like the scale, and position, especially on the Z-axis, A sprite's Z-axis value changed to -8753.11 :eek:, I mean wow, Just wow.

    Thank you for that long and informative post, I appreciate you taking the time to write it :), so I guess I'll try the PlayStore first to see how it goes and that sprite thinning stuff was new to me, so then again thanks alot, I'll research more about it later, Btw is there a limit on how many APK's you can have under one game on the PlayStore?, I read a lot on their website but they didn't mention a limit.

    I meant that if you design a game for a reso of 320x480 it's appearance certainly won't be the same on a 720x1280 reso device, and yeah the game content (sprites and stuff) goes out of the cameras view.

    Locking the aspect ratio looks like an awesome solution, but dontcha think that doing that will reduce your play space considerably?, I think if found a tutorial that just might help me do what you did, Can you have a look and approve? http://gamedesigntheory.blogspot.ie/2010/09/controlling-aspect-ratio-in-unity.html
     
  6. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    This seems familiar, but I think specific issues like that need their own focused post in the right sub-forum. Sometimes it's Unity bugs, sometimes it's something you misunderstood, sometimes it's unclear documentation/keywords changing so you think you're doing the right thing, but actually aren't. (I just watched an official tutorial that had a pause-edit due to editor bugs!)

    I think it's still one limited-size base APK (100MB or something now?) and two 2GB expansion APKs. If those limits still hold true, you might have to duplicate the common data if you have a lot of graphics. If your low-res version fits under 100MB you can make just one expansion package with HD graphics.
     
  7. DanielK2

    DanielK2

    Joined:
    Jul 17, 2017
    Posts:
    13
    Yes, thats in principle what I did. But since you are talking of sprites that go berserk this camera trick is probably not something you should do. It seems that you have other problems in your game and fixing the aspect ratio would only cover the symptoms, but the underlying problem may come back and annoy you on other occasions. I recommend you should find out why your game does things like changing a sprites z-axis to -8753.11 when the aspect ratio changes.
     
  8. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,010
    If this is a screen space canvas, then the z position doesn't really matter.

    If you set the canvas scaling mode to 'Scale with screen size' the sprites should scale along with the screen size.

    Not if you anchor them properly. You can anchor the sprites a certain distance from the screen border, in such a way that when e.g. the screen width changes, they are still the same distance from the border. It can take a while to get used to how the anchoring works despite that it looks simple, but there's a lot you can do with it.