Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

In A Dark Room is it possible to start the game on one PC/browser and then continue it on another? Are there perhaps files I can copy from one machine to another to continue elsewhere?

Edit I'm using Firefox as my browser

share|improve this question
    
This should be possible but have to look into it. Which browser do you use? I think you should look into copying your browser cookies to another PC. These can often be found in a hidden folder under user\appdata –  Menno Gouw Jun 25 '13 at 14:19
1  
Here is how you transfer your user profile (including cookies) with chrome: superuser.com/questions/367741/… –  Menno Gouw Jun 25 '13 at 14:25
    
Forgot to specify browser, sorry. I'm using Firefox –  Rob Jun 25 '13 at 14:52
add comment

3 Answers

up vote 2 down vote accepted

As of October 2013, A Dark Room officially supports importing and exporting saved games. There is a save link in the bottom right corner that will let you copy or paste your current game state as a base64-encoded string:

enter image description here

No more need to mess with the console! Just copy and paste away!

share|improve this answer
add comment

A Dark Room uses localStorage for saving, so these steps will work in all browsers:

  1. Open the JavaScript console. If you don't know how, see this post on Webmasters.
  2. To save, type

    JSON.stringify(localStorage);
    

    in the console and copy the output. (It will be VERY long. Important: Remember not to copy the quotation marks at the beginning and end!) This is now your save string.

  3. To load a saved game, first type

    var storage = 
    

    and then paste your save string. Then, paste this into the console:

    for (var x in storage) { localStorage.setItem(x, storage[x]); }
    
share|improve this answer
    
On Firefox, CTRL+SHIFT+K opens the JavaScript console –  Zommuter Jul 3 '13 at 8:17
    
Hm, I have trouble reimporting this into Firefox, probably due to nested escaped quotes... I also tried storage = JSON.parse(storageStringWithQuotationMarks), which somehow puts parentheses around the whole dict, i.e. something like ({gameState:"{\"version\": etc. and your for loop yields an undefined –  Zommuter Jul 3 '13 at 17:13
2  
There is a little mistake; in last line try: for (var x in storage) { localStorage.setItem(x, storage[x]); } –  surfrider Jul 4 '13 at 6:21
2  
With the source made available now, one could of course use the actual loadGame function to load the game, which boils down to State = JSON.parse(gameState) (where gameState was obtained via localStorage.gameState) and Engine.upgradeState(); –  Zommuter Jul 4 '13 at 6:22
    
@surfrider Whoops, typo. Fixed. –  Doorknob Jul 8 '13 at 17:42
show 1 more comment

Ok i have looked up how to copy your profile on firefox. Make sure you can see hidden files and folders. Then in the appdata in the users map something like (c:\users\'yourname'\AppData\Roaming\Mozilla\firefox) you find a profiles map. You can try to copy this when you finished with the game and paste it on another PC to continue. I am not sure this works but the game is most probably storing stuff through php sessions which end up in the cookies file.

You could also go deeper into the map structure and just copy the cookies file. I found cookies.sqlite. There are also extensions to import and export cookies like this one: https://addons.mozilla.org/nl/firefox/addon/cookies-exportimport/.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.