Hello Guest

Author Topic: Positioning with different resolutions  (Read 4616 times)

indy2005

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 19
    • View Profile
Positioning with different resolutions
« on: September 03, 2013, 09:39:40 am »
Hi,

How does positioning of sprites work when you switch in different SD/HD graphics?  I am coming from cocos2D where it used a point (not pixel) positioning...so you could place something at 10,10 and this was a points system so it new this was 10,10 for SD and 20,20 for HD and I didnt have to worry about it.  If I position things at 10,10,0 in the editor window when working in SD design mode, what happens when HD gets switched in?

Regards

i

gary-unikronsoftware

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 74
    • View Profile
Re: Positioning with different resolutions
« Reply #1 on: September 03, 2013, 10:40:10 am »
Hi,

The tk2d camera lets you specify Overrides to specify how your game displays in different situations.  E.g. If you develop a game at a resolution of 480 x 320 and set this as the native resolution, you can go into the Overrides section on the camera to specify what it does at double the size, 960 x 640.  So in this example, if you choose Match By Resolution and Auto Scale Fit Visible (or in this situation 'Closest Multiple of Two would also work') then the game objects would be proportionally the same on the screen for both resolutions.

If you are using different sprites for SD and HD then this just will affect the amount of details that is shown and not the actual size of the sprites so won't be a problem.

indy2005

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Positioning with different resolutions
« Reply #2 on: September 03, 2013, 05:57:13 pm »
Thanks, will have a play!