Testing and Publishing
Testing your game
To test your game during development you can preview it by clicking the "play" icon in the quick access toolbar or ribbon, pressing F5, or by right-clicking a layout in the Project Bar and selecting Preview. This uses a local server to preview your game on. You can change the browser that you preview with using the Preview browser setting in Project Properties.
If you have mobiles, tablets or other laptops/PCs you want to test on, previewing over your local network (e.g. Wifi) can make testing considerably easier. For more information, see the tutorial How to preview on a local network.
You can also hold shift and preview to do a continuous preview. This saves the game, updates it, then loads the previous state again. For more information, see the tutorial How to use continuous preview.
The debugger can also be used to test your game with additional information and tools available. Further, breakpoints can be set in events to investigate how they are working.
You must export then publish (i.e. upload) the project before anyone else can play it. You cannot share the URL during preview over the internet.
To export your project, use the File menu, ribbon or Project Bar to open the Export Project dialog.
If you are interested in the technical details of exported projects, see the Technology section.
Construct 2 does a lot of work at export-time to optimise your project. For more information, see the tutorial Construct 2's export-time optimisations.
Some tips about exporting to commonly-used platforms follow.
Publishing to the web
Choose the HTML5 export option to publish to the web. Note the HTML5 export cannot usually be run from disk. Your project must be uploaded to the web (for HTML5 export) or otherwise published before it will work.
If you control the web server you are publishing on, make sure it supports the correct MIME types to ensure all features work correctly.
It's possible to use fullscreen mode and orientation lock in some mobile browsers. For more information, see Fullscreen and orientation lock in browsers.
For more advice about publishing games to the web, see the tutorial Tips on publishing HTML5 games to the web.
Publishing to mobile
Choose the Cordova export option to publish to major mobile platforms like iOS and Android. Cordova is a cross-platform library for mobile publishing, so there are no specific "iOS" or "Android" options in the Export dialog; Cordova covers them both.
For more information about publishing mobile apps with Cordova, see How to export to mobile with Cordova. The exported Cordova application can be built as a native mobile app with services like the Intel XDK (free), PhoneGap Build or Cocoon.io. Note that the non-browser alternative engines Cocoon.io provides like Canvas+ are not officially supported. Although you can use them if they work for you, the only officially supported options are the Webview-based builds.
You can also build Cordova apps yourself using the Cordova CLI (Command Line Interface). However this involves setting up and configuring several advanced developer toolkits, and so is not officially supported. If you are already familiar with this approach or are willing to learn it you can try it out, but note it is not officially supported so Scirra cannot provide assistance for those using these tools.
Publishing to desktop
Choose the NW.js export option to publish to desktop platforms. This covers Windows, Mac and Linux. As with Cordova there are not specific "Windows", "Mac" and "Linux" options in the Export dialog; NW.js covers them all.
For more information about publishing with NW.js, see Exporting desktop apps with NW.js. Note NW.js support must be installed separately from scirra.com/nwjs, but is a free download.