Hello Guest

Author Topic: Multiplatform strategy?  (Read 4817 times)

wintermute

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 11
    • View Profile
Multiplatform strategy?
« on: August 30, 2013, 02:20:47 pm »
Hi,

I'm currently making a game aiming to support multiple resolutions on iOS and Android. The game is UI intensive so it's not a simple reposition this sprite everything works.

I'm predicting I will have multiple atlases for different platforms (e.g. iPad Retina vs iPhone Retina) as the UI assets will be different, as well as having atlases for Android platforms as well (1920x1080, 1280x720, 800x480, 1024x768, etc.).

I'd like some advise on how to tackle this correctly as I'm still in the early development stage. Should I attach scripts that swap out sprite collections on runtime? How about positioning and scaling?

I was thinking having spritecollections named like:
CharacterPotraits@iPhoneHD
CharacterPotraits@iPadHD
CharacterPotraits@AndroidSmall
CharacterPotraits@AndroidNormal

But I think if I publish a build for say iOS only, the Android atlases will also be included in the build. Is that correct? Is there a way to avoid this?

wintermute

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Multiplatform strategy?
« Reply #1 on: August 30, 2013, 02:32:48 pm »
Apologies, I failed to read the Platform Specific Sprite Collections documentation before hand.

A few additional questions, the 1x 2x option works for SpriteCollections with the same name but different configuration? So I should be making a CharacterPortraits@1x and configure it to the 1x platform. Then add another CharacterPotraits@2x and configure it to 2x platform, and both spritecollections must be in the same directory somewhere in my projects folder. Is that correct?

How do you support an iOS build having both iPad and iPhone specific assets?
How do you support a build that has both iOS and Android assets inside?

Ty!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Multiplatform strategy?
« Reply #2 on: August 31, 2013, 12:17:11 pm »
You don't create those sprite collections - they are automatically created for you when you enable the system. You do need to create the textures though. Eg. if you use a sprite from the source texure "ABC.png" you will need "ABC@2x.png" and so on. Follow the instructions in that doc, and it'll create the 2x / 4x / 1x platforms for you with your override textures.

"How do you support an iOS build having both iPad and iPhone specific assets?"
Depends on what your game does. You could just use iPhone4/5 assets for iPad and zoom out to be pixel perfect. Or you might need custom assets completely. If you can deal with 1x, 2x and 4x multiples things are relatively easy. This gets considerably more tricky if you want odd multiples, but depends very much on your needs.

"How do you support a build that has both iOS and Android assets inside?"
Depends on your game. Can't androidsmall and androidbig be the same as 2x and 4x? If you can deal with that then you've just got 2-3 sets of assets. Job done :) Or if you need other "platforms" you can add them but there isn't an automated way to deal with platforms. It is doable manually or through a script though.