Topic:   Wow, localStorage!   (Read 3236 times)


0 Members and 1 Guest are viewing this topic.

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2787

  • For the glory of my maker
    • View Profile
Wow, localStorage!
« on: January 07, 2012, 06:41:54 AM »
I'm digging HTML5's localStorage object:

http://www.w3schools.com/html5/html5_webstorage.asp

"localStorage.playerHP = 50;" creates the variable "playerHP" on the user's computer and the value has no time limit expiry, so every time you revisit the website the variables maintain the value. Online RPG right there!
I survived the spammage of 2007

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4379
    • View Profile
Re: Wow, localStorage!
« Reply #1 on: January 07, 2012, 12:44:33 PM »
Wow that is so neat! That's gonna be super handy in the HTML GM.

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2787

  • For the glory of my maker
    • View Profile
Re: Wow, localStorage!
« Reply #2 on: January 07, 2012, 02:18:11 PM »
The whosa what now?
I survived the spammage of 2007

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4379
    • View Profile
Re: Wow, localStorage!
« Reply #3 on: January 07, 2012, 06:18:53 PM »
Nothin, just a super secret wicked awesome project to further the development of the GMG.

Charlo


  • GMG-er

  • **


  • Posts: 450
    • View Profile
Re: Wow, localStorage!
« Reply #4 on: January 07, 2012, 07:28:07 PM »
I've never experimented with local storage, but it does sound promising.  A nice alternative to cookies.

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2787

  • For the glory of my maker
    • View Profile
Re: Wow, localStorage!
« Reply #5 on: January 08, 2012, 07:36:03 AM »
Yeah, W3S are pushing for localStorage to replace cookies altogether. All this rapid change in web development makes one fearful of spilling his tea so...

EDIT:

Due to quivering hands of course.
« Last Edit: January 08, 2012, 07:38:18 AM by Silverwind-san »
I survived the spammage of 2007

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4379
    • View Profile
Re: Wow, localStorage!
« Reply #6 on: January 08, 2012, 10:09:42 AM »
Quivering hands of excitement!

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2362

  • It's a secret to everyone...
    • View Profile
Re: Wow, localStorage!
« Reply #7 on: January 08, 2012, 02:38:44 PM »
It sounds great!
Do you know where exactly this is stored? I'd be interested to know some specifics.
Warning: The above post may have been modified multiple times.

"In a great game, the character must never perfectly obey the user's command"
 - Tim Rogers

http://connorspuzzles.tumblr.com/

GMG Hendo


  • GMG-er

  • **


  • Posts: 155

  • [WITTY TEXT GOES HERE]
    • View Profile
Re: Wow, localStorage!
« Reply #8 on: January 31, 2012, 06:32:53 PM »
It sounds great!
Do you know where exactly this is stored? I'd be interested to know some specifics.

It's stored in a little key-value db store. I'ts really great, and easy to use.

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2362

  • It's a secret to everyone...
    • View Profile
Re: Wow, localStorage!
« Reply #9 on: February 01, 2012, 08:36:49 AM »
Did it become part of Gan's program or what?
Warning: The above post may have been modified multiple times.

"In a great game, the character must never perfectly obey the user's command"
 - Tim Rogers

http://connorspuzzles.tumblr.com/

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4379
    • View Profile
Re: Wow, localStorage!
« Reply #10 on: February 01, 2012, 09:34:33 AM »
Brilliant idea Connors! I didn't think to put it in the HTML5 GM.

Which makes me think... I can further enhance this feature so not only can strings be saved, but also arrays and objects and other variables!
Wow, saving games is gonna be really easy.