The second platform that Construct 2 can export your game to is the desktop. In publishing to the desktop, Construct 2 has a very straightforward way of exporting. The easiest way is exporting using the node-webkit; node-webkit is just like a Chrome web browser, but it is designed as standalone software. Being a standalone version, it doesn't have an address bar, a back button, and tabs.
An advantage of exporting using node-webkit is that your final game file can be played on all the major desktop operating systems, such as Windows, Mac OS, and Linux. You only need to perform one export process for all three platforms as follows:
The export options that you will see next are just the same as when you export to the Web. After deciding where to put the exported files, just click on the Export button. Here, you'll see the export options for node-webkit. I will explain these options to you in a nutshell:
These modes can be seen in the following screenshot:
linux32
, linux64
, osx
for Macintosh, and win32
; each folder contains the game files for their target platforms. The files needed to play the game for each OS are inside the respective folders; for Windows, you only need to double-click on the .exe
file.An Open Web App is an HTML5-based app format that any digital application store can use; this format is invented by Mozilla. Even though it is intended to be able to be used by as many application stores as possible, right now, only Mozilla is using it for their Firefox marketplace. Firefox marketplace apps can be installed on the desktop from the Firefox browser or even from Firefox on Android.
As a game exported on a Firefox marketplace can be played on a desktop and mobile, it is advised that you check whether the player plays it from their desktop or phone. You can do this from the tips I gave in Chapter 9, Mastering the Best Practices. Exporting to the Firefox marketplace is a good alternative compared to using node-webkit; it is almost as easy, and it's ready to be distributed to a lot of people using Firefox.
A packaged app is the easiest way to export to the Firefox marketplace, because you don't need your own hosting. If you don't need any permission from the player, you can just click on the Export button. After the exporting is done, go to the exported files
folder and archive all of them to a ZIP file. This ZIP file is the file you submit to the Firefox marketplace.
To make a ZIP file, first select all the files you want to archive and then right-click on them and select Add to archive…:
A dialog window will show up; change the archive format to ZIP and rename it to whatever you want to, but it's better to name it similar to the game you're uploading. When you're done, click on the OK button, and the files will be archived.
Make sure that you package all the files in the folder to a ZIP file and not the exported folder where all the files are placed. This is important, as the index.html
file must be at the top level in your ZIP file. This is because when submitting to the Firefox marketplace, the marketplace will look for the index.html
file at the top level of your ZIP file. If you zip the folder where all the files are located, the marketplace won't find your index.html
file, and your game will be rejected.
Exporting a hosted app is a bit difficult because you must also set up your hosting. Perform these steps to export a hosted app:
http://www.yoursite.com/games/gameName/
, the server path should be set to /games/gameName/
. After that, you can export your game.application/x-web-app-manifest+json
: This is for the .webapp
file extension. This is a must; the Firefox marketplace won't allow you to submit an app if this is not done right.text/cache-manifest
: This is for .appcache
so that offline support works.audio/ogg
: This is for .ogg
so that the .ogg
audio files can play.audio/mp4
: This is for .m4a
so that the .m4a
format audio files can play.More information on exporting to Open Web App can be found at https://www.scirra.com/tutorials/430/how-to-export-an-open-web-app-for-firefox-marketplace.
Again, if you are not sure about setting MIME types, ask your web host support team; if you want to know more about MIME types yourself, visit https://www.scirra.com/manual/168/mime-types.
Now that all the files are prepared, it's time to submit your game to the Firefox marketplace. To start, go to https://marketplace.firefox.com/developers/ and sign up for a developer account. After that, you can submit your game through https://marketplace.firefox.com/developers/submit/. For a hosted app, you need to provide the full URL to the .webapp
file, while for the packaged app, you simply need to upload your game's ZIP file.
When submitting, you can also provide more details of your game and select what devices you support. Since Construct 2 is a cross-platform engine, you should be able to support all platforms.