Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: DF on a USB?  (Read 4002 times)

brotundbutter

  • Bay Watcher
    • View Profile
DF on a USB?
« on: March 19, 2019, 06:25:27 pm »

I'm looking for ways to play on a computer that forbids downloading programs. My first thought would be to copy my files onto a thumb drive and run the exe from there. Is this possible? The thumb drive I'm planning on using is 16gb - surely that's big enough to leave me sufficient space for save bloat and possibly mods. Also, how exactly would I copy the new saves back over to my home computer to keep everything consistent? Which files need to be duplicated?
Logged

Libash_Thunderhead

  • Bay Watcher
    • View Profile
Re: DF on a USB?
« Reply #1 on: March 19, 2019, 06:57:14 pm »

How about running it directly from the usb device?
DF only save when exit, so you shouldn't have any performance impact.
Logged

brotundbutter

  • Bay Watcher
    • View Profile
Re: DF on a USB?
« Reply #2 on: March 19, 2019, 07:04:53 pm »

That's what I'm thinking, yeah. As far as I can tell the game doesn't necessarily need to be on a computer, since it has no installation process.
Logged

Ulfarr

  • Bay Watcher
  • Going on a pilgrimage to Mars
    • View Profile
Re: DF on a USB?
« Reply #3 on: March 19, 2019, 07:44:38 pm »

Also, how exactly would I copy the new saves back over to my home computer to keep everything consistent? Which files need to be duplicated?

The save folders are called "region x" where x is a number indicating different worlds. They are found inside Dwarf Fortress/data/save.

You only need to copy this region folder from Dwarf Fortress/data/save of your USB DF  and paste it in your home computers Dwarf Fortress/data/save. It would probably be better if you deleted the old save from your home computer before transfering the new one.
Logged
Bring Kobold Kamp to LNP! graphics compatibility fix.

So the conclusion I'm getting here is that we use QSPs because dwarves can't pilot submarines.

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: DF on a USB?
« Reply #4 on: March 19, 2019, 07:49:18 pm »

I've run DF from a usb drive before. Not even copied.
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?

brotundbutter

  • Bay Watcher
    • View Profile
Re: DF on a USB?
« Reply #5 on: March 19, 2019, 08:47:49 pm »

I've run DF from a usb drive before. Not even copied.

The save folders are called "region x" where x is a number indicating different worlds. They are found inside Dwarf Fortress/data/save.

You only need to copy this region folder from Dwarf Fortress/data/save of your USB DF  and paste it in your home computers Dwarf Fortress/data/save. It would probably be better if you deleted the old save from your home computer before transfering the new one.

Alright, awesome. I'm looking forward to slacking off in a whole new way at work tomorrow! ;D
Logged

Libash_Thunderhead

  • Bay Watcher
    • View Profile
Re: DF on a USB?
« Reply #6 on: March 19, 2019, 08:55:27 pm »

And set gamelog.txt to readonly.  It can become too big.
Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: DF on a USB?
« Reply #7 on: March 20, 2019, 03:36:03 am »

Is your thumbdrive USB 3.0? If not, it might be unbearably slow. I tried running a persistent Linux on a 128GB USB 2.0 thumbdrive and it took minutes to even open basic system utilities. A USB hard drive would have better read/write times, and be less volatile (less risk of memory loss with too much use.)

And set gamelog.txt to readonly.  It can become too big.
Wouldn't that disable announcements? Also, I think it gets cleared after it reaches a certain size (2GB?) anyway.
« Last Edit: March 20, 2019, 03:39:39 am by Bumber »
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DF on a USB?
« Reply #8 on: March 20, 2019, 03:44:00 am »

Does DF only write on a save? I thought the "current" folder served a storage purpose during play and not only as a crash protection measure during the saving process.
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: DF on a USB?
« Reply #9 on: March 20, 2019, 09:12:15 am »

I have noted disk activity during gameplay as well, often with stutters if the media has slow write speed. Not sure what it is writing, but it is certainly doing SOMETHING with the disk. Could be gamelog, could be errorlog, both, or even neither. 
Logged

anewaname

  • Bay Watcher
  • The mattock... My choice for problem solving.
    • View Profile
Re: DF on a USB?
« Reply #10 on: March 20, 2019, 12:20:29 pm »

DF writes constantly to the gamelog.txt, and that includes all combat activity including from sparring dwarfs. This is how 3rd party apps like SoundSense get their data, by "immediately" reading the new data that was added to gamelog.txt, where "immediately" roughly means "faster than humans can react".

Because gamelog.txt would only be receiving small amounts of data (even if the writing is constant) and because DF will need to load completely into your computer's memory from the USB, it is likely that running DF off the USB will result in a slow loading and saving of games, but normal gameplay speeds (because the rate of data transfer to the USB is likely to be able to handle the writing to gamelog.txt without backing up..
Logged
How did I manage to successfully apply the lessons of The Screwtape Letters to my perceptions of big grocery stores?

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: DF on a USB?
« Reply #11 on: March 20, 2019, 04:21:34 pm »

This is probably irrelevant to the OP's situation, but if you used symbolic links you could have gamelog.txt and the "current" folder on the hard drive, and everything else on the USB.

This would allow portable playing on any computer on which you have admin privileges, hopefully without read/write issues during gameplay.

Because gamelog.txt would only be receiving small amounts of data (even if the writing is constant)
USB is terrible with lots of small writes (<4KB at a time.)
« Last Edit: March 20, 2019, 04:26:25 pm by Bumber »
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

Clément

  • Bay Watcher
    • View Profile
Re: DF on a USB?
« Reply #12 on: March 20, 2019, 05:14:23 pm »

Isn't the OS keeping gamelog.txt in cache? or at least buffering writes to USB? The flash memory would not be written each time DF output a new line and it would not affect performance.
Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: DF on a USB?
« Reply #13 on: March 20, 2019, 05:45:21 pm »

Isn't the OS keeping gamelog.txt in cache? or at least buffering writes to USB? The flash memory would not be written each time DF output a new line and it would not affect performance.
Even buffered, it's happening many times per second. I guess the performance depends on if DF needs to read from the USB during gameplay for any reason, and if it needs to wait for "current" to finish being written before continuing.
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DF on a USB?
« Reply #14 on: March 20, 2019, 05:50:29 pm »

DF would have to read offloaded characters (such as returning visitors and raiding parties) when they enter/returns to the fortress, if nothing else. However, this is probably not a major drain on the read capacity.
Logged
Pages: [1] 2