Chapter 10. Publishing Your Game

This is it! This is the big moment; it is the time when your game gets its way out of your PC/laptop and into other people's machines, to be played. Construct 2 can export your game to a lot of different platforms, from mobile to desktop to the Web. I'm going to help you to publish it to all these platforms.

In this chapter, you will learn:

  • How to export your game to popular web-hosting sites and Dropbox
  • How to export your game to the desktop
  • How to publish your game to the mobile platform

Exporting to the Web

Alright, the first thing I want to show you is how to upload the game you made to the Web. Uploading your game to the Web means that you're packing your game in an HTML5 game format and want to let other people play it. There are two kinds of websites you can upload your game to:

  • Sites that you control/own: Sites that you own are those that you have control over; for example, your own site or a file-hosting site where you have an account, such as your Dropbox account.
  • Sites that are owned by publishers: Sites that are owned by publishers are sites where people go to play games. Some of them allow their users to upload their own game to be played by other people; examples of this are Kongregate and the Scirra Arcade.

Exporting as an HTML5 game

Before we upload our game to any of these sites, let's export our game to the appropriate format, the HTML5 game. In this example, we will export the game we made in Chapter 6, Creating a Space-shooter Game, which is the space-shooter game. To do this, perform the following steps:

  1. Select the File menu in the upper-left corner and then select Export project.
    Exporting as an HTML5 game
  2. After you click on it, you'll see a window with a wide selection of formats to export to; each one is grouped by its platform. For the web platform, you can see that there is an HTML5 format that can be used for most websites, including your own. Also, there are export formats that are customized for some sites, such as the Scirra Arcade and Kongregate.

    Select HTML5 website and then click on Next. You'll be asked where you want to put the exported game files. By default, this goes to a new folder on the desktop screen, but you can change it to wherever you like.

    Tip

    You can also change the default name for image files and other game files, such as the audio files. You can also choose how Construct 2 compresses the image; better compression means smaller image files but a slower exporting process. If you're not sure which to pick, always choose the recommended option.

  3. One important thing to note is that you must always keep the Minify script checkbox checked. This is to make it hard for people to decompile your game code. Decompile or decompiling is the act of breaking into other software's code without the permission of the software maker. People who decompile your game can clone it after that. Uncheck this checkbox only if you want to allow people to look into your code. This feature requires Java to be installed on your computer; note that Java is a different technology than JavaScript.
    Exporting as an HTML5 game
  4. After you click on Next, you'll be asked to choose a template for the HTML5 game, whether it's Normal style, Advert bar style, or Embed style. A small description is written below the selections to give you an idea of what to choose. If you just want to show your game on your website, then the Normal style is good enough:
    Exporting as an HTML5 game
  5. After selecting the format in which you want your game to be, click on the Export button. After a few seconds or minutes, depending on your game, your project will finish exporting and will be ready to be uploaded to the Web.

Tip

Construct 2 games exported as HTML5 won't work offline, that is, if you just open the index file from your local computer; they must be uploaded somewhere.

Uploading games to your Dropbox

Unfortunately, just exporting your game won't ensure that other people will be able to play it; you need to upload it somewhere. The easiest place to upload it is to Dropbox, because you just need to upload it to the public folder, and everyone can play the game. I assume that you already have a Dropbox account and a Dropbox folder on your computer; if you don't, then you can just go to https://www.dropbox.com/ to sign up and install a Dropbox folder on your PC.

Once installed, open your Dropbox folder. In this folder, you can create folders to save your files on the cloud. However, the only folder that other people have access to is the Public folder, so we will put our games here.

Uploading games to your Dropbox

Note

As of October 2012, new Dropbox accounts no longer have a Public folder. You can enable the Public folder by following the steps at https://www.dropbox.com/en/help/4224.

Now, perform the following steps:

  1. Copy your exported game folder to the Public folder. After that, open your game folder and right-click on the HTML index file; this is the file that people will access if they want to play your game.
  2. In the menu that appears, select Copy public link; this will copy the link we need to play this game on a web browser.
    Uploading games to your Dropbox
  3. After that, just paste the link on your browser and you can start playing.

Requirements for the Scirra Arcade

As the people who made a game-making tool, it'd be strange if Scirra didn't provide a place where people can upload their games for the world to play. Scirra has an arcade site located at http://www.scirra.com/arcade, where you can upload your HTML5 games.

There are several limitations for the game to be uploaded there. First, the game size must not be more than 10 MB, and second, the game's width can't be more than 800 pixels. There are also plugins and behavior limitations in the arcade; not all plugins and behaviors are supported by the Scirra Arcade.

To be accepted by the arcade, your game must only use these plugins:

AJAX

Array

Audio

Button

Browser

C2Websocket

Dictionary

Facebook

Function

Gamepad

Geolocation

GooglePlay

IAP

List

Keyboard

Mouse

NinePatch

NodeWebKit

Particles

ProgressBar

ScirraArcade

Shadowlight

Sliderbar

Sprite

Spritefont2

Text

Textbox

TiledBG

Tilemap

Touch

Twitter

UserMedia

Video

WebStorage

Win8

XML

Similarly, with behavior, your game can only use these:

EightDir

Anchor

Bound

Bullet

Car

Custom

Destroy

DragnDrop

Fade

Flash

Jumpthru

LOS

NoSave

Pathfinding

Persist

Physics

Pin

Platform

Rotate

ScrollTo

ShadowCaster

Sin

Solid

Timer

Turret

Wrap

 

So, if you try to publish to Scirra's arcade and your game is rejected, check what plugins and behaviors you use. Basically, the plugins that are accepted by the Scirra Arcade are the ones made by Scirra, and not third-party plugins.

Publishing for Scirra's Arcade

Now, we'll export our game to be published on Scirra's Arcade.

  1. Just like you did earlier, click on the File menu and then on Export project. This time, instead of HTML5 website, we'll select Scirra arcade and then click on the Next button.
  2. The export options you see here are the same as the ones you see when you export to an HTML5 game, so I'm not going to explain them again. Click on the Export button to export your game.

    Note

    In order to publish your game on the Scirra game site, you must select the Scirra arcade option when exporting. It won't work if you select the HTML5 website option.

  3. In the folder where you exported the game, there's a game.zip file. This is the file you'll upload to Scirra's Arcade site. To upload it, just go to http://www.scirra.com/arcade/submit and click on the big Upload game button.
  4. Then, navigate to the folder where game.zip is located and select it.
  5. You also need to provide an image of size 280 x 233 to represent your game; also, add a little more detail, such as a description for your game. The image can be made from any image editor you like, and the image must be in that particular size.

That is all; you only need to wait for a moderator to approve your game, and after that, your game is published!

Changing the icons used

You might have noticed that in the exported folder, there are icon files in different sizes, such as 16 x 16, 32 x 32, and so on. These are the default icons that Construct 2 prepared for you every time you started a new project; you can change them before exporting your game. To do this, follow these steps:

  1. Take a look at the Projects bar and scroll down to the Files folder. You'll see an Icons subfolder inside it; this is where all the icons are stored.
    Changing the icons used
  2. Double-click on an image to open the image-editor window where you can change the default icons with the one you have for your game.
  3. If you're loading the icon file from an image you made in another type of software, make sure that you properly load the images to the correct dimension size, so an image of size 32 x 32 goes to icon-32.png, an image of size 128 x 128 is loaded to icon-128.png, and so on.

Note

Make sure that you use the .png format and not other file formats such as .jpg or .bmp.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset