Running AGS on my new Macbook Pro M1

Started by Hobbes, Sun 02/05/2021 05:26:22

Previous topic - Next topic

Hobbes

Hi all,

No idea if anyone else is interested in this, but just thought I'd report the steps I took to get to the ideal (for me) development environment. I got a swanky new Macbook Pro M1 for Christmas, having gone to the Mac back in 2006 and never looked back. So using AGS has always been a more challenging setup, but Bootcamp made that easier. With the M1 chip though, there's no Bootcamp / free Windows virtualisation (I'm not interested in that anyway, since that means a whole Windows install *just* for AGS). I've been looking into alternative options and am glad to have a very, very workable solution.


  • Using Porting Kit to create a custom wrapper, installing VS Runtime 2015 + DotNet 4.5 in that, then installing the latest AGS into that wrapper. This creates a stand-alone application which basically just runs AGS for me, but makes it possible to utilise the Mac file system. So no doubling up of files, able to swap clipboards, etc. Works great. Only exception is running the AGS games. I might need to play around with DirectX options a bit more, but that's where the second piece of software comes in...
  • Daily build of ScummVM (Intel version, running through Rosetta since the M1 version won't work for me, even with xattr -cr usage). With AGS now running on ScummVM (who would've ever dreamed that would happen), I can easily run my test-versions through ScummVM instead. This is a great way to test out my game as I'm coding/building it in AGS.
  • Other pieces of software that are Mac-native and help: CHM Reader for the AGS Help file, Aseprite for pixel art, MilkyTracker and Garageband for music, Scrivenerfor writing.

In short, I'm just super happy to be able to run my full AGS production environment on MacOS this way. Yes, parts of it are a bit hacky and held together by duct-tape, but the whole solution works like a dream. And it's running on that very energy-efficient and blazingly fast M1 processor.

Again, not sure if this helps anyone, but the portability of the full AGS editor into MacOS in this way, completely for free, is an amazing step forward for me. Of course, yes, I could run AGS from a Windows laptop, but I'm much more comfortable on MacOS and the various pieces of software on that OS I've come to rely on over the years. Hope it helps anyone else looking to explore this option. I for one am having a lot of fun working on some games on my Mac again.

Crimson Wizard

#1
Does not AGS engine's Mac port work to test games on Mac, or there are some problems with that?

Hobbes

I'm mainly looking for the Editor to be working, so that would work well.

I haven't tried the Engine Mac port as such at this moment. The reason is that when I compile from AGS, it spits it out into the same folder every time, so all I need to do is just launch ScummVM and I'm off. The Engine port, from what I can read, requires copying-and-pasting within a MacOS app, which is of course an option, but sounds more like a solution for a "finished" product, if that makes sense?

Now that I have caught your attention though, can I just use this opportunity to say a massive, massive thank you for all that you do in further developing & maintaining AGS? It's a phenomenal achievement and I am so grateful to be able to slide right back into it on a modern system and continue with AGS like this. Thank you!

Crimson Wizard

#3
Quote from: Hobbes on Sun 02/05/2021 12:03:51
I haven't tried the Engine Mac port as such at this moment. The reason is that when I compile from AGS, it spits it out into the same folder every time, so all I need to do is just launch ScummVM and I'm off. The Engine port, from what I can read, requires copying-and-pasting within a MacOS app, which is of course an option, but sounds more like a solution for a "finished" product, if that makes sense?

Is the inconvenience mainly in how the compiled files are handled, or there is anything else? You mentioned some DirectX issues.

Actually, I have no idea how this whole setup works on Mac; from what you've said it sounds like Editor is like running inside a wrapper, but you are still on Mac operating system, and results of compilation are placed in Mac filesystem. Is this correct?

EDIT:
I actualy wonder if our mac port can be setup to run game from anywhere. I mean, if Mac gives such permissions, that might be a matter of passing command line argument or setting something in configuration.

eri0o

Hobbes, actually if you produce a Mac binary you will have a command line executable for ags that you can use, the other steps are designed so you can ship your game to someone else on MacOS once you are done. The catch is you would have to build it yourself since AGS continuous integration system only produces x86/amd64 binaries for now (no M1 sem binary is being produced).

If you copy the ags binary in the Compiled/Data directory of your project, should be fairly easy to run it - just let a command line open and type ./ags inside the Compiled/Data directory whenever you need to test your game.

I am super impressed you got the Editor running, great job.

Hobbes

Quote from: Crimson Wizard on Sun 02/05/2021 12:22:27
Quote from: Hobbes on Sun 02/05/2021 12:03:51
I haven't tried the Engine Mac port as such at this moment. The reason is that when I compile from AGS, it spits it out into the same folder every time, so all I need to do is just launch ScummVM and I'm off. The Engine port, from what I can read, requires copying-and-pasting within a MacOS app, which is of course an option, but sounds more like a solution for a "finished" product, if that makes sense?

Is the inconvenience mainly in how the compiled files are handled, or there is anything else? You mentioned some DirectX issues.

Actually, I have no idea how this whole setup works on Mac; from what you've said it sounds like Editor is like running inside a wrapper, but you are still on Mac operating system, and results of compilation are placed in Mac filesystem. Is this correct?

EDIT:
I actualy wonder if our mac port can be setup to run game from anywhere. I mean, if Mac gives such permissions, that might be a matter of passing command line argument or setting something in configuration.

Sorry for the slow response, but yes - you are completely correct. MacOS can use Wineskin (like Linux). So this creates a "Wrapper" which includes all the required Wine libraries to make Windows apps/games run. But it then has access to the host filesystem, so my game's files are all available on my Mac drive like all my other files. It's working really, really smoothly. The only thing I need to tinker with is which Wine-libraries to install into the wrapper to get the game to actually "run", hence why I'm resorting to ScummVM for the time being. Running the game gives me some error messages, which I think are DirectX related, but I'm not well-versed in the intricacies of Wineskin/Winetricks/Wine to fully realise what packages/dlls I'm missing/misusing. So for now, the Editor running on my Mac is just an amazing tool to have and as I said, ScummVM just works very well for me as a testing platform to run my games on. The only issue is that ScummVM is currently very confused with pathfinding algorithms so traversing a map towards a hotspot waypoint takes... an interestingly long time. :)

eri0o

Ah, about porting aga games to MacOS (for shipping), edenwraith has an interesting blog post that may be useful if you need in the future (goes through the signing and notarization process).

http://www.edenwaith.com/blog/index.php?p=112

Hobbes

Quote from: eri0o on Wed 05/05/2021 11:41:29
Ah, about porting aga games to MacOS (for shipping), edenwraith has an interesting blog post that may be useful if you need in the future (goes through the signing and notarization process).

http://www.edenwaith.com/blog/index.php?p=112

Bookmarked for potential future reference, that's a great extensive post on the topic - thank you!

edenwaith

Thanks, Hobbes for mentioning that you've gotten the AGS Editor to run on the Mac.  I'll need to give that a shot at some point.

Fortunately, porting AGS games to the Mac isn't overly complicated and doesn't require the AGS Editor to do so.  (The most complicated part is probably the code signing and notarization.)

SMF spam blocked by CleanTalk