Hello Guest

Author Topic: Multi resolutions, texture sizes and positioning, Lost!!  (Read 27449 times)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Multi resolutions, texture sizes and positioning, Lost!!
« Reply #15 on: May 15, 2012, 09:01:02 am »
Thats an interesting thought. Is there any particular reason you'd only want to scale non-uniformly? I was thinking of a "snapshot" based system for positioning screen overlays / UI elements / etc, where you position them and then set them up for different aspect ratios, etc. Obviously won't catch every permutation, but should give a decent starting point.

All of this is really dependent on what you want to do though, and also what should be part of the toolkit and what should be specific to a game. I need to think a lot more about this.

sandoze

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Multi resolutions, texture sizes and positioning, Lost!!
« Reply #16 on: May 15, 2012, 04:19:46 pm »
Hard to say whether it would be just for a specific game. Our studio frequently uses the Autosize options in Xcode's xib editor when porting from iPhone->iPad with great results. I've already begun setting this up in the provided source package (tk2dBaseSprite & tk2dSpriteEditor) and it seems like a no brainer at the moment. It should definitely allow devs/designers to fine tune their 2D layouts without simply mass scaling.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Multi resolutions, texture sizes and positioning, Lost!!
« Reply #17 on: May 15, 2012, 05:54:12 pm »
I have always found the autosize option to be a bit limiting and end up creating two layouts when dealing with iPhone - iPad, but at least I understand what your comment about scaling is about. I'll look into this. If you're adding this, I suggest doing it outside the sprite behaviour altogether, by using the .scale parameter - it will keep it much more portable and reliable, and will avoid a lot of branches in the code.

habitoti

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 82
    • View Profile
    • Rombos Homepage
Re: Multi resolutions, texture sizes and positioning, Lost!!
« Reply #18 on: October 05, 2013, 05:18:54 pm »
Hi,

this thread is already a bit older, and by now there are probably already new features included, and I am still thinking about how to generally address the problem of "arbitray" landscape screens (Android et al). Maybe the solution is already built in?
So I have tons of graphic assets initially made for iPad Retina. I have also 2048x1536 kind of abstract background images that can well be scaled and distorted to fit all the (current) common landscape formats (and I don't want to cut off anything, it should all be shown). Of course the other assets should never be distorted at all, only proportionally scaled.
So could I setup one camera that just handles the background and fills that background picture onto the whole screen, not leaving any borders? And then have a second camera that handles all the other sprites that I need on-screen? Or how would I start here?

Regards, habitoti
 
« Last Edit: October 05, 2013, 05:30:58 pm by habitoti »
Checkout our homepage or visit the Rombos blog.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Multi resolutions, texture sizes and positioning, Lost!!
« Reply #19 on: October 05, 2013, 09:58:32 pm »
If you want to do different things to different sprites, you'll obviously have to deal with them separately. I'd start of sorting out all the proportionaltely scaled ones with the tk2dCamera overrides. If you want the rest of the sprite/s to fill the screen, either do that with a second camera, or manually scale it to fit tk2dCamera.ScreenExtents.
Example here:
http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,2590.msg12929.html#msg12929