Game Development Reference
In-Depth Information
HTML5
HTML5 is a markup language, which extends the capabilities of former markup lan-
guages and introduces new APIs to create complex web apps, so that it can be used
to create cross-platform applications and games. Among its features, HTML5 is de-
signed to run on low performance devices such as smartphones and tablets, this is
the reason we decide to mention it in this chapter about programming languages for
mobile games. Have you ever heard of a game called Cut the rope ? Well, it has
been developed with HTML5!
Well known by web developers for years, the decisive push towards popularity of
HTML5 was given in 2010 by Steve Jobs, who stated that since Flash was not open
platform, as it is controlled by Adobe, it could no longer be the standard for multime-
dia applications.
At Cupertino they believed that HTML5, with its open platform, could become the
new standard for web applications and overcome Flash. As a consequence, iOS
devices don't support Flash and this is the reason why many developers turned to
HTML5 to develop games for the iPhone and the iPad.
Canvas
The main feature that allows HTML5 to be used to develop games is its APIs, which
can be controlled with JavaScript to create interactive, multimedia applications.
Among the APIs, the most important for game development is an element called
Canvas, defined by the <canvas> tags.
The canvas block can be added to a web page and then manipulated through
JavaScript to paste images, set compositing modes, manage alpha, transformations
and scaling, and to draw basic shapes.
The drawback of the canvas element is that, though it is well supported by both
desktop and mobile browsers, the rendering speed varies very much, depending on
each specific platform.
Search WWH ::




Custom Search