Book Image

HTML5 Game Development Hotshot

By : Seng Hin Mak, Makzan Makzan (Mak Seng Hin)
Book Image

HTML5 Game Development Hotshot

By: Seng Hin Mak, Makzan Makzan (Mak Seng Hin)

Overview of this book

Table of Contents (15 chapters)
HTML5 Game Development HOTSHOT
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 3. Space Runner

In the previous project, we created two game examples that take mouse inputs. In this project, we are going to create another game example with game loop and keyboard inputs. The player controls an avatar that runs from the moon station towards space. The goal is to run as far as possible without hitting any obstacles.

We will learn how to create sprite sheet-based animations with a CSS background and use JavaScript to handle keyboard inputs.