Book Image

HTML5 Game Development by Example: Beginner's Guide

By : Seng Hin Mak
Book Image

HTML5 Game Development by Example: Beginner's Guide

By: Seng Hin Mak

Overview of this book

Table of Contents (18 chapters)
HTML5 Game Development by Example Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
9
Building a Physics Car Game with Box2D and Canvas
Index

Summary


You learned a lot in this chapter about using the local storage to save the game data in a web browser. Specifically, we saved and retrieved basic data in the key-value pair local storage. We encoded an object into the JSON formatted string and parsed the string back to a JavaScript object. We saved the entire game progress, so the game can resume even if left mid-way. We also take the game offline by using AppCache. Visually, we created a nice 3D ribbon as a new record badge in pure CSS3 styling.

Now that you have learned about improving our previous games by using the local storage, you are ready to move on to the next chapter where you'll learn about an advanced feature named WebSockets that we can use to connect players together in a real-time interaction.