Porting your game to Windows 8

If you have already created your game for iOS or Android (for example) in GameMaker:Studio and now wish to port it over to the Windows 8 platform (either Native or JavaScript), you should make sure that you have the following requisites:

  • A copy of Windows 8 installed on your PC. This can be the main OS or a sub-os that you can dual boot with Windows 7 (or any other OS you choose to use) but you cannot create a final application for Windows 8 outside of that OS.

  • You must make sure that you have Microsoft .Net Framework 3.5 installed (.Net 4 is installed as standard with Windows 8, but you may need to install the previous version too) which is available here, although when you install GameMaker:Studio on your Windows 8 OS it should complete this part automatically.

  • You will also need to install a version of Microsoft Visual Studio 2012 which can be found here. A version of this product that supports Windows Store Javascript app creation is essential if you wish to use the JavaScript module, as it is needed to create the JS *.pfx file 8(his is not necessary for the Windows 8 Native module). These *.pfx files are your Developer Keys and are needed to submit your apps and games to the Windows Store.

  • The GameMaker:Studio Windows 8 export target (Native or JS) will create an app specifically for the Windows 8 OS, and it will be compatible with many of the unique features that this OS offers the user. However, if you wish to publish this game through the Microsoft Store for Windows, you must have a Microsoft Developers Licence which is available by signing up for an account here. There is a small cost involved in registering for this account and you will need to have a valid bank account and credit facilities to be able to monetise any apps that you submit to the store.

Once you have done all that, it is worthwhile taking a moment to look over the Microsoft Windows 8 Developers Guide as it contains a vast amount of information and recommendations for creating your apps and games so that they are integrated properly into this dynamic OS.

 

Scaling And Resolutions

When porting your game to Windows 8, you should take care to ensure that your game window will be scaled to an appropriate size for the platform. By this we mean that it must run on a minimum screen size of 1024x768, but optimally it should fit 1366x768, as this is the minimum resolution required to support all the features of Windows 8 (including multitasking with snap). For more detailed information on snap views, see the Microsoft guide: Guidelines for snapped and fill views.

NOTE: Windows Store apps cannot run on 1024x600 or 1280x720 resolutions.

You will need to deal with the scaling yourself using the view functions within your game, and you can find an extensive tutorial bundled with GameMaker:Studio to help you. However it is worth noting that there is a special Event in GameMaker:Studio to catch the canvas changes that “snapping” the view in Windows 8 causes. This is the Resize Event (found in the Draw Event category) and here you can place code to pause your game, or to resize or reposition HUD elements etc...

 

Ads

Porting your games with advertising over to the Windows 8 target is an incredibly simple task, with the main difficulty coming from the fact that you will need to sign up for the Microsoft PubCenter and register your app before they will work.

The YoYo Games Knowledge Base has a complete article that takes you through this process (here) and once you have it set up you can then use the same functions within your code that you would use for any other platform and they will be shown correctly.

Be aware that if you are porting from a target resolution or scale different to the minimum requirements for Windows 8 targets, then your ads may be positioned differently, due to them being based on the absolute GUI size, and not on the relative view size. This should be taken into account and can easily be fixed or avoided using the GameMaker:Studio ads functions.

 

NOTE: Ads are only available on the Windows 8 Native platform.

 

IAP

IAP for Windows 8 is handled slightly differently to the other target platforms, so porting your game may require a bit more of a change, especially if you are using consumable purchases. These differences are outlined below, with links and suggestions on how to set up IAP correctly.

  • You must selected “Sandbox (iOS/Windows8)” in the In App Purchases tab of the GameMaker:Studio Preferences to successfully test purchases. This means that your app will not actually be communicating with the store while testing, but rather it will use a local proxy file to simulate the store state for the app (See Current App Simulator for more details).

  • You must have the “Use Internet” checkbox enabled in the General Tab for the Windows 8 Global Game Settings to successfully download from a content url.

  • Consumable purchases are not explicitly supported by the Windows Store. There are workarounds (e.g. see here for details) and the support for iap_consume() simply clears the flag interrogated for iap_is_downloaded() and the set of files downloaded for the purchase.

  • Because the Windows Store is configured such that to change the in-app purchases available for an app means you must update your app and submit a new version to the Windows store, GameMaker:Studio does not support proprietary server activity. This means that you can only call iap_activate() with a list of available purchases (see here for further details).

 

Analytics

Unlike all the other target platforms, Windows 8 does not support Google nor Flurry, but instead use the site MarkedUp for all analytics. This means that you will need to set up an account with them and add in the app code they give you into the Analytics tab of the Global Game Settings.

Once that is done you can then use the analytics functions as you would normally, and you can see the data for your game from the MarkedUp Dashboard (you may need at least 48 hours before the site shows any data).

The Knowledge Base has an article on how to set up the MarkedUp account for your game here

 

NOTE: Analytics are only available on the Windows 8 Native platform.

 

Graphics

You may notice certain things that do not work, or that work in a way you do not expect, when creating games using the Windows 8 JavaScript module (the Native module should display the game exactly the same as the standard Windows export). This is due to the fact that it compiles to JaveScript, meaning that the following is not available for that module:

  • primitives

  • gradient blending (for text, backgrounds etc... only the first colour will be used)

  • blend modes

  • view angle

  • 3D

Basically, you should treat the Windows 8 (JavaScript) module the same as you would the HTML5 module as the limitations are practically the same.

 

Touch Screen Support

Your Windows 8 app must fully support touch screen devices, otherwise the store submission will fail. This can easily be achieved using the mouse itself, which simulates a single touch with a single click, or using the special device_mouse_*() functions which enable multitouch. You can also use Virtual Keys to create on-screen buttons should your game require simulated keyboard control.

Note that GameMaker:Studio does provide a special function for detecting if the Windows 8 device has a touchscreen or not, win8_device_touchscreen_available(). Using that function you check the input method and change the controls on a per-device basis.

 

Unique Features

The Windows 8 target offers many unique features that no ther platform provides. It is strongly recommended that you integrate some of these features into your game as they will help it fit in better with the other available games, and also help maintain a constant user experience on Windows 8.

You can add Live Tile support, App Bar support, custom Settings for the Settings Charm and you can also share content easily using special the functions win8_ included in GML. To get an overview of these functions (along with simple code examples) please see the page Windows 8 Platform Features.

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk