June 2015
Beginner
354 pages
8h 23m
English
We have enhanced our CSS3 card matching game by adding a game over screen and storing the last game record. Imagine now that a player is mid-game and accidentally closes the web browser. Once the player opens the game again, the game starts from the beginning and the game that the player was playing is lost. With the local storage, we can encode the entire game's data into JSON and store it. In this way, players can resume their game later.
We are going to pack the game data into one object and save it into the local storage every second.
Read now
Unlock full access