are going to introduce several platforms we can
deploy our HTML5 games to, together with dierent monetization
strategies. Note, though, that the aim here is only to give an overview
of the dierent options and point you in the right direction, which you
will then have to investigate on your own: since most of the discussed
platforms and tools are constantly evolving, trying to get into the details
would not only be too advanced and o topic for a foundational book like
this one, but it would also be pointless since any extensive step-by-step
description would very likely be outdated and not applicable anymore as
soon as an update is released. For such detailed information, I recommend
that you check each tool, vendor, or portal website for the latest documen-
tation and ad hoc tutorials.
By selecting Export project from the main drop down menu, we get
several options, including web, mobile, and desktop platforms. Construct
being an HTML5 engine, the rst option we should talk about is to simply
export our projects as HTML5 games to be added to our own websites.
If so, we will rst be asked a set of options (Figure12.1), common also to
the other platforms, where we can specify folders and whether to “minify”
our script. Selecting this option will make our exported code much more
dicult to read, and it is usually recommended for games to be delivered
online if we don’t want other people to easily peek into our code base.
Note, though, that this option may conict with some target platforms,
200 ◾ HTML5 Game Development from the Ground Up
so be sure to check whether there could be any issue, or try leaving this
unchecked if the exported game doesn’t run.
Once you click Next, we move to a platform-specic set of options. In
case of a straightforward HTML5 game export, we can choose between
three dierent templates (shown in Figure12.2): a standard page, a page
FIGURE 12.2 e second set of options. is is platform specic: when doing a
straight HTML5 export, we can choose among dierent templates for the page
containing our HTML5 game.
FIGURE 12.1 e rst set of export options, common to all target platforms.
Deployment and Monetization ◾ 201
with some built-in empty space to easily add advertisements, and an
embed template with no margins and disabled scrollbars, suitable for spe-
cic arcade-like web portals.
Try any template, export, open the game folder, and launch the result-
ing index.html webpage in the web browser of your choice. Your game is
ready to be uploaded to your server!
12.1 WEB PORTALS
Uploading to our own website is only one of the many choices we have:
with HTML5 growing in popularity, more and more web-based gaming
portals are being launched, oering increased exposure and driving thou-
sand of players straight to our games.
One of such portals is Scirra’s own Arcade
FIGURE 12.3 Scirra’s Arcade home page: we can see games are grouped in dif-
ferent categories (Action, Puzzle, Shooter, etc.) as well as featured and top-rated
202 ◾ HTML5 Game Development from the Ground Up
Submitting to Scirra’s Arcade is a very simple process: by choosing the
corresponding export option our game is zipped and ready to be uploaded
right aer the exporting process has been completed. Note that Scirra’s
Arcade also oers leaderboard functionalities. To access these we need to
add the Scirra Arcade object to our project rst and use its related events
and actions to submit and retrieve scores: once the rst few scores get sub-
mitted, a high score table will be automatically displayed on the game page
for all to see!
One of the most well-known web-based game portals is, without doubt,
is portal hosts a huge variety of games (more than 70,000 games
freely playable developed in Flash, Unity, and HTML5) and managed to
build a very active community thanks to its many ways of engaging players
through challenges, badges, and leveling systems.
FIGURE 12.4 Kongregate home page, sporting an impressive amount of players
(tens of thousands online at any given time) and available games.