Book Image

Learn HTML5 by Creating Fun Games

By : Rodrigo Silveira
Book Image

Learn HTML5 by Creating Fun Games

By: Rodrigo Silveira

Overview of this book

HTML is fast, secure, responsive, interactive, and stunningly beautiful. It lets you target the largest number of devices and browsers with the least amount of effort. Working with the latest technologies is always fun and with a rapidly growing mobile market, it is a new and exciting place to be."Learn HTML5 by Creating Fun Games" takes you through the journey of learning HTML5 right from setting up the environment to creating fully-functional games. It will help you explore the basics while you work through the whole book with the completion of each game."Learn HTML5 by Creating Fun Games" takes a very friendly approach to teaching fun, silly games for the purpose of giving you a thorough grounding in HTML5. The book has only as much theory as it has to, often in tip boxes, with most of the information explaining how to create HTML5 canvas games. You will be assisted with lots of simple steps with screenshots building towards silly but addictive games.The book introduces you to HTML5 by helping you understand the setup and the underlying environment. As you start building your first game that is a typography game, you understand the significance of elements used in game development such as input types, web forms, and so on.We will see how to write a modern browser-compatible code while creating a basic Jelly Wobbling Game. Each game introduces you to an advanced topic such as vector graphics, native audio manipulation, and dragging-and-dropping. In the later section of the book, you will see yourself developing the famous snake game using requestAnimationFrame along with the canvas API, and enhancing it further with web messaging, web storage, and local storage. The last game of this book, a 2D Space shooter game, will then help you understand mobile design considerations.
Table of Contents (14 chapters)

The Web as a platform


One of the most exciting things about HTML5 is that it is the main language of the World Wide Web. In other words, just about any device connected to the Web is able to run any games or applications you write in it. That makes the Web a very unique platform.

Doubtlessly, you have heard about or experienced such things as "the console war", where different video game console manufactures fight to win a larger percentage of the market over their competitors. While some people own more than one video game console, the majority of gamers own only one system. So what that means for a game developer is that, in order for their games to sell well, or in other words, in order for their games to be played and enjoyed by the largest possible amount of players, they need to develop the same version of a game for multiple platforms. This is an expensive and very time consuming process. Creating one game is already expensive and time consuming, let alone duplicating all that work for one or two other platforms.

Today, with more and more users world wide using the Internet, you don't have to go through what console video game developers do. As long as your game runs properly in a standard, modern web browser, it will run the same in just about any other browser across the world. In other words, your same code base can be enjoyed by over a billion people because they all run browsers that conform to HTML5. This makes the Web the largest, and greatest platform of all time. And the best part about it—it's totally free to develop for it. You don't need to have a special license or pay royalties to anyone in order to develop games or other applications for the Web.