Game Development Community

World coordinates

by Pablo Alonso · in Torque Game Builder · 03/01/2005 (3:12 pm) · 7 replies

What's the unit system that Torque 2d uses, it appears to go from -50 to 50, is there any way to just use pixels, because I find it really confusing, or al least knowing how many pixels equal a unit.

thanks

#1
03/01/2005 (4:22 pm)
Left -> Right = -50 -> 50
Top -> Bottom = -35 -> 35

Pixel to unit conversion isn't really possible as the coordinates will remain the same regardless of resolution
#2
03/01/2005 (6:44 pm)
You can set the world units to whatever you want, just so you know. But we provide a good default recommended size.

Using pixels as game units is a very bad idea most of the time. Unless you plan to allow your players to only play at one screenres, using pixels as world units really complicates the programming involved.
#3
03/02/2005 (3:54 am)
Pablo,

Anthony posted a piece of code here that I have been using to show me world positions. It links to another thread that goes over other things too.

I don't know if you want this stuff for ingame changes or to better place things on the screen, but it works really good

Click here
#4
03/02/2005 (7:59 am)
Thanks a lot everyone, I want this specially to keep thing proporcionate, when I load pngs into sprites(in the basic tutorial) there's a change in their proportions, I just wanted to understand this so I could keep them proportionate.

Thanks every1

PD. is there any function to calculate the angle between two points? I know I can make this with baqsci trigonometry, but just wondering.
#5
03/05/2005 (1:40 pm)
I've a similar question: How do I determine speeds?
If I set the X speed to 40, what does that mean? Speed is distance over time, so is it 40 logical units per second?
#6
03/05/2005 (2:16 pm)
40 units per second, yes.
#7
03/05/2005 (2:59 pm)
Yes it is Lennart. :)

edit: Woot! Getting beaten to posts by helpful community members. Love it. :)