Developing Games for Windows on a Mac

Recently, I have been forced to work with Windows for some development projects. In this post, I’m going to dive into 3 issues I faced, and how I worked around them. This is a beginner-friendly post for Mac users.

My entire workflow is Mac-centric. That’s where I write, design, model, code and build. But recently I worked on a series of games built in Windows-only-Construct2, and then for an app which requires special hardware only compatible with Windows. I absolutely did not want to buy a second machine, but keep doing everything on my Mac Book Pro.

I found solutions for efficiently keeping my content creation workflow – like graphical asset creation, 3d modelling, animation and project management tasks – on my Mac, while developing on Windows and switching back and forth between OSes. There is no magic, but I thought I’d share.

1. Switch Tasks Efficiently

Switching back and forth between Maya, Unity and Mono Develop is easy when you’re in a single-OS environment, i.e. MacOS. And its the first thing that breaks when you switch to a new OS. First, I tried working with Bootcamp, Apple’s own (free) tool for running Windows on a Mac. I didn’t even last a day with that setup: I was missing all my tools, took forever to accomplish my tasks, and often meant rebooting my Mac to switch the OS. It’s hell.

A Virtual Machine is the solution, and I opted for buying VMWare Fusion, which helps loads. Windows is now just another application I start from the dock. Command-Tab Switches between all Applications, including Windows, which runs in its own Window.

In Windows itself, I reduced my applications to the minimum: Unity3d, Construct2, VisualStudio and Sublime Text.

2. Exchange Data between the OSes

The next issue was to efficiently feed my graphical assets into my projects in Unity3d or Construct2, and get data back. The easiest way to to this is via shared folders: In VMWare “Virtual Machine > Sharing > Enable Shared Folders”. This makes all the folders you share on your mac be available in Windows as network drives. I started putting all projects on these shared folders, having them accessible for Mac and Windows.

But this came with some nasty quirks, which I only noticed later:

  • Code completion stopped working in VisualStudio
  • Unity kept throwing errors, such that files were not accessible, or that an URI was too short
  • Graphical Assets places in the project folder were not automatically reloaded by unity or seen by Construct2, leading to quite a few errors. The game engines simply hadn’t noticed that they were working with a cached version of a file, that simply didn’t exist anymore.

After lots of searching I finally found this article, which delivered the decisive workaround: Map the network drive as a drive. In Windows this is as easy as opening the File Explorer, right clicking on My Computer, and selecting “Map Network Drive”. Now simply copy the network address of the folder.

Map Network Drive in Windows
Mapping the shared drive brought back code completion and a lot of comfort functions.

As the last step, close your unity / Construct2 project and reopen it from the newly mapped drive. Magically, code completion and all the other little details start working again.

3. Performance

Performance is an issue. Period. It’s just not as fast to emulate Windows via Virtual Machine. Especially for games this is a problem. One that most developers will not be able to work around. For my part, I only used this setup with simple HTML5-Canvas games and applications in which high performance was not so much of an issue. When possible, thanks to filesharing, it is still possible to build for Mac and test the build right away in a environment with normal performance.

VMWare also offers 3 options to view Windows: full screen, in a window, or in unity mode, meaning that windows programs appear like mac applications within the MacOS environment. Performance goes down in that order. Unity-Mode (that this has the same name as the game engine is unfortunate) is unusably slow, Window Mode can work for certain tasks, but full screen is really what works best for me. I also have a 2-monitor setup, which definitely helps additionally. But especially for WebGL/Canvas, the performance remains insufficient for real-life testing.

That’s it for now, there are some other issues which I’m still figuring out. Feel free to comment. I’d be interested to know your experiences.