Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Orobu

Pages: [1]
General / SFML and Box2D meters per pixel efficiency
« on: June 09, 2012, 06:01:52 pm »
Hello :)

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?

Pages: [1]