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)

Summary


In this chapter we took a look at what HTML is, where it came from, and where it's headed. We discussed how the Open Web is a place where anyone with at least some knowledge of the technologies that make it work, and a lot of ambition (or enough curiosity) can reach an unprecedented audience at a virtually non-existent cost.

Although HTML5 is an upgrade of previous versions of HTML, the term also makes reference to the upgrade of other technologies that go hand in hand with the markup language, such as CSS and JavaScript. All three of these languages have been upgraded in response to current needs, and in order to take the Web to the next level. Many of the new features added to the languages attempt to shift the hard work of implementing commonly used functionality from the developer to the browser. What was once done by many developers through arduous, time consuming, and often expensive work, can now be done by the browser with minimal effort by the programmer. Also, many of the new features and capabilities of HTML5 make the web platform a very aggressive opponent to the desktop paradigm. The idea of individual desktop computers running in complete isolation from each other, each running program from its own central storage system is steadily going away. The replacement is a cloud-based paradigm, where the software in question is sent to each user from one central server connected to the Web. And since these web applications are executed in the users' browser, some of the major parts of the application are written in pure HTML5.

HTML5 is the perfect technology to master right now because it is at the core of the Open Web. Thanks to the responsive and evolving nature of HTML5, we can only wait to see what the future has in store for us, as browsers continue to get more powerful, and the cost of computing continues to decline.

We will explore the exciting world of HTML5, and cover its major concepts and building blocks by designing and developing fun and engaging games. We're taking this approach not only because games are fun, but also because many of the new capabilities in HTML5 lend themselves so well to the complex problems of programming video games. Also, by successfully programming full games in pure HTML5 technology, we will be able to test and prove the true capacity of HTML5 and the Open Web.

In the next chapter we will take the first step towards building awesome web-based games. First we'll set up a development environment by installing a web server. Next we will build an HTML5 web portal from which we can access our games, as well as get a bit of practice using the new semantic elements.