Setting Up For Windows

GameMaker Studio 2 Desktop comes with three export platforms: Windows, Mac and Ubuntu. In this article we give the required steps to get the Windows platform up and running on both the Windows and Mac IDEs.

 

General Information

After installing and running GameMaker Studio 2 on a PC you should be able to test projects immediately using the "Windows" target using the Targets Manager window, located in the top right of the main GMS2 workspace:

Windows_Targets.png

(If you previously had a free Trial license, then you will be used to seeing the "Test" target here, but this psuedo-target will no longer be listed once you have the Desktop module.)

For the Windows target platform you can see that there are two output options:

  • VM - This will build your game using interpreted code. 
  • YYC - This will build you game using compiled native code.

The VM option will build your game and use interpreted code within a special YoYo Runner. The performance of this target is less optimised than YYC, but it is faster to compile and offers the ability to run in debug mode (if you target the YYC and try to do a debug run, GameMakerStudio 2 will notify you that the build will be completed using VM instead). The YYC target gives much greater optimisation and a corresponding performance boost, especially with logic-heavy games, but be aware projects will take more  time to compile.

When compiling for VM, GameMaker Studio 2 requires no further setup, as VM builds do not require Visual Studio or any other external tools to be installed on your PC. Of course, later on, you will need to make sure that your Windows Game Options are correct before trying to build/publish your project (see the manual for more information).

If you wish to compile using YYC or you are using the Mac IDE, then you will need to do a couple of additional steps...

 

Setting Up A Remote Worker (Mac IDE)

To compile your project from the macOS IDE to Windows you will need to use the GameMaker Studio 2 Remote Worker app. This requires you to have a windows PC and have it visible to your Mac over a LAN. For information on how to connect your Mac and PC in this way, please see this Apple Support article:

macOS Sierra: Connect to a Windows computer from a Mac

Once you have your Mac and PC connected and are able to transfer files between them, you need to open GameMaker Studio 2 and click on the Target Manager and then click the "eye" icon to find the Remote Worker Installer folder:

Target_Manager_Install_Remote.png

This will open Finder on the folder with the Remote Worker Installer executable, as shown below. Use Finder to now copy this Windows executable file to a location on your PC.

Remote_Worker_In_Finder.png

Once you have copied the remote worker setup file over, it needs to be installed on the PC (you do not need to install GameMaker Studio 2 itself, just the Remote Worker). When finished, it will run and in doign so open your default browser to the Remote Worker Welcome Page:

Remote_Worker_Welcome.png

IMPORTANT! Your PC may give a firewall alert when you first start the Remote Worker and also when you do your first remote build. This is normal and you must permit the connection requests.

In the screenshot above you can see that we have highlighted the IP address and port of the Remote Worker. That is because you will need this for your Mac, so that it knows which PC to communicate with (you can set up more than one Remote Worker on different PCs if you require them).

Back on your Mac, you need to go back to the Target Manager and in the Worker column click the (+) sign to add your new PC remote worker:

Add_Remote_Worker.png

You will then be prompted to give your Remote Worker a common name (this is what will be shown in the Worker list in the Target Manager) and then the Host Name. The Host Name is simply the IP:Port value that was shown in your PC browser when you installed/started the Remote Worker:

Add_Worker_Window.png

Clicking the "Add" button will test the connection and if all is okay it will add the Worker into your Target Manager list and when you select it you will see that the build targets change to show the different targets that this worker is capable of building for you.

You should now be able to select the Remote Worker from the Workers section of the Target Manager, ready to test a project. You can skip down to the Testing Your Projects section if you are happy to use the VM for testing and compilation, but if you wish to use the YYC then you need to continue on with the following steps.

 

YYC Requires Visual Studio

Before you can build YYC versions of your projects you will be required to download and install Visual Studio for Windows (if you are using the Mac IDE then this will need to be downloaded and installed on the machine used for your Remote Worker).

Currently, both Visual Studio 2015 and Visual Studio 2017 are supported so you can use either (although if you are developing for UWP, then you should be using VS2015 for now, so you may want to stick with that for regular Windows exports too). You can get the free Visual Studio Community 2015 here (note that you may need to sign up for the free MS Dev Essentials package to access the download), and you can get the free Visual Studio Community 2017 here.

Please note that both VS2015 and VS2017 require you to be running at least Windows 7 with SP1. If you do not have SP1 installed, Visual Studio will refuse to install. (Win 7 + SP1 is the minimum required to run GMS2 anyway, so you should already have this.)

Once downloaded, start the installation process, and then follow the steps outlined below for the version that you are installing.

 

Installing VS 2015

When you start the installation and have chosen an install location, you need to then then select the Custom option and click Next. This will take you to a window that shows the different components that you want to install, of which you should choose those marked in the image below. Note that these differ from the defaults, so ensure you do set these, otherwise GMS2 will fail to find your VS install in Preferences.

Windows_VS_Install_UWP.png

Click Next to see a summary of the components to install and then continue. Once the install process has finished, you can go back to GameMaker Studio 2.

 

Installing VS2017

When you run the installer for VS2107 you will be presented with a welcome screen where the products available for installation are listed. In this case you want to select Visual Studio Community 2017, which will then open a further window where you can select the components required and the install path for them. Note that install options shown in the image below differ from the defaults, and only show the minimum required options for GameMaker Studio 2 to build Windows YYC packages.

VS2017_Components.png

Click Install to install the selected components, and then restart your PC to finalise the installation.

 

YYC Requires Extra Preferences To Be Set (PC)

With Visual Studio 2015/2017 Community now installed, we need to go back to GameMaker Studio 2 and open File > Preferences, then browse down to the section Platform Settings and finally the Windows section:

Windows_Prefs.png

Here you should type the path or browse to the install location of Visual Studio 2015 (as shown in the example path above).

If you are using Visual Studio 2017, then you will need to supply a path to the "vcvars32.bat" file, which should be in the VC > Auxiliary > Build sub-folder, e.g.:

VS2017_Bat_File.png

You can also choose which type of package to compile the final executable to by default here. "Show message" means it will always ask you, or you can set it to always create an NSIS Installer or always create a Zip.

If your install of Visual Studio says it cannot be found, ensure that you have installed all of the correct VS components as shown in the VS setup section above.

 

YYC Requires Extra Preferences To Be Set (Mac IDE)

With Visual Studio 2015/2017 Community now installed on the PC, we need to point the remote worker at it so we build YYC projects. For that you need to start the Remote Worker app on your PC if it's not running already and then click the Settings button at the top:

RemoteWorker_Settings.png

When the Settings page opens, scroll down to the section for Windows and then give the path to the VS install. The exact path you use will depend on which version of VS you have installed, where VS 2015 requires the path to the install folder and VS2017 requires a path to the vcvars32.bat file, as shown in the images below:

RemoteWorker_Paths.png

You should now be able to compile your games using the YYC target through the remote worker. If you have any issues, make sure to revise your Visual Studio installation and ensure that all the required components have been installed (as outlined in the sections above).

 

Testing Your Projects

You are now ready to test your project. Regardless of whether you are using the VM or YYC output, you can simply click the "Play" button at the top of the IDE and the game will build and then run.

On Mac you will need to have started the Remote Worker app on your target PC and selected the appropriate worker from the Target Manager:

RemoteWorker_Compile.png

Note that on PC, when using VM builds, you can also test play your game using the "Debug" option at the top of the IDE (in the Mac IDE this button is disabled as you cannot currently debug remote worker builds). This will run the game and launch the debugger and connect it to the game (this may require some extra permissions from the OS, so accept any firewall prompts you get for the debugger or the game). The debugger allows you to see in detail how your game is performing as well as set breakpoints and check for issues or bugs. For more information, see the manual.

 

Compiling Your Final Executables

Once you have finished your project and tested it to make sure that it works, you'll presumably want to distribute it as an executable package to pass (or sell) to others. To create this package for distribution is a case of simply hitting the Create Executable button at the top of the IDE and then select from one of the two options presented (this choice will not be presented if you have changed the default value in the Preferences, as mentioned earlier):

Windows_Packages.png

We strongly recommend that you use the "Package as Installer" option, as that ensures that all the files that your project requires are installed along with the project and that Windows treats the game as a proper installed application - so your player will get shortcuts and the game will appear in control panel to uninstall later, etc.

The other option, "Package as Zip" will create a compressed ZIP file which the user then has to extract on their computer to run. It will be a standalone executable and no shortcuts are made.

If you want to publish games on Steam then you must make a zip package - if you send Steam an installer executable, then the game will fail to work for players. Depending on how you have configured your project in Steamworks, you then either upload the zip itself or (more commonly/historically) you extract the zip temporarily and then upload the loose files and folders to maintain the file structure.

Once you have selected the package type, you will need to select a save location on your computer and your project will then be built and packaged ready to distribute. When the compilation has finished, GMS2 will open Explorer at the created installer/zip file's location.

Note that using the Mac IDE, this process is the same except that the remote worker will build the project for you and then return the installer/zip file to the location on the local Mac which you specified for saving to.

 

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk