A redesign of the AGS site is being planned! Please check out the mockups and give your feedback.


Two factor authentication (via app or email) is now available for the forums. You can enable it on your profile.

Author Topic: AGS engine Mac OS X port  (Read 90748 times)

Re: AGS engine Mac OS X port
« Reply #200 on: 26 May 2021, 16:06 »
As a side note, if you use itch.io's butler (the command line software to push builds), you can add the flag --fix-permissions (both for max and linux) so you don't have to do that manually.

I didn't know about the butler. I'm definitely going to use itl! Thank you!

Re: AGS engine Mac OS X port
« Reply #201 on: 26 May 2021, 16:51 »
I just tried TheVolumeRemote's wrapper and it works beautifully, with one caveat: if I run the game fullscreen in my external monitor, which has a ratio of 16:9, the image gets stretched to fill the screen even though I've set screen_def to "scaling" in the cfg file. I wonder if there's another copy of the cfg file that gets created somewhere else, same as in Linux, or are multiple monitors a known issue with this port?


Quote
windowed=0
screen_def=scaling
game_scale_fs=max_round
game_scale_win=max_round
« Last Edit: 26 May 2021, 16:53 by Laura Hunt »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS engine Mac OS X port
« Reply #202 on: 26 May 2021, 16:58 »
LauraHunt, ags currently does not detect multiple monitors correctly, maybe that's the part of the problem. Also, I would not use "scaling" in fullscreen, maybe it's best to use "max" to make it keep at current desktop resolution, and "proportional" for "game_scale_fs".
« Last Edit: 26 May 2021, 17:47 by Crimson Wizard »

Re: AGS engine Mac OS X port
« Reply #203 on: 26 May 2021, 17:04 »
LauraHunt, ags currently does not detect multiple monitors correctly, maybe that's the part of the problem. Also, I would not use "scaling" in fullscreen, maybe it's best to use "max" to make it keep at current desktop resolution, and "proportional" for "game_scale_fs".

Hey CW, thanks, setting it to "proportional" seems to have fixed it. However, this mode is not listed here, which is what I was using for reference: https://github.com/adventuregamestudio/ags/blob/master/OPTIONS.md

Quote
screen_def = [string] - determines how display mode is deduced:
  • explicit - use screen_width and screen_height parameters;
  • scaling - sets equal to scaled game size;
  • max - sets equal to device/desktop size.

Maybe it would be useful to add it?

Edit: to clarify, what I did was leave game_scale_fs as "max_round", and set screen_def to "proportional", even though it's not listed as one of the possible parameters. Somehow seems to have worked.

Edit 2: Actually no, it didn't work. What DOES seem to work is to start the game in windowed mode and, once it's running, pressing Alt+Enter to go into fullscreen mode; then the game scales correctly. But running the game directly in fullscreen stretches the image to fill the screen instead.
« Last Edit: 26 May 2021, 17:33 by Laura Hunt »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS engine Mac OS X port
« Reply #204 on: 26 May 2021, 17:47 »
screen_def cannot be "proportional", I was referring to game_scale_fs option. "screen_def" could be set to "max" that would use current desktop resolution.

The thing is that "screen_def = scaling" will try to set new display resolution to the integer scale of a game's size. Changing resolution itself may be problematic on some systems, but if proper resolution is not supported it will try to find nearest one which may be not what you want.
« Last Edit: 26 May 2021, 17:51 by Crimson Wizard »

Re: AGS engine Mac OS X port
« Reply #205 on: 26 May 2021, 17:54 »
screen_def cannot be "proportional", I was referring to game_scale_fs option. "screen_def" could be set to "max" that would use current desktop resolution.

Yeah sorry for the confusion, I realized that afterwards. Hope my second edit clarifies things, but to conclude: if you start the game in windowed mode with the "normal" parameters (screen_def=max, and max_round for both fs and windowed) and press alt+enter once the game is running, then it scales correctly on the second monitor. It's a workaround, at least.

eri0o

Re: AGS engine Mac OS X port
« Reply #206 on: 31 May 2021, 00:17 »
people,

I started to try to update the AGS Xcode project for MacOS and discovered that Xcode is super alien for me (I normally do MacOS through CLion using CMake). If some of the MacOS devs that occasionally appear here see this message, I made some initial work to get at least the libraries in a newer version and in a state they build and install, but I am stuck trying to understand how to add files in Xcode in a way the headers actually work. In case some Xcode expert wants to join and upgrade the projects, here is the initial work: https://github.com/ericoporto/ags/tree/macos-xcode-sdl2

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS engine Mac OS X port
« Reply #207 on: 31 May 2021, 18:44 »
@LauraHunt, I just noticed that the MacOSX port does not create window sized like the Windows or Linux ports do, it has some different logic to this and likely not even using mode size from the config.

You mentioned that the problem occurs on the "external monitor", does it also happen on the main monitor (I'm not sure what your setup is).


Re: AGS engine Mac OS X port
« Reply #208 on: 31 May 2021, 19:30 »
@LauraHunt, I just noticed that the MacOSX port does not create window sized like the Windows or Linux ports do, it has some different logic to this and likely not even using mode size from the config.

You mentioned that the problem occurs on the "external monitor", does it also happen on the main monitor (I'm not sure what your setup is).

I'm using a 15-inch MacBook Pro (2880x1800) and an external 24-inch Dell (1920x1080). The issue does not happen on the laptop display, but it might be because both the game (320x200) and the display have a ratio of 16:10.

Still, the behaviour is always the same: if I start the game in windowed mode and then switch to fullscreen, the image scales correctly on the external display without any stretching (but if I quit while in fullscreen mode and then start the game again at some other time, it will once more stretch to fill the screen, so the best thing to do is switch to windowed mode before quitting).

Interestingly, if I run the game in windowed mode, the cfg file that's located in the user's Saved Games profile folder sets itself to "scaling". If I run the game in fullscreen mode, the cfg sets itself to "max".

« Last Edit: 31 May 2021, 19:38 by Laura Hunt »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS engine Mac OS X port
« Reply #209 on: 31 May 2021, 19:39 »
Still, the behaviour is always the same: if I start the game in windowed mode and then switch to fullscreen, the image scales correctly on the external display without any stretching (but if I quit while in fullscreen mode and then start the game again at some other time, it will once more stretch to fill the screen, so the best thing to do is switch to windowed mode before quitting).

When switching modes it uses different algorithm than on startup for MacOSX port, which may be related.
When you startup in mode A engine remembers its settings, so switch forth and back will return to same settings. But when you start in mode B and switch to mode A later, these settings will be taken from "defaults" instead.

Interestingly, if I run the game in windowed mode, the cfg file that's located in the user's Saved Games profile folder sets itself to "scaling". If I run the game in fullscreen mode, the cfg sets itself to "max".

This is how default settings work for these modes, for fullscreen it's "max" which means current desktop size, and for windowed it's "scaling" which means take game size and scale by a integer factor.

I think it could use the main monitor for determining the desktop size. But this does not explain why it improves on switching modes.

PS. Also, in the latest version I disabled saving config by engine itself, so it will not longer change these settings in config file.
« Last Edit: 01 Jun 2021, 01:02 by Crimson Wizard »