CoronaSDK for OS X - Beta 2: The Reimagining

Hey everybody!

Soooo excited for OSX and Windows builds. Just awesome.

I’m having some trouble setting the App’s window size and could use some help.

For the mobile versions of my games, I am rolling my own letterboxing code, which scales to fit the background elements while repositioning foreground elements dynamically.

As such, I do not have width, height, or scale defined in the config.lua file. I am also using a lot of display.* information to set the size on the devices.

This all works wonderfully, however I am having trouble making it work on the OS X desktop version.

As mentioned on the forums previously, I removed all of the display.* calls and hard coded everything. I also set the width, height and scale in config.lua.

The app keeps launching with a humungous window though, about 4x the size of the simulator. Nothing I seemed to do would affect the size of the window.

To keep my sanity, I decided to make a very simple test app to try and narrow things down first.

I’m simply trying to display an image.
The image is 1136 x 726.

I set the width and height in config.lua to 1136 x 726

It works fine in the simulator. (I have it set up as a custom 1136 x 726 device)

Whenever I do a build however, it is always the same huge window that opens up.

If I set resizable to true in the build.settings, the same huge window launches - but I can now resize it to any size. And if I do another build, the app will launch at the previous resized size and at the previous window’s location - I assume this is how it supposed to work in OS X.

I am working on a 30" monitor hooked up to my laptop if that matters. But the simulator is on the monitor too and it is fine.

I am attaching my simple test project if anyone wants to take a look. I am trying to open an 1136x726 window to display a 1136x726 graphic.

Any help is appreciated!

Joe

Not sure if this is related however our games seem to always open “fullscreen” no matter the setting, maybe it’s trying to set it to full screen of the 30" monitor even if it’s playing on the smaller one?

p.s. will the first Corona built games released for OS X a all be point and click games? We’ll have to make a special day for that :slight_smile:

It does open in a window if I set it to “normal”, but it is huge.

And it does go fullscreen when set to “fullscreen” mode, but the size is all wrong as seems to be basing the size off that huge window.

The huge window is also larger than my laptop’s screen when I drag it over to that screen.

Hmmm.

And yes, Point n’ Click Adventure party! :wink:

@firemaplegames make sure you’re running at least Daily Build 2676 as prior versions didn’t work for the situation you describe.  If you are already running 2676, let me know that (it always helps to mention the version of the software you’re reporting issues with).

The default window size is set to be slightly smaller than the size of the monitor it opens on (so if your laptop screen was the main screen for OS X, it would be sized to fit on that).  But it’s just the default and probably wont suit everyone so you can either set a window size or make the window resizable in your build.settings as documented here.  I wonder if we should make the window resizable by default if it’s displaying scaled content at the default size.  Perhaps a wise move would be to limit the default size so it’s not humorously large on bit displays.

We now have Forever Lost: Episode 3, Cabin Escape, and Ferris Mueller’s Day Off all working flawlessly ( as far as we can tell ) on the Mac builds.

The only things that aren’t working are the Other Game links and the Rate links ( naturally as the games aren’t in any stores yet ) and the Pasteboard plugin ( which isn’t a necessity at all ).

Speaking of stores, is the eventual plan to allow for native Mac ( and Win32 ) builds that we could submit to Steam, GOG, Itch.io etc or will we only be able to do Mac/Windows store builds? I’m really hoping for both options :slight_smile:

Now onto getting Forever Lost 1 & 2 working. I fear they will be a harder job as they were built on our pre-Serenity framework i.e. fairly messy code.

Hey Perry!

Yes, using the latest build. 2676

That must be what is happening, the default window is slightly smaller than my monitor.

I’d prefer that not to happen if possible, so I have tried to explicitly set the window to be 1136x726

It seems to be ignoring that though and going with the default.

In the build.settings I set:

defaultViewWidth = 1136,

defaultViewHeight = 726,

and in content in config.lua:

width = 1136,

height = 726

Not sure what else to set. I attached the sample project in the above post if it helps.

You mention that “The default window size is set to be slightly smaller than the size of the monitor it opens on”… Is it possible to get the exact size of that window so I can position my elements?

TIA, and I will keep playing around!

Joe

After some testing I realized that  defaultViewWidth and  defaultViewHeight were a bit hit and miss due to a disagreement with a system API.  Things should be much better in the next Daily Build (2677 or later).

The default window is  display.pixelWidth x display.pixelHeight but these are calculated based on the screensize and the aspect ratio of the content width and height so there’s something of a chicken and egg situation. Hopefully now that  defaultViewWidth  and  defaultViewHeight  actually work things will be more straightforward.

Any thoughts on how to handle different screen sizes are welcome. 

I have an app for a physical installation that runs 1280x720 – all height and widths are explicitly set in config.lua. With my monitor set to 1270x720 and defaultViewWidth and defaultViewHeight also set to 1280x720, the app almost runs perfectly, except the bottom of the content is cut off. It seems that the ‘full-screen’ appears a few pixels below the top of the screen… the exact height of the apple menu bar which appears on hover. Is there any way to get the content truly full-screen? As in starting at 0,0 and extending to 1280,720 without leaving space for the OSX menu bar?

All in all, the ability to build from the simulator is great!

That shouldn’t be happening.  Can you put together a test case that demonstrates the issue and PM it to me?

Edit: Lol … I didn’t realize this was a zombie thread.  I’m guessing that the current release fixes this issue.

I have an app for a physical installation that runs 1280x720 – all height and widths are explicitly set in config.lua. With my monitor set to 1270x720 and defaultViewWidth and defaultViewHeight also set to 1280x720, the app almost runs perfectly, except the bottom of the content is cut off. It seems that the ‘full-screen’ appears a few pixels below the top of the screen… the exact height of the apple menu bar which appears on hover. Is there any way to get the content truly full-screen? As in starting at 0,0 and extending to 1280,720 without leaving space for the OSX menu bar?

All in all, the ability to build from the simulator is great!

That shouldn’t be happening.  Can you put together a test case that demonstrates the issue and PM it to me?

Edit: Lol … I didn’t realize this was a zombie thread.  I’m guessing that the current release fixes this issue.