Book description
HTML5 opens up a plethora of new avenues for application and game development on the web. Games can now be created and interacted with directly within HTML with no need for users to download extra plugins, or for developers to learn new languages. Important new features such as the Canvas tag enable drawing directly onto the web page, the Audio tag allows sounds to be triggered and played from within your HTML code, the web sockets API brings the facility for real-time communication, and the local storage API enables data such as high scores or game preferences to be kept on a user's computer to be retrieved next time they play your game. All of these features and many more are covered within The Essential Guide to HTML5.
This book begins at an introductory level, teaching the essentials of HTML5 and JavaScript through game development. Each chapter features a familiar game type as its core example, such as hangman, rock-paper-scissors, or dice games, and uses these simple constructs to build a solid skillset of the key HTML5 concepts and features. By working through these hands on examples, you will gain a deep, practical knowledge of HTML5 that will enable you to build your own, more advanced games and applications.
Concepts are introduced and motivated with easy-to-grasp, appealing examples.
Code is explained in detail after general explanations.
Reader is guided into how to make the examples "their own".
Table of contents
- Copyright
- Credits
- About the Author
- About the Technical Reviewer
- Acknowledgments
- Introduction
- 1. The Basics
- 2. Dice Game
- 3. Bouncing Ball
- 4. Cannonball and Slingshot
- 5. The Memory (aka Concentration) Game
- 6. Quiz
- 7. Mazes
- 8. Rock, Paper, Scissors
-
9. Hangman
- 9.1. Introduction
- 9.2. Critical requirements
-
9.3. HTML5, CSS, JavaScript features
- 9.3.1. Storing a word list as an array defined in an external script file
- 9.3.2. Generating and positioning HTML markup, then making the markup be buttons, and then disabling the buttons
- 9.3.3. Creating progressive drawings on a canvas
- 9.3.4. Maintaining the game state and determining a win or loss
- 9.3.5. Checking a guess and revealing letters in the secret word by setting textContent
- 9.4. Building the application and making it your own
- 9.5. Testing and uploading the application
- 9.6. Summary
- 10. Blackjack
Product information
- Title: The Essential Guide to HTML5: Using Games to Learn HTML5 and JavaScript
- Author(s):
- Release date: October 2010
- Publisher(s): friends of ED
- ISBN: 9781430233831
You might also like
book
The Essential Guide to HTML5: Using Games to Learn HTML5 and JavaScript
Gain a deep, practical knowledge of the basic tools used for webpages: hypertext markup language (HTML5), …
book
The Essential Guide to HTML5: Using Games to Learn HTML5 and JavaScript
Gain a deep, practical knowledge of HTML and JavaScript that will provide an introduction to programming …
book
Web Programming with HTML5, CSS, and JavaScript
Web Programming with HTML5, CSS, and JavaScript is written for the undergraduate, client-side web programming course. …
book
HTML5 Games: Novice to Ninja
This book will teach you how to create awesome video games. Games from scratch. Games that …