A downloadable GameMaker package

Download NowName your own price

Created initially for my Opera GX Game Jam entry.


Lets GameMaker read and write from a web browser's local storage and session storage as a JavaScript "pass through."

FunctionHelp
html5_localstorage_*
Functions relating to the local storage of a browser
html5_sessionstorage_*Functions relating to the session storage of a browser
FunctionUsageHelpReturnsMDN (for JS)
*_save*_save(string_key, string_value)Save a string value to the associated key
NothingDocs
*_load*_load(string_key, string_default_value)Loads a string value from the associated key, or the default value given if missing/undefined
A string
Docs
*_remove*_remove(string_key)Removes a key/value pair
NothingDocs
*_key_at*_key_at(index)Get a key's string from an index into storage
A string
Docs
*_clear_all*_clear_all()Clears all key/value pairs from storage
NothingDocs
*_get_length*_get_length()Gets how many key/values pairs are in storage
A number
Docs
*_exists*_exists()Checks to see if storage is accessible by setting and removing a testphrase into storage. Only needs to be checked once and not before every other call
Boolean/numberN/A

The help in the GameMaker IDE is also set, so context help will appear.

The extension only copies to HTML5 targets and does nothing on every other platform.

Download

Download NowName your own price

Click download now to get access to the following files:

GameMaker Package (.yymps, GMS2.3+) 2.9 kB
JavaScript Source Files 910 bytes

Comments

Log in with itch.io to leave a comment.

(2 edits)

Hello

Are you able to advise on how to implement this in my project to be able to save or is there a tutorial of any sort?

The best resource would be MDN. For saving and loading something that aren’t strings you would need to convert from and to.