Support for Steam Cloud Save

Discussion and feedback on Construct 2

Post » Mon Dec 28, 2015 11:20 am

I'm wondering how to make save system in C2 that would work best with steam cloud saves. Of course I'm exporting game via NW.js.

Localstorage/webstorage doesn't do the job. What alternatives are there?
B
54
S
14
G
10
Posts: 287
Reputation: 7,642

Post » Mon Dec 28, 2015 3:19 pm

Save the game data files locally using the nw.js object file actions (don't bother with local save). Then configure steam Auto-Cloud to inspect and update the folder where you save the game files (you just need to pick a folder where the nw.js object will have write access, so My Documents or a sub-folder is best IMO). This tutorial contains an example of how to use the built in save game function with nw.js; however, you could easily opt to save data in a file of your own format, something like "mysave.mygame" and read/write data to it as text.
B
68
S
17
G
65
Posts: 2,185
Reputation: 41,310

Post » Mon Dec 28, 2015 3:28 pm

Cloud save is easy to setup on Steam and my game uses local storage and works just fine with cloud save but the best way to do it is what Colludium said. I will also change to a custom save in my game as well so users can see where the save files are stored easily.
B
46
S
19
G
10
Posts: 659
Reputation: 10,128

Post » Thu Dec 31, 2015 9:09 am

Thank you for answers.
B
54
S
14
G
10
Posts: 287
Reputation: 7,642

Post » Thu Jan 21, 2016 3:28 pm

I'd like to get back to this issue.

Is C2's save system (tutorial: https://www.scirra.com/tutorials/526/ho ... -savegames ) supporting Steam Cloud save? How to achieve this?
B
54
S
14
G
10
Posts: 287
Reputation: 7,642

Post » Thu Jan 21, 2016 4:19 pm

Yes you can use that tutorial and it will work with Steam cloud save. Cloud save is handled in steamworks and you don't have to do anything in C2. All you need to do is to tell Steam which folder your game uses for saving and it will work. So just make a regular saving solution in C2 and then do the rest when you have a developer account on steam and can access steamworks and its settings.
B
46
S
19
G
10
Posts: 659
Reputation: 10,128

Post » Fri Jan 22, 2016 8:57 am

As you mentioned, when configuring Steam Cloud Save you have show where save files are (folder or files). What folder/file should I point? There's no additional files created when I save game using
Image
B
54
S
14
G
10
Posts: 287
Reputation: 7,642

Post » Fri Jan 22, 2016 9:25 am

Might not help because I save differently but...

If using local storage game files are in (main disk)/user/(username)/appdata/local/(yourgamesname.)
I'm not sure if a savestate is also there I always use local storage for saving/loading.

Ok now in steamworks.
Setting up this way in root paths for windows:

root: WinAppDataLocal
subdirectory:(gamename)/Local storage <---This changed in the latest NW.js to a different folder position but still in this area so will need editing slightly)

for the mac versions just do the same but set root to MacAppSupport and OS obviously to OSX.
B
12
S
4
G
1
Posts: 137
Reputation: 1,519

Post » Fri Jan 22, 2016 10:51 am

So I made test for (main disk)/user/(username)/appdata/local/(yourgamesname.)

Before save:
Code: Select all
\   Cache\      
\   GPUCache\      
\   Local Storage\      
\   lockfile      
\   Web Data      
\   Web Data-journal      
\Cache\   index-dir\      
\Cache\   index      
\Cache\index-dir\   the-real-index      
\GPUCache\   data_0      
\GPUCache\   data_1      
\GPUCache\   data_2      
\GPUCache\   data_3      
\GPUCache\   index


After save:
Code: Select all
\   Cache\      
\   databases\      
\   GPUCache\      
\   IndexedDB\      
\   Local Storage\      
\   QuotaManager      
\   QuotaManager-journal      
\   Web Data      
\   Web Data-journal      
\Cache\   index-dir\      
\Cache\   index      
\Cache\index-dir\   the-real-index      
\databases\   Databases.db   db   
\databases\   Databases.db-journal   db-journal   
\GPUCache\   data_0      
\GPUCache\   data_1      
\GPUCache\   data_2      
\GPUCache\   data_3      
\GPUCache\   index      
\IndexedDB\   file__0.indexeddb.leveldb\   leveldb   
\IndexedDB\file__0.indexeddb.leveldb\   000003.log   log   
\IndexedDB\file__0.indexeddb.leveldb\   CURRENT      
\IndexedDB\file__0.indexeddb.leveldb\   LOCK      
\IndexedDB\file__0.indexeddb.leveldb\   LOG      
\IndexedDB\file__0.indexeddb.leveldb\   MANIFEST-000002


Is there any documentation or explanation what those files are? Where are saved games etc.?
B
54
S
14
G
10
Posts: 287
Reputation: 7,642

Post » Sat Jan 23, 2016 1:28 am

@tecbug, you need to follow that tutorial I linked above and use the nw.js save function and not the local storage save function.
B
68
S
17
G
65
Posts: 2,185
Reputation: 41,310


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 8 guests