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.