The Windows 8 module has some functions that are specifically designed to be used by the games that target it. These functions make the most of the Windows 8 tile system as well as permitting you to access and share files from within your game. The following functions have been split into the relevant sections to make finding the right one for your needs easier. Please note that these functions are for the Windows 8 desktop and Surface platforms, not Windows 8 Phone. For Windows 8 Phone please see the following section:
NOTE: The Windows 8 (JS and Native) target won't allow
multiple instances of the same app to run at a time, and if the
file is running it can't overwrite it. This means that you will
have to close the app before saving/testing a new version, and even
then you may have to wait a short period of time between builds to
enable Windows to close the app correctly.
Windows 8 games can run on devices that may, or may not, have a
touch screen. This means that your games have to be developed with
this in mind. To make things easier for you there is a special
function for detecting whether the device running the game is touch
enabled or not:
WARNING: If you have any functions in your
Windows 8 game that require an internet connection, like an open
URL call for example, then you must have the "Use
Internet" capability ticked for the game in the Global Game
Settings. Microsoft also specifies that if you use this capability
you need to add a link to your Privacy Policy in the
Settings pane of your Windows 8 game (see here as well as the functions for using the
Settings Charm for further details).
With the Windows 8 OS your game (or app) will be associated with its own Live Tile. A live tile is a dynamic link to your game which updates in real time, meaning that you can "push" images and text onto them for the user to see at specific times form your game. The following functions are the recommended method for creating Live Tile notifications:
However, there also exists the following legacy function (which should only be used if absolutely necessary):
Apart from pushing notifications to the main tile there are also a number of further things that can be done, like adding a badge or clearing the tile, using the following functions:
You also have access to the Secondary Live Tile. This is
a second type of Live Tile that can be pinned to the main start
page and used to access a specific section of your game, for
example a saved game. It can be quite tricky to set up and get
working as you need to supply certain command line
parameters which will be parsed later by your game when it is
called on from the secondary tile (using the parameter_string
function). The following is a list of all the secondary tile
functions:
NOTE: a Secondary Tile will include all of the mandatory
properties used to create the standard wide tile.
You can find a list of the available Template Strings available for some of the Live Tile functions here:
The App Bar is a special bar of buttons that can be made to pop up by right clicking on your game. These buttons can be defined through the following functions and linked to scripts within GameMaker: Studio to create pause menus, options etc...:
When in your game, if you move the mouse to the top right (or bottom right) of the screen, a side-bar slides out that shows different "charms" (icons). These functions give you the ability to add custom options to the "Settings" charm, either through internal scripts, or external XAML formatted files:
These functions are effectively an advanced "Cut and Paste" option for Windows 8 and permit you to send information as either text, an image, a file or even as a URL:
Windows 8 can permit your game to search through the system as you would any other window. These functions control this:
The Windows 8 App Store permits your game to be marketed with a trial period. This will let people play your game for a limited time with (if you choose) limited features and then, at the end of the trial period, it will prompt the user to buy the full version. The following functions can be used in your games: