Works perfect in Windows Simulator, but totally messed up in Mac Simulator and IOS Build

Hi all,

First I would like to appoligies if I have placed this bug/thread in the wrong place, but I feel this is a bug.

We are developing a 2D game for both the IOS and the Android devices, and is using the most recent daily build of Corona SDK to test and build the the game. We primary develop on Windows, then test and build on Mac, and when we test the code with Corona Simulator on Windows, everything is positioned and working perfectly, but as soon as we test the same on Mac everything is totally messed up… if we build and test it on iPhone 3GS, iPhone 4 and iPad, it is even more messedup.

How come that the simulator on Windows is not giving us the correct simulation, compared to Mac/Devices? And how do we solve it?

I hope someone can help us since we are having big issues over this! :-S

Best Regards

Stig :slight_smile: [import]uid: 123415 topic_id: 21686 reply_id: 321686[/import]

Hey Stig,

Can you please submit a bug report here; http://developer.anscamobile.com/content/bug-submission

If you can include a sample that shows the problem and details about what version of Corona both machines are running, OS, etc. that would be very helpful. [import]uid: 52491 topic_id: 21686 reply_id: 86049[/import]

Hey Peach,

Sure, I will start doing that right now… thanks for your quick reply :wink:

/Stig :slight_smile: [import]uid: 123415 topic_id: 21686 reply_id: 86073[/import]

No worries on the quick reply, hopefully this is something we can help get worked out in a timely manner. [import]uid: 52491 topic_id: 21686 reply_id: 86122[/import]

This sounds like another instance of the Worst Bug In Corona, which I’ve mentioned a few times.

Here’s the deal: the order in which the windows simulator / Android phones deal with position and scale is BACKWARDS from the way iOS and the mac simulator deal with them.

So for instance, if you do something like:

testCase = display.newImage(“spritename.png”, 20, 50)
testCase.xScale = 0.5
testCase.yScale = 0.5

You will get very different results.

The work-around, which is irritating, is to explicitly set reference point THEN scale THEN rotation THEN position of every display object. If you do this carefully these differences will go away. Like so:

testCase = display.newImage(“spritename.png”, 0, 0)
testCase:setReferencePoint(display.TopLeftReferencePoint)
testCase.xScale = 0.5
testCase.yScale = 0.5
testCase.x = 20
testCase.y = 50

Hopefully this will fix your issue. It caused us no end of headaches for months.
[import]uid: 65996 topic_id: 21686 reply_id: 86483[/import]