Game Maker's Garage Forum
Game Creation => HTML5/Javascript => Topic started by: Silverwind 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!
-
Wow that is so neat! That's gonna be super handy in the HTML GM.
-
The whosa what now?
-
Nothin, just a super secret wicked awesome project to further the development of the GMG.
-
I've never experimented with local storage, but it does sound promising. A nice alternative to cookies.
-
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.
-
Quivering hands of excitement!
-
It sounds great!
Do you know where exactly this is stored? I'd be interested to know some specifics.
-
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.
-
Did it become part of Gan's program or what?
-
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.