Hello Guest

Poll

Do you work in units or pixels with tk2dToolkit?

Pixels
6 (66.7%)
Units
3 (33.3%)
None
0 (0%)

Total Members Voted: 9

Voting closed: March 25, 2014, 12:52:00 pm

Author Topic: Do you work in units or pixels with tk2dToolkit?  (Read 4276 times)

hexdump

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 43
    • View Profile
Do you work in units or pixels with tk2dToolkit?
« on: March 18, 2014, 12:52:00 pm »
Hi,

I start this pool because I would like to know how you work with 2dtoolkit in unity and why. Do you setup your cam to let a unit/meter be a pixel? Or do you directly work with units (2dtoolkit default is 20 pixels=1 unit). I found more suitable to use pixels because it is more understable to me. Things like positioning something at this x,y pos in pixels is much better than converting x,y to units based on 2dtoolkit configuration. What do you use? Have you found any problem working with units?

On the other hand has anybody found any problem working with the physic engine in pixels?

Let's vote!
« Last Edit: March 18, 2014, 12:55:33 pm by hexdump »

Finnegan

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: Do you work in units or pixels with tk2dToolkit?
« Reply #1 on: March 19, 2014, 09:05:48 am »
Pixels, because we have many complex menus and lots of animations with pixel-perfect positioning. Also supporting many platforms and resolutions using points will be kind of hard.

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Re: Do you work in units or pixels with tk2dToolkit?
« Reply #2 on: March 19, 2014, 02:34:06 pm »
Used to work in 1:1, but recently switched to a different scale. Mainly because it was getting completely absurd working with giant numbers. Keeping GUIs/menus as 1:1, though.

griden

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Do you work in units or pixels with tk2dToolkit?
« Reply #3 on: March 21, 2014, 12:40:13 pm »
You'll probably find out that mapping 1 pixel to 1 meter leads to some unexpected behaviour from the 2D Physics system - how gravity affects rigidbodies for example. I think this originates from the fact that Box2D uses meters and the docs recommend setting a ratio that corresponds to your game object sizes -> http://box2d.org/2011/12/pixels/.