playMaker

Author Topic: Planing www.texture server to handle different screen resolutions/platforms  (Read 2655 times)

Slater

  • Full Member
  • ***
  • Posts: 123
Hi,

Ive successfully released our app Hanna&Henri on the App store and Im in the making of get it up and running for more platforms, Android etc. This first app was my first project so I learnt all I know from making this app. Now we plan on making a sequel, but not only that, we will very likely have 12 other children's apps in the making soon that have most assets already ready to build with. I'm trying to think now before rushing into this and plan beforehand with the knowledge I have and hopefully with any helpful information you can provide me with.

If we focus the attention to the 12 apps, they will be in 2d/orthographic camera with simple itween animations and use of switching material for animation. It will contain illustrations, text, narration and a set of questions for the user to answer. I plan on making this for iOS, Android, Windows Phone, Blackberry, Mac and PC. Aspect ratio is not something I worry about since I have learnt and build that already to handle, but resolution is still a problem.

When I built Hanna&Henri we just had 1024x1024 textures as backgrounds and then we had smaller objects at appropriate sizes compared to the background texture. As I understand it, you need to have several copies/texture in different sizes and swap between them in order to use appropriate texture for the device in use at the moment. If this is the way to do it I thought of putting the textures not within the app, but to have them be downloaded from a server when the app runs for the first time. What I found when looking around, it seams like www.texture is what I am looking for?

Does www.texture exist as an action in Playmaker? Are there other playmaker actions that correlates with www.texture that can be useful for me?

Am I correct in thinking that I need to have the image files on the server as .jpg if I want them to be without alpha channel and as .png if I want them to be with alpha channel? Is there anyway to use all import settings possible in Unity 3d when using www.texture?

When the app starts for the first time, should I have it check for an asset and if that asset is missing, trigger www.texture and download all the textures needed for the active device? Or is there some other smart way to do this check so that it download it once and then it is on the device and no internet connection will be needed for future use of the app?

Do I use "set material texture" in order to place the correct texture onto the correct quad in scene? How would I handle material, is that generated automatically from the texture when applied? Since I use "set material" in order to get an animation effect, how do I do this smart with this texture server strategy?

Any other things I need to consider and think about if I start doing things this way?

For me it looks like a good solution since we can have the app be small (under 50 mb) when users download it so that in App Store we can let the user download if they are on 3G. And it is also better for user since they only have the files they need for their device so file size will be smaller on the device than if it had all textures for all devices at once.

Really hope you can give me some answers and pointers. I really love working with Playmaker and I really like the help I have gotten so far in this community. You guys rock!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Hi,

 what 2d framework are you using?

 I would go for the following approach: have all your texture at high res, and on  small res, they will scale down automatically. Have you tried that? no messing around two sets of textures.

if you work on iphone, build all your stuff for retina screensize instead of retina, and have your gui placements flexible ( but I understand you have that covered).

 else, I know some 2d frameworks have the ability to switch atlas based on resolutions,

as for keeping size down, downloading everytime assets, means user will have to be connected to the internet at all time, this might not be the best approach here.

Maybe make a "HD" version of your app? Not trying to avoid the question, but that's also something valid.

bye,

 Jean

Slater

  • Full Member
  • ***
  • Posts: 123
Thanks Jean for your reply.

I don't use any 2d framework, I work directly within unity.

For texture settings that works best/looks best, I have found that having the texture in the same size as the compression size is the best way. If you have the texture at 512x512 and then in import settings set it to 256x256, it looks bad. I turn of mipmaps and also set it to clamp.

The menu we use is actually not gui, it its normal object that when you push the button slides into picture. For gui text, I have built an FSM that checks screen width (apps will be in landscape mode all the time by the way) and then choose what font size etc to use in order to be good.

I don't intend to have the assets be downloaded every time. Is it not possible to have it make a check of some sort, if an asset is within the app. If it is there then do nothing. If it is missing, then check to see what device it is and the go to web address and download assets for the device. In that way only the needed assets would be downloaded and not all assets and it wouldn't require constant internet connection for the app.

I wan't to have "everything" in the same app and not different versions. Thanks for the suggestion about "HD", but it is not something I want to do.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Hi,

 I meant: leave it as 512*512, only on screen it will get twice smaller, If it's perfectly twice less, it will look ok.

Without any frameworks, I am not sure you'll find a convenient way to do this.

bye,

 Jean