Print this page Share

HTML5 Games: Creating Fun with HTML5, CSS3, and WebGL

ISBN: 978-1-119-97508-3
456 pages
December 2011
HTML5 Games: Creating Fun with HTML5, CSS3, and WebGL (1119975085) cover image


Discover new opportunities for building 2D and 3D games with HTML5

The newest iteration of HTML, HTML5 can be used with JavaScript, CSS3, and WebGL to create beautiful, unique, engaging games that can be played on the web or mobile devices like the iPad or Android phones. Gone are the days where games were only possible with plugin technologies such as Flash and this cutting-edge book shows you how to utilize the latest open web technologies to create a game from scratch using Canvas, HTML5 Audio, WebGL, and WebSockets. You'll discover how to build a framework on which you will create your HTML5 game. Then each successive chapter covers a new aspect of the game, including user input, sound, multiplayer functionality, 2D and 3D graphics, and more.

  • Aims directly at a new way to develop games for the web through the use of HTML5
  • Demonstrates how to make iOS and Android web apps
  • Explains how to capture player input; create 3D graphics; and incorporate textures, lighting, and sound
  • Guides you through the process of creating a game from scratch using Canvas, HTML5 Audio, WebGL, and WebSockets

By the end of this invaluable book, you will have created a fully functional game that can be played in any compatible browser or on any mobile device that supports HTML5.

See More

Table of Contents

Introduction 1

Part 1

CHAPTER 1 Gaming on the Web 7

CHAPTER 2 Taking the First Steps 21

CHAPTER 3 Going Mobile 41

Part 2

CHAPTER 4 Building the Game 81

CHAPTER 5 Delegating Tasks to Web Workers 103

CHAPTER 6 Creating Graphics with Canvas 123

CHAPTER 7 Creating the Game Display 165

CHAPTER 8 Interacting with the Game 195

CHAPTER 9 Animating Game Graphics 225

Part 3

CHAPTER 10 Creating Audio for Games 269

CHAPTER 11 Creating 3D Graphics with WebGL 299

Part 4

CHAPTER 12 Local Storage and Caching 361

CHAPTER 13 Going Online with WebSockets 387

CHAPTER 14 Resources 407

Index 427

See More

Author Information

JACOB SEIDELIN (COPENHAGEN) is a freelance web developer with 10 years of experience working withbackend programming, graphics design, and front-end technology. When not working with clients he enjoys JavaScript and HTML5, web game development, and generally pushing the limit of what is possible in the browser. The results of his adventures in web development can be witnessed at his website at http://www.nihilogic.dk/.
See More


Download TitleSizeDownload
Sample Code
Sample code for entire book
4.78 MB Click to Download
Appendix A: Canvas Reference 424.41 KB Click to Download
Appendix B; WebGL Reference Appendix 499.99 KB Click to Download
Appendix C: OpenGL ES Shading Language

409.36 KB Click to Download
See More
Instructors Resources
Wiley Instructor Companion Site
See More
See Less
Back to Top