1
General / SFML and Box2D meters per pixel efficiency
« on: June 09, 2012, 06:01:52 pm »
Hello ![Smiley :)](https://www.sfml-dev.org/forums/Smileys/default/smiley.gif)
I am working on a game in SFML and Box2D and was wondering what you think is the best way to combat the "meters per pixel" (or pixels per meter) issue with Box2D. I have searched around the forum and seen that many people seem to use a (for example) "#define PIXELS_PER_METER 64.0f" and then pass that into Box2D's constructor when creating a box shape.
Correct me if I'm wrong but won't that create VERY large objects? which in it's own turn will cause strange physics simulation and/or bad performance?
I made a game previously with SDL/OpenGL and Box2D and there we scaled the entire world with glScale and adapted accordingly. needles to say, it was horrible...
Is there any way to do this efficiently?
![Smiley :)](https://www.sfml-dev.org/forums/Smileys/default/smiley.gif)
I am working on a game in SFML and Box2D and was wondering what you think is the best way to combat the "meters per pixel" (or pixels per meter) issue with Box2D. I have searched around the forum and seen that many people seem to use a (for example) "#define PIXELS_PER_METER 64.0f" and then pass that into Box2D's constructor when creating a box shape.
Correct me if I'm wrong but won't that create VERY large objects? which in it's own turn will cause strange physics simulation and/or bad performance?
I made a game previously with SDL/OpenGL and Box2D and there we scaled the entire world with glScale and adapted accordingly. needles to say, it was horrible...
Is there any way to do this efficiently?