Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Automatic backups  (Read 944 times)

Sowelu

  • Bay Watcher
  • I am offishially a penguin.
    • View Profile
Automatic backups
« on: September 27, 2007, 08:42:00 pm »

Many, many years ago, there was a game called Starflight.  It was pretty awesome.  A space exploration RPG with procedurally generated planet surfaces...the whole universe on two 5 1/4" disks.

It didn't really have the same concept of a 'saved game' that we have today.  You see, after you installed Starflight, it modified its data files as you played.  It only kept one copy of those data files, so if you wanted to start a new game, you got to reinstall.

When you finally called it a night, Starflight gave you two options.  "Save and Quit", and "Quit Without Saving".  But, because Starflight had been modifying its data files the whole time you were playing, you had to save or it would wind up in an inconsistant state and you couldn't reload.  "Quit Without Saving" basically meant "Yes, I want to reinstall".

It goes without saying that a power outage was the same as "Quit Without Saving".

Does any of this sound familiar?  Yeah...Dwarf Fortress is the only other game I know of that works like this.  It's a very ballsy way of managing data, but it lets you do things faster and easier and using less memory.  Plus it lends itself very well to the standard roguelike method of playing, the whole "losing is fun" thing.

Problem.  Sometimes the power goes out, and sometimes the game crashes.  (I think Starflight only crashed on me once in my life, but DF is constantly under development so that's understandable.)  And unless you wanted to do a happy little DOS dance of shuffling directories and files around *every* time you started playing Starflight, you were absolutely hosed when that happens.  So someone, somewhere, came up with a solution.  Let's make a batch file that backs up Starflight every time you start it up, so if it crashes, you'll be safe!


Uh, this is going on pretty long-winded.  But here's the upshot.  DF really oughtta do this.  It would be nice if DF could save without quitting, too, just because that makes you feel safer playing eight hours at a stretch (you won't be afraid of losing everything if you lose power).  And furthermore, it would be nice if DF did a sanity check when you started up a region.  That way if you end up with a bag of infinite stones that'll crash the map when you leave, it'll tell you -before- you start playing, and let you restore from a backup right there on the spot (instead of blindly rewriting the backup with a corrupt version).

ADOM (or was it some other roguelike?) only deletes your saved game when you die, or when you overwrite it, which means that a crash won't kill your adventurer.  Of course it also creates a file that tells it "Whoops, there's a game in process right now, and I'd better not run two copies at the same time or they'll step on each other".  Which is also a minor irritant to people who are trying to save-scum, just enough that you feel kind of guilty.


Maybe this is already on the list and I didn't notice...But, eh, it would help a lot.  And if this isn't a feature that's coming in the new version, maybe someone wants to make a wrapper for Dwarf Fortress that automates the process!  Boy that sure would be nice.

PS:  This may have just been an excuse to reminisce about Starflight.

Logged
Some things were made for one thing, for me / that one thing is the sea~
His servers are going to be powered by goat blood and moonlight.
Oh, a biomass/24 hour solar facility. How green!

Capntastic

  • Bay Watcher
  • Greetings, mortals!
    • View Profile
    • A review and literature weblog I never update
Re: Automatic backups
« Reply #1 on: September 28, 2007, 03:15:00 am »

The only way an automatic backup feature would be cool is if it did it silently without any noticeable slowdown, so I don't get off rhythm when I'm mining endurium or trying to deal with some Spemin scum.
Logged

Seryntas

  • Bay Watcher
  • has created a masterpiece!
    • View Profile
    • RPGWW Forums
Re: Automatic backups
« Reply #2 on: September 28, 2007, 07:16:00 am »

I am stupendously unsurprised Capntastic can make reference to Starflight.
Logged
"Nectar and ambrosia are all the gods are allowed to eat in Greek mythology. In that way they're kind of like pandas. You know, in diet. From there the similarities break down." -my Greek Lit TA

Sowelu

  • Bay Watcher
  • I am offishially a penguin.
    • View Profile
Re: Automatic backups
« Reply #3 on: September 28, 2007, 01:44:00 pm »

"Automatic" may actually be the wrong word.  It doesn't need to happen without user intervention (at startup, for example, or when the user presses 'save game').  For me, all I want is to stop having to shuffle directories around by hand.

I think that an "autosave at the start of each season" that you can turn on or off would get a lot of support.  Seasons are a natural break in the rhythm, anyway.

PS.  Endurium?  You bastard.
PPS.  Now I really, really want to mine endurium in Dwarf Fortress.  Complete with a flaring magma river, perhaps?
PPPS.  There needs to be a Starflight 3, but fan-based sequels never get anywhere.
PPPPS.  Ur-Quan Masters was close enough, so I'll live.

Logged
Some things were made for one thing, for me / that one thing is the sea~
His servers are going to be powered by goat blood and moonlight.
Oh, a biomass/24 hour solar facility. How green!

Tamren

  • Bay Watcher
  • Two dreams away
    • View Profile
Re: Automatic backups
« Reply #4 on: September 29, 2007, 07:31:00 pm »

holy nostalgia bomb batman....

Anyway that would be great. A quicksave would be nice as well. Its not as bad as save scumming because you can only save that way once.

Logged
Fear not the insane man. For who are you to say he does not percieve the true reality?

hapes

  • Bay Watcher
    • View Profile
Re: Automatic backups
« Reply #5 on: September 30, 2007, 11:57:00 pm »

A batch file that you ran instead of dwarf fortress would do the job.

df.exe
copy <directory> <backupdirectory>

It may be a tad more complicated than that, and it doesn't really deal with multiple desired autosaves, but it'll prevent serious screwups.  

You could move the copy to just BEFORE the df.exe call, and backup just before you run, which makes more sense if you're worried about a crash.  That way you just lose this session's work.  If you backup AFTER a crash, which this would do, you aren't really doing yourself any favors.

Logged

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: Automatic backups
« Reply #6 on: October 01, 2007, 02:09:00 pm »

It should be possible to just have it ask you if you want to backup before running DF.  

That way you can have it backup every time you start but if you know the save is corrupt you can just choose 'Run DF without backup' without having to fumble around trying to look for the real .exe just to see what kinda funny stuff will happen. (gasp for air) It looks like Guilliman did something like that with the dwarf toolbox batches.

P.S. I loved the idea of the infinite bed shot put(mebbe spelled wrong).

Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!