Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sandoze

Pages: [1]
1
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.

2
Thats what the resolution overrides are for. Add an override for 480x320 and have a scale of 0.5 and it should just do what you expect.

Of course but it does it for the entire scene (eg. I may want to scale sprites individually depending on screen resolution and some sprites I may only want to scale on the Y or X axis. Some sprites I may not want scaled at all).

Furthermore it's impossible to tell what sort of screen resolutions there will be tomorrow, especially in the realm of Android. I assume I'd have to create several over rides or set them through code during run time.

3

We also have the tk2dCamera class, which does things rather differently. Here, what you get is a self adjusting camera which will automatically adjust itself so sprites are ALWAYS pixel perfect. You also get the added bonus that 1 world unit = 1 pixel in whatever resolution you're using, and the coordinate system starts from the bottom left. the tk2dCamera also has support for anchors. Check out demo 11 - camera and alignment for more info. Seeing that your game is a puzzle game (and I'm guessing no scrolling), this might be a better solution for you.


I think what I might be missing here is the sprite scaling with the tk2dCamera class. What I see when going from 960x640 to 480x320 is a correctly positioned sprite but it has not scaled to the appropriate value. eg. if I have a sprite on a retina screen and my sprite scale is (1, 1, x) with a pos of (100, 100, x) then I expect when going to a low res screen (3GS) a sprite scale of (0.5, 0.5) w/ pos (50, 50, x/2). This is not what I'm seeing though.

Also, the solution of setting the camera ortho size of the camera (essentially scaling everything on the screen) based on the device mentioned earlier in the thread isn't always the best solution for us when handling multiple resolutions. A better solution would be a case by case sprite 'Autoresize' (as found in xcode's nib builder) that would allow sprites to be anchored and scaled based off of their parent container and to adjust how they're scaled an anchored on an individual basis.

Anyhow, maybe this is already done by some other manner and I'm just missing it as I'm a new user.

Pages: [1]