Save/Read User Options

Get help using Construct 2

Post » Fri May 13, 2016 11:33 am

I working on a desktop game and want to save some user options like the controls to something like an ini.file.
So the user should be able to change the options without starting the game.

I'm not sure how do do so.
I googled a lot about ajax, local storage, xml and those things but I'm really not sure how to do it.

I would like to have an ini.object like in construct classic ;-)
B
4
S
1
Posts: 8
Reputation: 316

Post » Fri May 13, 2016 11:40 am

You can use a json file too i think
B
19
S
6
G
2
Posts: 257
Reputation: 2,642

Post » Fri May 13, 2016 11:44 am

In my game, I simply used the built in save game feature. All the configs (whether you use Dictionary or store config in variables) are saved along with the save game.

However, if you want more controls, you can use LocalStorage. (see https://www.scirra.com/tutorials/1461/h ... age-plugin and https://www.scirra.com/manual/188/local-storage for more info) You could store each user option as a key-value pair in the local storage and retrieve these back later.
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: http://www.newgrounds.com/portal/view/660664 (use Chrome on Windows for best performance)

My sites:
http://twinblazar.deviantart.com
http://twinblazar.newgrounds.com
https://twitter.com/twinblazar
http://www.pixiv.net/member.php?id=15072448
B
30
S
11
G
11
Posts: 411
Reputation: 8,469

Post » Sat May 14, 2016 9:25 am

Thanks, I think the local storrage should do it. But where is the file stored on your computer (NW.js export)?
B
4
S
1
Posts: 8
Reputation: 316


Return to How do I....?

Who is online

Users browsing this forum: tdcostas and 6 guests