Vous êtes sur la page 1sur 3

Building HTML5 game features from cloud services

Filling the gap between cloud services and real-life game features

Lancioni, German
Intel Services Division
Intel Corporation
Cordoba, Argentina
german.lancioni@intel.com


AbstractHTML5 game development is an upcoming trend that
enables new technologies to interact in order to produce high quality
games entirely based on the web. However, a fully functional web
game requires layer upon layer of code to produce each particular
game feature. This is because there are many development tools, but
no specific solutions. The game developer ends up writing everything
from the raw backend server to persist the game state to the end-user
game features. Furthermore, the game developer needs to come up
with several custom implementations to consume different providers
to do things like user player login, game storage, social interaction,
analytics, etc. This paper aims to present a practical solution that
covers the gap between raw cloud services (the tool) and the high
level functionality (the real-life game features) a game needs to be
successfully built in less time (and at a lower cost) than the current
solutions take.
Keywordshtml5, cloud services, game features, player
identification, game data manipulation, context sensing
I. INTRODUCTION
Although current HTML5 capabilities are still evolving,
developers are already moving to HTML5 game development.
This implies that the layers used for traditional games must be
created for this new kind of technology, which finally means
building libraries to manage animations, sound media, 3D
graphics, local storage and so on. Besides that, if we consider
the latest web fashions (user login and profile, social activity
and media sharing) which pushes new gaming trends, then we
can deduce that game developers have a hard time developing
serious Cloud HTML5 games because of the big stack of
assets to take care of before paying attention to the game
itself. The purpose of this paper is to find a solution to
provide:
x Lower game production costs.
x Less effort investment for building game
infrastructure.
II. SCOPE

Taking into account the proposed objective, we are going
to focus on the particular cloud game layer that will help game
developers to build successful HTML5 games without starting
from scratch. This layer acts as a bridge between infrastructure
or tools and final game features, in order to reduce ramp up on
non-game-related technologies and to significantly cut
development time. This paper aims to address the following
three features:
(1) Player identification: HTML5 cloud games are device
independent. Thus, games need to be related to the
player, who is the identified user, in order to save
game states and personal settings and maintain game
progress. In addition to this, games might be aware of
player information such as a players country and
language. Being location-aware is required since the
game is running on a world-accessible web space that
may require some customization based on the logged
in player, such as automatically setting the right game
language.
(2) Game-specific data manipulation: HTML5 games are
usually required to save and retrieve specific assets
like player scores, avatar icons, player inventory,
statistics, maps, level progress, and more. This kind of
data comes with an associated logic behind it that
shapes the abstract concept. For example, from the
database point of view, a leaderboard is just a table
with values. However, from the game perspective, the
leaderboard is a ranked list of players and high scores
that must be updated regarding specific game rules
that move players up and down according to the game
history scores.
(3) Context sensing: HTML5 cloud games are not just
classic keyboard games. Nowadays, software and
hardware sensors are playing a novel role in the
gaming experience. From simple accelerometer input
to complex player location and weather analysis,
games are reacting to the player context in order to
provide enhanced gaming experiences.
III. ISSUES AND GAPS
The established features are particular to the game business
vertical; therefore, this paper examines the main issues
HTML5 game developers face during the game creation.
A. Identifying the player
One of the first steps for a HTML5 cloud game is to
identify the player. This is typically performed by using a
login account. And since users may already have a social

networking account like Google, Facebook or Yahoo, its
prudent to interface with these providers in order to make your
game compatible with social networks. The problem is that the
game developer needs to implement different player
identification systems for the same game purpose (since we
want to capture every potential player that already has a social
account) and make them coexist all together in a friendly way.
B. Manipulating cloud based data
As previously stated, game data is crucial for a continuum
experience over different player sessions. We want the game
to keep player progress and status data without relying on the
temporal local device. For that reason, we need to store the
game information in the cloud. Although this is a simple
concept, there is a lot of effort to make it happen. We need to
relate information to the player, save and retrieve data in a
friendly way without demanding too many resources,
understand the data, and finally do what the game needs to do.
In other words, game concepts must be pre-processed before
raw data is saved to cloud servers, and then raw data is post-
processed after its obtained from cloud, in order to get an
end-user game feature working (see the leaderboard
management example later in this paper).
C. Creating a context aware game
Game developers are starting to pay attention to the player
context. This is useful for creating a more personal game that
reacts to the player and the social community of the player, a
very common trend in social networks games. This capability
cannot be easily translated to one specific technology, since
developers must get and analyze sensor information, do
analytics over player game data, infer implicit contextual data
related to user profiles, link to social network activity, etc.
Each particular game feature requires a huge infrastructure
behind it. This is represented in figure 1.
Figure 1: Layers required for building a HTML5 cloud game.
Considering that all the required cloud services may not be
from the same vendor, developers need to generate multiple
interactions with different APIs, libraries and frameworks in
order to build the game features. Furthermore, there are
specific differences between browser implementations. So for
instance, building a communication layer for REST requires
per-browser implementations. On the other hand, game
features must be translated to generic cloud service features,
like the management of the player level progress, inventory
and scores that must be processed and saved as plain
structures on a storage service. All this complexity creates a
considerable charge for game developers, which implies a
significant gap that pushes developers to build limited game
functionality with many external game dependencies to
manage.
IV. THE SOLUTION
The proposed solution is a JavaScript library that enables
game developers to build HTML5 cloud games by focusing on
game features instead of the infrastructure behind them. This
library relies on the Intel Cloud Services Platform,
considered useful because of the diverse set of services offered
that can support many game features. This library (named
cGamingLib) aims to satisfy three main objectives:
(1) Abstract game developers from cloud service
complexity and REST interfaces. Allow them to work
with abstract (game-specific) concepts instead of raw
(generic) tools definitions. Reduce developer ramp
up for nongame related technologies.
(2) Provide game developers with pre- and post-
processing functionalities in order to translate game-
domain-specific data to cloud services and vice versa.
(3) Close the distance between game features and player
contextual information to create enhanced gaming
experiences.
These objectives are filled by a simple API that sticks with
the game domain, looking for intuitive comprehension and
usage. This API provides game developers the sufficient level
of abstraction in order to just focus on the game features itself.
To demonstrate the concept, this paper presents some
examples based on common HTML5 games features, as
follows.
Leaderboard management: this is a typical feature that
many web games include. The leaderboard implies a dynamic,
limited and descending ranked list of players that got the top
high scores in the game. To manage a leaderboard, you need
to:
- Retrieve player information such as ID, name, etc.
- Analyze player scores and validate if player score is
higher than at least one of those listed on the
leaderboard)
- Insert/update leaderboard. For example, insert new
row when a player enters the leaderboard for the first
time, or update a previous score if the player is
already there.
- Reorganize the leaderboard. For example, when the
maximum number of annotations is reached, players at
the bottom of the list must be removed to make room
for new players with higher scores.
There are at least four high-level issues to solve in order to
support the end-user game feature: game leaderboard.
Furthermore, each of these issues must be shredded in low-
level features like game-domain-specific objects to raw data
translation, REST communication, objects serialization and
deserialization, business rules execution and many more. This
diverse set of tasks gets solved in the cGamingLib with a
simple API:





Figure 2: API for updating the game leaderboard.
Player Location: retrieving the user location is now
possible with HTML5. However, for a game, we may want to
get more useful information than the raw location coordinates.
For that reason, we need to translate latitude and longitude
values into a semantic location. This can be useful for
retrieving a flag icon based on the country code. This whole
process can be handled with the following cGamingLib API:







Figure 3: API for retrieving the player semantic location.
This call not only obtains the current player latitude and
longitude, but also executes a transformation from raw data to
useful semantic information such as country name and code,
state, and city.

As we can notice, this thin JavaScript library that fulfills the
gap between hard assets (servers, cloud services, databases,
etc.) and abstract game concepts is useful for game developers
in terms of effort and cost investment while developing cloud
games.
As a result, cGamingLib implementation was adopted by
Cloud Domino, a pure HTML5 game exposed at the San
Francisco Game Developers Conference 2013. This game
demonstrated the positive results of the practical solution
covered in this paper because a single developer was able to
integrate the following game capabilities in just eight hours:

- Player social login and identification for three social
media providers.
- Raw and semantic player location.
- Commerce capabilities for in-game purchases.
- Leaderboard and highscore management.
- Player personal information management (avatar,
canvas screenshot).
- Player nearby points of interest.

V. CONCLUSIONS
The ecosystem that involves true HTML5 cloud games is
complex enough to considerably impact game developers.
Furthermore, although many useful HTML5 and web
capabilities are already in place, developers are having a hard
time including them in their game development in a standard,
fast, and precise way. For that reason, it is important to
identify the gaps between the infrastructure, tools, and
frameworks, and the game itself and to provide more bridges
that reduce game development time and increase game quality.
These bridges allow developers to focus more on game
features instead of the behind-the-scenes issues. This paper
purpose has been accomplished by exposing a practical
solution targeted to cloud games developers. cGamingLib is
one such solution, a first step to showcase the power and
simplicity that developers can use to build HTML5 games
based on the Intel Cloud Services Platform, reducing effort
investment and lowering games production costs.

References
[1] A. Juntunen, E. Jalonen, S. Luukkainen, HTML5 in Mobile Devices
Drivers and Restraints, 2013 [46th Hawaii International Conference on
System Sciences].
[2] M. Fredette, Bring the Power of the Cloud to Your Games, 2013 at
http://software.intel.com/cloudservicesplatform/documentation/bring-
power-cloud-your-games, accessed on May 01, 2013.
[3] M. Joselli, M. Zamith, J.R. Silva Junior, L. Valente, E. Clua, An
Architecture for Mobile Games with Cloud Computing Module, 2012
[SBC - Proceedings of SBGames 2012].
[4] cGamingLib, About cGaming, 2013 at
http://cgaminglib.com/about.html, accessed on May 09, 2013.
[5] GDC 2013 Cloud Domino Game, cGamingLib, 2013 at
http://cgaminglib.com/gdconf/domino/

Vous aimerez peut-être aussi