Local Storage : All games data kinda kludged together?

Just started using Construct 2? Post your questions here

Post » Mon Apr 11, 2016 10:44 am

Just to clarify, all games seem to use the same storage - so I have to use different names for items or otherwise I'll be looking up the data from different games?

Also if I clear storage, I'm wiping out everything from my other games in development?

I just thought it'd be more discrete. Just checking on that.
B
51
S
14
G
4
Posts: 191
Reputation: 5,537

Post » Mon Apr 11, 2016 11:05 am

You could use a different browser for each game.

  • System > On start of layout | system > load game from slot "brain"
  • System > On load failed | system > scroll to obj_Forum
B
17
S
8
G
5
Posts: 340
Reputation: 4,707

Post » Mon Apr 11, 2016 12:26 pm

As I know, LocalStorage is different for each webpage. So if you have one game on http://www.example.com/Game1, you won't be able to access this storage from another game on http://www.example.com/Game2.
The only problem may be when previewing, since you are always previewing on the same page.
B
32
S
7
G
4
Posts: 398
Reputation: 4,591

Post » Fri Apr 15, 2016 9:50 am

grigrizljac wrote:As I know, LocalStorage is different for each webpage. So if you have one game on http://www.example.com/Game1, you won't be able to access this storage from another game on http://www.example.com/Game2.
The only problem may be when previewing, since you are always previewing on the same page.

Okay, so it's an issue in previewing since it always uses the same page. Thanks for the info :)
B
51
S
14
G
4
Posts: 191
Reputation: 5,537

Post » Fri Apr 15, 2016 9:58 am

this mean for each game we need an independent html page??? can we have one html page and differents html5 games on it?
B
37
S
15
G
7
Posts: 1,681
Reputation: 9,614

Post » Fri Apr 15, 2016 6:22 pm

imothep85 wrote:this mean for each game we need an independent html page??? can we have one html page and differents html5 games on it?

Usually, each game is in a different folder on a server, isn't it?
You can, for example, have a webpage (http://www.example.com) with links to games (/game1, /game2 etc.).
Probably, the best thing is to try.
B
32
S
7
G
4
Posts: 398
Reputation: 4,591


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 3 guests