This post is part of 3 week series giving current and aspiring game devs the tools, resources, and advice they need to get started building for Windows. Check out the overview of the series to find what you need. For additional resources to build your app check out AppBuilder.

Creating a game for Windows 8 is easy and fun with Construct 2. Construct 2 is a HTML5 based game editor developed by Scirra. It is targeted primarily for non-programmers for developing games in a drag-and-drop fashion in a visual editor and a behavior-based logic system.  Construct 2 is a game framework to support cross platforms including Windows 8, Windows Phone 8, iOS, Android, Chrome Web Store, Web (HTML) and Facebook.  It’s Free and inexpensive, if you haven't already, download the Free edition and start with the Beginner's guide! Construct 2 has very easy to follow tutorials for all different levels and excellent forums to get questions answered for your game development.

If you are interested in developing windows phone app, look into exporting to Windows Phone 8 as well (which must be done separately).

In this article, we will be covering the following topic:

  • How to Setup
  • Windows 8 Development
  • Exporting from Construct 2 to Windows
  • Testing Games in Visual Studio
  • How to Publish to Windows Store
  • How to make money with Windows Games
  • How to Work with Cloud Service
  • How to Work with Facebook
  • Acquiring Gaming Assets

How to Setup

You'll need Windows 8.0 or 8.1. You then need to install Visual Studio 2012 Express for Windows if you plan to make a Windows 8.0 app, or Visual Studio 2013 Express for Windows if you plan to make a Windows 8.1 app. Both are free downloads and can be found on the Visual Studio downloads siteWe recommend exporting for Windows 8.1.  It's the latest version, and is available for free upgrade to Windows 8.0 users.  Also it runs IE11 instead of IE10 as the browser engine which adds a lot of new HTML5 features such as WebGL support.

Windows 8 Development

In order to develop good games on Windows 8, here are a few things you need to develop to leverage the great features on Windows 8.

touch

 

  • You can add the Windows 8 object to your project to integrate with Windows 8 specific features like in-app purchases.

windows8Object

The Windows 8 object provides access to platform-specific features available when running as a Windows 8 app.

Roaming data

The object's features to use roaming data are designed to be used the same way as the WebStorage object. Familiarity with WebStorage will make it easier to use the roaming data features. The main difference between WebStorage and roaming data is that in Windows 8, roaming data is synced between all the user's devices.

As with WebStorage, all roaming data values are strings. You can store numbers in roaming data, but they are automatically converted to strings. To convert a string back to a number, use the int() or float() system expressions.

Test mode

Enabling the Test mode property of the Windows 8 object allows you to test purchases work before publishing to the Windows 8 Store and without having to spend any money. However you must turn Test mode off before submitting to the Windows Store, otherwise your app will be rejected.

While in test mode, at startup a message will appear every run reminding you the app is in test mode. The purchase state is then loaded from WindowsStoreProxy.xml which you can use to simulate various states of trial, purchase, item sales, and so on. The various purchase related conditions, actions and expressions will then work based on the simulated state. Note nothing you do in the app will affect the content of WindowsStoreProxy.xml - it only affects the currently running session and will reset to the XML's description on the next run.

About, Support and Privacy settings

By default the Windows 8 object adds three options to the Settings charm: About (for general and version information), Support (information on where users can get help for your application), and Privacy (a page including the privacy policy for your application). These can be enabled or disabled individually in the Windows 8 object's properties.

It is highly recommended to include all of these settings if possible, since doing so can help your application be approved in the Windows Store. If your app requires to access internet, a privacy policy is also actually required.

After exporting, your export folder will contain three HTML files: about.html, support.html and privacy.html. You should edit the content of these files as appropriate for your application.

Exporting from Construct 2 to Windows

Here are a few steps you need to follow to export the game to Windows:

  • Ensure your project has the right Name, Description and Author properties set, since these will be used in the exported app. If you have any of these properties missing, the export will fail.
  • In the Export Project dialog, choose Export for Windows 8 and follow the next steps as you would for exporting an ordinary project.

export 

Select Windows 8 as the following

window8Export 

You can use the default setting.  Note, don’t select Minify script if you don’t have Java installed on your machine.  Click Export.windows8ExportSetting

  • You'll also have the option to choose between exporting a Windows 8.0 app (using Visual Studio 2012) or a Windows 8.1 app (using Visual Studio 2013).

  • After you have successfully exported to Windows 8, In the export directory you will find a Visual Studio project.
    • The main project file has the extension .sln (solution). Double-click it and Visual Studio should open it.

Testing Games in Visual Studio

From now on, you will develop the Windows 8 game using Visual Studio.

Find the "Solution Explorer" bar which lists all the files in the project. Double-click package.appxmanifest. This file contains all the settings for your app.

appxmanifest 
There is one thing you need to set up because Construct 2 can't export it for you, which is the publisher certificate for your app. Click the Packaging tab, which probably has a red X by it because the certificate is not set.

packaging 

  • Now click Choose Certificate.... In the dialog that opens, click the dropdown and select Create test certificate.... Test certificates only allow you to test your app. When publishing to the Windows 8 App Store, you'll need a different certificate to publish your app.

createCertificate 

  • Click OK to the next dialog. A dialog appears with your Publisher ID and a password entry. Don't enter a password - leave it blank and hit OK. Click OK on the Choose Certificate dialog as well, and you should now have a certificate set. If you've done this correctly the red X should have disappeared too.

testCertificate 

  • Now you can launch your app by pressing F5 or clicking button  runLocal. Visual Studio will build it and launch it as a Windows Store app. If your machine doesn’t support touch, you can also select Simulator to mimic the touch effort. 

Simulator

In addition, Simulator also can mimic multiple screen resolutions, different orientation, GPS and perform screen capture for the size of 1366x768 images which are required to attach during app submission as the app images in the Windows Store.

How to Publish to Windows Store

To publish your game to the Windows Store, you need to do the following:
  • Get a developer account. A developer license lets you test and build apps, but you need a developer account if you want to submit apps in the Windows Store.  You can get a free develop account if you qualify for the following -- have MSDN subscription,  work for a startup(BizSpark), a student in college(DreamSpark).

  • Submit your app to Windows Store. It tells you step by step how to submit your app to the Windows Store and it also explains how the app submission process works

The website will take you through all the necessary steps and provide the publishing dashboard from where you can publish apps to the Store.

In Visual Studio, you can easily submit the Game App into the Windows Store. You need to do the following:

  • Prepare 4 images: In package.appxmanifest, select Visual Assets tab. You need to prepare four image files with the required dimension in () for the app icons and splash screen image: app-logo.png (150x150), app-smalllogo.png (30x30) app-storelogo.png (50x50) and splashscreen.png (630x30). You should replace these with your own images but keep them exactly the same dimensions.

4logos

  • Then follow the steps are highlighted below in Visual Studio.  Basically, you need to open developer account, reserve your app name, acquire developer license, associate app with the store, create app packages and finally upload the app packages to the store.

storeSubmission 

  • Briefly describe for your customers what your app does in the app description step.
  • Add notes about this release for the people who will review your app.  Note, add good notes for app testing or any information you would like testers to know about this app.

How to make money with Windows Games

You have a great game made with Construct 2 and you want to make money.
There are multiple ways in which you can
monetize your Windows 8 apps. This tutorial is to enumerate the various ways and hopefully help you chose the best option for your app.  Here is the summary of the tutorial:

1. Free app

User can download and use your app for free for indefinite time.

2. Full-featured paid app

When you submit your app through the Windows Dev center, you will get a chance to price your app for $1.49 and above. Such apps MUST be purchased by the customer before they can use it. Unless you earn reputation, people might be wary of paying before having a chance to try out your game. For this reason, Windows Store provides the following options as well.

3. Time limited trial-app

You can list an app for a price and specify the expiry date of the trial. After that period, the customer will not be able to launch the app. But during the trial period, the app will be fully featured. Windows does all the license checking and validation. This is still better than option 2 because user gets a chance to play your game.

4. Feature limited trial-app

You can list an app for a price and specify an expiry date. In addition, you can also limit the set of available features during your trial game.If you want to achieve this behavior, you can do so as explained in this plugin.

5. In-app purchases

You can list your game to be free or type 2 or 3 or 4 above and also include in-app-purchase offers. These can be used to unlock more levels, enable virtual points/virtual goods/power-ups etc,. Important thing to note is that In-app-purchases can be offered and available for users only in a full version of app -- either a free or fully-paid version. These are not available when the user is using a trial version of your app. You may also be interested in Henry Hoffman's tutorial on how to add in-app purchases to Windows 8 games.

6. In-app advertisements

As noted above, you can show advertisements in the following cases. You can add advertisements in combination with the above choices by following this post.

  • Free game with ads
  • Paid game with ads in trial mode; Remove ad in full version.
  • Free game with ads, with an in app purchase option to remove ads (the advantage/the only difference is that your app will be listed in Free section as opposed to the "Paid game with ads in trial mode" which will be listed in paid version)

In all the above options, regarding the pricing information for your app - like how much your game costs, how long is your trial period, what are all the in-app-purchase features that you would like support, what is the price for them, etc.. you will get a chance to fill these details when you upload your app for certification through the Windows Dev center.

How to Work with Cloud Service

Saving to the cloud is a great way to seamlessly store data for achievements, leaderboards, save games, user data and lots more! A plugin for Construct 2 makes it easy to integrate the power of Azure Mobile Services into your games for Windows 8.

How to Work with Facebook

If you are interested to integrate your game to Facebook, here is an interesting tutorial.

Acquiring Gaming Assets

Art Assets http://opengameart.org/
Open Source Sound Editor - Audacity

http://audacity.sourceforge.net/#

Open Source bitmap image editor - Gimp http://gimp.org/#
Open Source vector graphics tool http://inkscape.org/#
Great graphics tutorials http://2dgameartforprogrammers.blogspot.com/#