Local Storage, Dictionary, Array, JSON (capx)

Discuss game development design and post your game ideas

Post » Thu Jun 18, 2015 2:15 am

https://www.dropbox.com/s/61kstfx7pbr3j ... .capx?dl=0

I have seen a lot of questions about Local Storage and although I am relatively new to C2, I thought I would offer this capx to demonstrate the basic use of the Local Storage plug-in. It is a simple game where you have 3 students. You push their corresponding button to move them through the school system until they graduate. You can exit at any time, go back in, and see where you left off. A couple notes:

- I also used a dictionary to show how the 2 can be used together. (I personally would also use some global variables for clarity, but thought this was leaner and maybe easier to follow. I was not trying to write perfect code.)

- I added a "Clear" button so you can start over.

- I also used an array to save grade information as I thought this might help some beginners as well.

- Lastly, I added a text field to show last button pushed just to mix up the types of data stored in the dictionary and local storage.

- The default preview is set to Chrome.

Hope this helps some of you . :D
Last edited by CDogs1964 on Thu Jun 18, 2015 3:49 am, edited 1 time in total.
B
42
S
16
G
3
Posts: 169
Reputation: 4,383

Post » Thu Jun 18, 2015 2:23 am

You may have to click Download twice after cancelling Dropbox' request to set up an account.
B
42
S
16
G
3
Posts: 169
Reputation: 4,383

Post » Mon Mar 21, 2016 5:02 pm

Perfect!!
B
48
S
9
G
10
Posts: 200
Reputation: 8,263

Post » Thu Jun 16, 2016 1:15 pm

Thank you!
B
37
S
6
G
1
Posts: 301
Reputation: 2,865

Post » Wed Jun 22, 2016 4:40 am

Glad it has helped a couple of you out!
B
42
S
16
G
3
Posts: 169
Reputation: 4,383


Return to Game Development, Design & Ideas

Who is online

Users browsing this forum: No registered users and 5 guests