1
\$\begingroup\$

In the code I see that the WORLD_SIZE variable was initialized with 480 private static final float WORLD_SIZE = 480;

What exactly the 480 means, are they pixels, cm or meters?

\$\endgroup\$
1
\$\begingroup\$

A unit by itself is just a unit. It doesn't represent anything until you know the context of what it is used for.

If for example the WORLD_SIZE is used with Box2D to represent the size of the world then it is likely to be meters as Box2D works in meters.

If WORLD_SIZE is used to define the width/height of a world map texture then the units would be pixels.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.