Question

I'm working on my first LibGdx (Scene2d + Box2d) game, it's quite new field for me and still feel a bit confused about couple things, especially about units. Already seen few different approaches how to deal with it, but still not sure for what's best go for me.

Wondering if there is any drawback of using stage viewport size eg: 16x9 (rather than commonly used: 800x480) in order to avoid conversions box2d => stage coordinates, use same sizes/positions for Box2d objects as well as for stage actors (sprites etc)?

Was it helpful?

Solution

Wondering if there is any drawback of using stage viewport size eg: 16x9 (rather than commonly used: 800x480) in order to avoid conversions box2d => stage coordinates, use same sizes/positions for Box2d objects as well as for stage actors (sprites etc)?

This is exactly what I do. It is a much better approach. You don't have to make all those convertions.

Probably the first libgdx box2d adopters didn't think of that and everyone else just followed them :p

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top