In this book three standard game technologies are examined, compared, and contrasted: CSS Sprites, Canvas, and SVG (Scalable Vector Graphics). You will see examples using each of the three to move graphics, detect collisions, and more. Variations within Canvas and SVG are explored as well. You'll also see examples for phone-specific technologies such as Touch, Vibration, Device Orientation, and Screen Orientation. You'll also be shown how to upgrade your Firefox OS phone, how to use the Simulator if you don't have a phone, and how to use the App Manager to put your apps on phones.
This book assumes you know the basics of HTML5, CSS, and JavaScript, and that you are interested in making games. Concepts and code are explained carefully along the way and newer options like CSS Sprites and SVG are covered extensively, as well as current JavaScript and HTML5 tips and tricks. In fact, except for the phone-specific chapters, you can use these techniques to make HTML5 games for other platforms. All the code is straight HTML5, CSS, SVG, and JavaScript with no libraries, no jQuery, nothing but pure code. The focus is 100% on Firefox OS games and I hope you will be inspired to create games for this fast-growing platform.
The book is written in an informal, friendly style that invites the reader to come along and explore the fun that is Firefox OS! There isn't just one way to write a game, there are a great many, and it is hoped that this book can inform and inspire you to make your own games.
Learn More →