peidevs / Scooter

Angular Port of Scooter
Apache License 2.0
0 stars 1 forks source link

Retain Game State #17

Open swhalley opened 8 years ago

swhalley commented 8 years ago

Should we look to implement a cookie that stores the last list of participants?

This would allow us to load the game ahead of time and retrieve the list later without having to lookup the api key's etc at the venue

evanepio commented 8 years ago

That's good, but will we run into limits with cookie sizes?

We could try this if the cookie limits are too small: https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API

Supported by all recent browsers.

swhalley commented 8 years ago

22 adds support for localStorage so games players can be remembered.

Didn't store game state between page loads. That can be something later. Worked the loading mechanism so that if there is ever an error reading in the local storage (data structure changes or initializing for first time) the game will reset the local storage so it can store it next time.

swhalley commented 8 years ago

After changes for #28 are merged in. Change the localConfig to also store the theme and the choice if pictures should be displayed.