Core HTML5 2D Game Programming

  • ISBN13:


  • ISBN10:


  • Edition: 1st
  • Format: Paperback
  • Copyright: 7/11/2014
  • Publisher: Prentice Hall
  • Purchase Benefits
  • Free Shipping On Orders Over $59!
    Your order must be $59 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $49.99 Save up to $7.50
  • Buy New


Supplemental Materials

What is included with this book?

  • The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.
  • The eBook copy of this book is not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.


Game programming offers a wealth of creative and business opportunities, and it’s never been more accessible. In Core HTML5 2D Game Programming, best-selling author David Geary shows you how to use freely available browser tools and open source resources to create video games that run in desktop browsers and on mobile devices.


Geary walks you step by step through every aspect of implementing a sophisticated arcade-style game entirely from scratch, without using proprietary game frameworks. Packed with code, this full-color tutorial gives you the in-depth understanding you need to design and build any kind of HTML5 2D game on your own, whether you use a framework or not.


A clearly written, accessible, and exhaustive guide to implementing games, this book leaves no stone unturned, showing you how to

  • Create smooth, flicker-free animations
  • Implement motion that’s unaffected by your game’s underlying animation frame rate
  • Animate sprites (graphical objects) to make them sparkle, explode, etc.
  • Layer multi-channel sound effects on top of a soundtrack
  • Warp time to create nonlinear effects, such as jumping or bouncing
  • Control the flow of time through your game with a time system
  • Implement particle systems that simulate natural phenomena
  • Efficiently detect collisions between sprites
  • Create a developer backdoor containing special features
  • Use Node.js and socket.io to transfer real-time metrics to a server
  • Employ a heads-up display to show high scores stored on a server
  • Understand the nuances of implementing HTML5 games for mobile devices

Through expertly written code that’s easy to understand, and prose that cuts to the chase, Geary illuminates every corner of game development. Everyone from novice game programmers to professional game developers will find this book invaluable as both a tutorial and a reference.


All of the book’s source code, including chapter-specific versions of the game discussed in the book, are available at corehtml5games.com.

Author Biography

David Geary, a prominent author, speaker, and consultant, is a leading expert on advanced web application development. He’s the author of eight Java books, including the industry’s best-selling guides to Swing and JavaServer Faces, and he co-founded the HTML5 Denver User’s Group. A three-time JavaOne Rock Star, he speaks frequently at conferences. Follow him on Twitter at @davidgeary.

Table of Contents

1. Introduction
2. Setting Up
3. Graphics and Animation
4. CSS Transitions
5. Mobile Support
6. Sprites
7. Sprite Behaviors
8. Time, Part I: Pausing, Freezing, and Thawing the Game
9. Time, Part II: Linear motion
10. Time, Part III: Non-linear motion
11. Time, Part IV: A time system
12. Collision Detection and Sprite Animations
13. Sound and Music
14. Physics: Falling from a Jump
15. Particle Systems: Smoke and Fire
16. Deployment
17. On the Server: High Scores and In-Game Metrics
18. Finishing Touches: Scoreboard, High Score HUD, End-Game Sequence

Rewards Program

Write a Review