In order to utilize GameMaker: Studio’s Mac support you will need to first prepare GameMaker:Studio and a Mac computer for use as well as fulfil a couple of prerequisites from Apple. To make things easier we have outlined below all the necessary steps for you to take in this setup process.
What You Need To Get Started
If all you are doing is testing your game on the Mac using the "Test Game" (green arrow) button of GameMaker:Studio, you can skip all the developer information and go directly to the GameMaker:Studio section below. However, should you wish to create a finished test game as a .dmg file, or a finished game for distribution through the Mac App Store, you will need to follow the steps outlined below.
Before beginning to work with the Mac module with GameMaker:Studio, you must be a registered Apple developer and have the necessary certificates up to date, as well as have access to a Mac computer. To create a developer account you will need to go to https://developer.apple.com/ and make an account (Don't forget to choose the correct certificate account, as you need one each for Mac and iOS!) then click the link that takes you to the Mac Dev Center. The follow sections will walk you through creating the necessary certificates and creating your first game for the Mac from there...
NOTE: If you wish to develop games for iOS, you can get more details here.
Prepare Your Mac
To start with, you will need to have installed Mavericks on your Mac in order to download Xcode from the store - Snow Leopard (10.6) , Lion (10.7) and Mountain Lion (10.8) are no longer good/new enough. It's always recommended that you use the latest OSX and the latest Xcode, but be aware Apple likes to only provide the newest SDKs each time, which can cause issues with backwards compatibility if you don't backup your SDKs or get them from elsewhere. You can find the version of OS X your Mac has by clicking on the Apple logo in the top left and selecting the "About this Mac" option from the drop down menu.
Once your Mac is up to date and ready, create your local account, then tie the local account to an Apple ID - ideally that of your development account - in the User settings (see image below).
Now open the AppStore and find Xcode (or click here) and start it downloading. This may take a while, but while you are waiting you can go and get the necessary certificates for developing.
Even if you have no intention of publishing games through the Mac App Store, you must have the correct certification supplied to you from Apple, otherwise you cannot create and test any games at all. For testing you will need a Developers Certificate and for creating your final game a Distribution Certificate.
NOTE: This section (and subsequent sections) apply to iOS and Mac equally, as both require that you have a Developer Certificate and a Distribution Certificate to publish to their App Stores. If you are planning to publish to BOTH stores, you may need to do some steps twice, once for each store.
If you're a solo developer or the first person in your team to set everything up, generate a Certificate Signing Request via the Keychain Access application (this can be found in the Applications > Utilities folder). Note that you only need one CSR per computer, so this file will be used for all your games, on both the Mac and iOS platforms. If you have previously created one for the iOS target module then there is no need to create another one and you can skip this step.
This will open the Certificate Assistant wizard, and in the menu for this application choose the default options. Now it's best to go to the Developers Site: https://developer.apple.com/ and sign into the developers account that you created earlier.
Once that is done, you should go to the Mac Developers Center and here you make sure that your details are correct (click the Your Account link at the top of the page to make sure) then go back to the main page and click on section Certificates, Identifiers & Profiles. This will take you to the following page:
Register Your System
When you install and run Xcode 5 for the first time, it should automatically register the Mac computer that it is being run on as a development device (as well as any iOS devices connected to the Mac). However should you wish to register further Macs as development devices, ie: for beta testing your game before publishing, this must be done either through the Development Portal or via Xcode > Window > Organizer, then click the entry on the left for the device you wish to add and you'll find the "add" button there.
If you need to add it via the website, after signing in to the developer portal, you can register you Mac (or register your test devices if you are developing for iOS) from the button labelled "Devices". Clicking this button will take you to a page where you can see all the computers (or devices) that you have registered as development systems, and at the top is a button marked with a "+". If you click that it will take you to the following page:
Here you can give your system a descriptive name and then add the UDID. You can get this by doing the following:
- Click on the Apple logo at the top left of your Mac menu bar
- Click on About This Mac
- Click on More Info...
- Click on System Report
- Make sure Hardware is selected at the top left
- The very last entry in the list on the right will be your Hardware UUID
Once these details have been filled in, you can press the "Register" button which will take you back to the Systems main screen where you will see your Mac listed. For an iOS device, you will need to have it connected to your Mac and get the UDID from the iTunes "Summary" page for your device. Clicking the line "Serial Number" will show the device ID that you can then copy into this form.
Before you can do more than test things on your mac, you will need to make an App Id for your games. This is something that you will have to create for every app or game that you make if you wish to distribute it yourself or sell it through the Mac App Store, or through iTunes.
NOTE: The same procedure outlined here applies equally to iOS apps.
To set this up, in the Certificates, Identifiers & Profiles section, click the section marked "App IDs" (visible on the left) and you will be taken to a new screen that lists all of the currently defined App ID's (if this is your first game then it will be empty) . You should then click on the "+" at the top of the screen to register a new game, which requires you to input a few pieces of information:
App ID Description - the name of your game or app.
App Services - Select the services that you game is to use (Maps are not available for iOS or Mac, and Push notifications are limited to iOS).
App ID Suffix - This is basically the identifying string for your app and it's subsequent certificates. If you are simply developing and testing, then you can create a "Wildcard" bundle ID which will permit you to use the same ID for multiple apps (very useful when developing multiple projects). if you are preparing to upload a finished game, then you should give an explicit bundle ID. Note that this bundle ID should be in reverse URL format, com.[User/Company Name].[AppName].
Once you have created your App ID, you will see it listed under the list of App IDs from the certificates page. Notice that if you click on any App ID, you will be shown the details for the ID and be presented with a button marked "EDIT". This button will take you to another screen where you can add in extra permissions for your app, like iCloud and Game Center.
There are two types of provisioning profile certificates:
- Development Provisioning Profile
- Production Provisioning profile
The first one for development and necessary for creating finished test games, while the other is for distribution (creating for the App Store) and is essential if you wish to market your game through the Mac App Store later.
NOTE: To make a finished game for Mac (not iOS) that is for your own distribution and use, you will only need the development profile.
Creating The Development Certificate
To create the development certificate, you simply need to give a common name for your game, then link it to an App ID, then select the user certificate (that identifies you as a registered Apple Developer) that you want this to be tied to and the computer that you wish to use as your development system.
NOTE: It is recommended that you use some form of suffix for your common name to indicate that this is a test app, as the name you place here cannot be re-used. So, for example, if your game is called "SpaceOut", the common name here would be "SpaceOut Ad_hoc", or "SpaceOut Test". If you simply use "SpaceOut" then when you create the final Production certificate, you will not be able to use that name.
Once you have done this, click the "Generate" bottom at the bottom of the page, and you should then see the following:
As you can see, the development certificate has been created and you can now download it onto your Mac. The instructions for installing the certificate are also given on this page, so you should have no problems in getting this completed.
Now you can start to create finished games for Mac and testing them on your system.
Creating The Distribution Certificate
As with the Development certificate, the Distribution certificate requires that you give a common name and an App Id and that you link the game to an Apple Developer Certificate. This will need to be downloaded and installed on your Mac before you can create a game to be distributed to the App Store or iTunes.
Click your development certificate (IPhone Developer:' [your name] (your ID)) to expose the key tied to it, then right-click on the key and choose "Get Info". Switch to the Access Control tab and change from "Confirm..." to "Allow all...". This will hopefully stop any warnings during the first build which would break the process (more on this later).
You will now need to download the command line tools for Xcode (available from its downloads/updates section) as without this GM can't call Xcode properly. Next, enable remote login via System Preferences > Sharing as shown in the image below:
You should also enable file-sharing for Windows users here, too, and take a note of the Mac name (make sure it's something sensible!) as you will need it for setting up GameMaker:Studio.
With that, you are about done with the Mac and we can now move on to the Windows PC...
Note For Teams
If you were a new member of an existing team, submit your request for a certificate on the developer portal, then wait until your admin/agent confirms the request and you will then be able to download your full certificates. Remember to get your provisioning profile also - your personal/team one and the matching one for your game if a team member has created it already.
If you are an existing team member with certificates already for you on the portal and Xcode has finished downloading, you can try opening Xcode and in its Window > Organizer menu option, sign in using your Apple ID, and just hit the refresh button on one of the pages to do with profiles. That should download everything for you. Refresh a few times, though, as sometimes it won't prompt for every option in the one go (especially if you signed in with a team ID which has plenty of profiles associated with it).
The website is more reliable, but slower and lots more steps involved. Your personal ID will get the certificates and device provisioning profiles you're added into already, but may well not get all of your game provisioning profiles, so you might find you need to use the team ID in order to get fully setup.
NOTE: Ensure you have ONLY the certificates with your name on. If you have multiple ones with your name on, keep the one with the private key attached to it! You don't need other team members', not even the original admin. This is especially important to check if you use the Xcode refresh button, as it will get everything for every team member if you sign in with a team ID. If you get any "ambiguous" errors during the build process it will be because of this.
Now you have all your certificates in order and you have installed Xcode correctly, you can Install GameMaker:Studio (if you haven't already) and do the following :
- Launch GameMaker:Studio
- Enter your License Key
- Create a new Project
- Select File > Preferences > Mac OS X
The preferences tab for Mac OS looks like this:
The top field, Mac Host Name is the name (or the IP) of the Mac on your network that is to host the game, and the Mac User Name and mMac Password sections should contain the details of the account that will be used for testing/creating your Mac OS app. Finally, you can specify the Mac Install Directory which is where GameMaker:Studio will install the necessary files. Please note that you need to enable Remote Login for that user on the Mac for GameMaker:Studio to communicate properly.
NOTE: This must be set up correctly for iOS development too!
Running A Game From GameMaker:Studio On Your Mac
Once you have set up both GameMaker:Studio and your Mac computer, all you have to do is select "MacOS" as the target for your game, and then press either the green "Play" button, the orange "Debug" button, or the "Create Executable" button and your game will be sent to the specified Mac computer. the game should run when it's finished being transferred so that you can play it and test things.
NOTE: For iOS, please see the article Develop And Distribute To iOS
Creating A final Executable
Once you have created your game, you will obviously want to create a final executable for your Mac audience. To do this you will need to click the "Create Application" button at the top of the IDE (or go to the "File" drop down menu and select the option there). Now the type of file will depend on what you have set in the Global Game Settings for your Mac game, with the choice being to build an "App Store ready" app or a simple app for sharing to friends or to other non-Apple stores.
if you are making a game to distribute to friends or to non-Apple stores, then you will want to un-check the option "Build For Mac Store" in the Global Game Settings before you build your game. You can then go ahead and create the executable and when it is finished on your Mac, you will have a folder containing the game .app and the game app.zip (the folder should be "Users/<Username>/GameMaker-Studio/<GameName>"). You can now distribute the *.app file to anyone with a Mac to play.
App Store Apps
For games designed for the Mac App Store, the procedure is the same as above. However you cannot actually run the game on the Mac as you would normally, but rather you need to upload it to the Store using the Application Loader within Xcode. This is a simple enough procedure, which requires you to start up Xcode, then Open Developer Tool > Application Loader. Once you have the Application Loader open, simply follow the on-screen prompts to upload your game.
It is worth noting that you can test these games on a Mac without the need for uploading it to the store beforehand. This is done from the Terminal, which you can open from Finder by browsing to the folder /Applications/Utilities and then opening Terminal. Once you have the Terminal open, you need to use the following:
sudo installer -store -pkg /Users/<Username>/GameMaker-Studio/<AppName>/<AppPackage>.pkg -target /
You will be required to supply an Admin password running this, so make sure you have the correct permissions. An example of how the final command would look is supplied below:
If you are having any issues with the setup and configuration of the GameMaker: Studio MacOSX target module, see the article on Troubleshooting MacOSX Exports.