Positioning of bodies for different device resolutions

Hi all,

I'm loving WCK so far with my little bit of mucking about but was wondering if anyone has any advice on how best to tackle positioning of BodyShapes on screen so that they will be optimised for different screen resolutions.

For example, say a game on Device A, which has a low resolution of 320x240, required a box stuck to the very left of screen, one stuck to the top and another to the far right.

Then on Device B which has a much higher resolution of 960x640 and also a different aspect ratio, we also want the same box positions relative to the device full screen resolution.

Or taking the WCK demo FLA worlds, how would these be modified in order to make them utilize the full width and height of any given device?

Since WCK is using the IDE as a layout tool with absolute positions would it be best to :

1) layout this example scenario in some sort of common, middle-ground resolution (if so what would this be?) and then via code, reposition all elements according the current devices resolution?

2) Or possibly only use WCK to create each element in the Library but not lay them out visually and leave this positioning to code?

There's a good chance I've entirely overlooked something more obvious and easy so feel free to virtually roll your eyes at me - I can take it.

Also, as an aside, I noticed that Box2D uses a World scale of 30 and the WCK Demo seems to use 60 in it's Worlds. Is there a reason for this, does it make any difference or am I just being paranoid?

Thanks heaps
Maybe what you're looking for is this?:

http://help.adobe.com/en_US/FlashPlatfo ... eMode.html

I'm not sure if that applies to mobile publishing though. On the web it's for controlling how to display at different browser sizes.

Changing the scale changes the "feel" of the simulation. There's probably not much difference between 30 / 60 actually. You would see a big difference if you used a really small scale like 2 or 5.
Thanks Mayobutter,

Yes I'm not too sure whether StageScaleMode is enough. I was investigating this type of arrangement : http://www.adobe.com/devnet/flash/artic ... sizes.html where Capabilities.screenDPI can be used to determine a millimeter to pixel conversion to adjust a layout dynamically dependent on a device screen format (eg. a widescreen layout might want to actually move assets positions relative to one another as opposed to simply scaling the whole swf proportionally up/down as StageScaleMode does. Kind of a letterbox 4:3 versus widescreen 16:9 battle)

I would imagine that if just using Box2D library without WCK, all elements would need to be positioned via code anyway and so the use of Capabilities.screenDPI via a conversion function might be utilised whenever an object is positioned/scaled. But since WCK makes life so much easier (yay for you!) to layout an initial physics level, it almost seems for the myriad of mobile resolutions and screen ratios, there'd be a need to loop through all timeline positioned World elements and re-position each using a scaleFactor calculated off device width, height and Capabilities.screenDPI.

I think I'm just thinking out loud now and might cross that proverbial bridge (yes a bridge made from Revolute joints) when I actually get that far .....

Again, thanks for your brilliant work.

Cheers

Original thread: https://box2d.org/forum/viewtopic.php?t=7854