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 ...

Get HTML5 Game Development by Example : Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.