Hi, welcome to the forums!
Here's a tutorial you might find helpful.
Also, if you're looking for a system to save games, you might consider checking out the Database library (file => libraries => Database) that allows for storing data in the browser.