App not scaling the same on Windows vs OSX

I’ve been developing my game on Windows, building for Android for the past couple of months, and everything seemed to be going fine.

However, today I finally started to test for iOS, and discovered an unfortunate problem. On windows, the screen is scaling just fine, same with the build for android.

However, when I run the same exact code on OSX, it’s not scaling properly, and leaving a margin on the right size of the screen, and also has “seams” in between my background tiles. I really don’t know where to start, in order to troubleshoot this.

It’s odd that the app doesn’t look exactly the same in the Corona Simulator between OSX and Windows. For both, I’ve been using the iPhone (not iPhone 4) Skin.

Here is a screenshot of both to illustrate the problem:

here is my config.lua file:
[lua]application =
{
content =
{
width = 400,
height = 540,
scale = “zoomStretch”,
fps = 60
}
}[/lua]

I realize that 400x540 is not a standard size - however setting it to zoomStretch was working perfectly on windows (and on Android). Why does it look so much different on OSX? In OSX, I also built for Xcode simulator, and also built for my device (iPod Touch 3g) and it’s the same problem (margin + seams).

Any ideas? [import]uid: 49447 topic_id: 17584 reply_id: 317584[/import]

A lot of internal changes have been made to the Corona Simulator for OS X in the latest daily builds. We’re still debugging it. Would you mind testing your app with the release version of Corona, build #591, for OS X? This would let us know if we broke anything in the latest version of the simulator. Thanks! [import]uid: 32256 topic_id: 17584 reply_id: 66904[/import]

Unfortunately, yes - the same problem also happens with build #591. (I was originally using #657).

Does that mean I should submit this as a formal bug report? [import]uid: 49447 topic_id: 17584 reply_id: 66966[/import]

correction: This issue happens in the OSX simulator only, viewing as iPhone (not iPhone 4), or viewing as myTouch. And of course, when I actually build for iOS (I’ve only tested on non-retina iPod touch).

I’ve updated the screenshot above to reflect this.

Just to emphasize - it seems as though viewing as iPhone 4, Galaxy Tab, or anything other than myTouch or iPhone works as expected on OSX. On Windows, it works as expected on all device “skins.” [import]uid: 49447 topic_id: 17584 reply_id: 66967[/import]

Yes, please submit a bug report for this issue via the “Report a Bug” link at the top of this web page. If you could repeat what you’ve mentioned here, along with screenshots, onto the bug report, then that would be a big help.

One more question for you. Does this “seam” issue happen on Windows if you zoom in/out? [import]uid: 32256 topic_id: 17584 reply_id: 67022[/import]

Thanks Joshua, I’ll report a bug later tonight/this weekend.

To answer your question - no, the seam does not occur on Windows at all, in any of the “skins,” whether zoomed in or out.

I have a question for you - I’m currently using one of the more recent builds, which allows Lua files in subfolders, and my code is formatted to follow that.

In order to test on the release build (#591) as you suggested, I had to spend a decent amount of time putting all my files back into the root, and changing code to reflect that. Since I have verified this is an issue in both #591, and the latest build… can I upload the code which is using build #657? The reason I ask is because in order to get my code to run on 591, I had to do a fair amount of reprogramming, and stripped out a number of features (tinting, subfolders, widget class, etc.)

Thanks. [import]uid: 49447 topic_id: 17584 reply_id: 67063[/import]

One other thing I noticed, which is probably unrelated… I optimized my graphics using PNGGauntlet, and on windows they all load and look fine. However on OSX, any of the graphics I loaded using display.newImage didn’t load properly - it just created neon-green rectangles… but spritesets didn’t have this problem.

That’s probably a separate issue which needs it’s own bug report. However, it is another example of how the same code, same assets look different in the simulator (same build) between OSX and Windows. [import]uid: 49447 topic_id: 17584 reply_id: 67068[/import]

Go ahead and upload the code that you’ve got for build #657. Our Mac developer is only interested in the newest revision anyways. But please mention that you’ve tested it on 591 and the same issue appeared. That is a pretty big clue that will help him out.

Regarding your PNG issue, I know all PNG files are re-formatted during an iOS build on Mac. My understanding is that iOS requires some kind of processing to be done on PNG files to optimize for that platform. Unfortunately, I don’t know much more details since I am the Windows and Android guy here at Ansca. I do know that Windows will not re-process you PNG files, which is why it is turning out okay for you on that platform. You are not alone on this issue. I noticed that there was another forum posting about this issue recently, which you can see via the link below. Perhaps you should join the conversation?

http://developer.anscamobile.com/forum/2011/11/10/disable-png-compressionoptimization-during-build-ios
[import]uid: 32256 topic_id: 17584 reply_id: 67079[/import]

Thanks, just submitted - bug #3110 (logged as case #9575) [import]uid: 49447 topic_id: 17584 reply_id: 67115[/import]