Chaosforge Forum

  • December 21, 2024, 07:05
  • Welcome, Guest
Please login or register.



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

Author Topic: Quicksave protection?  (Read 3596 times)

Omega Tyrant

  • Elder
  • First Sergeant
  • *
  • *
  • Offline Offline
  • Posts: 112
  • First to win Inquisitor and Eagerness Angelic
    • View Profile
Quicksave protection?
« on: May 01, 2012, 02:06 »

I recently had a A100 run that was going amazingly well. When I was on the 89th floor, about to advance to the 90th while still in perfect shape, my laptop suddenly turned itself off due to low battery, without having gave me the low battery warning beforehand. With no save protection for such circumstances, that run is now gone, with absolutely nothing to show for it.

As such, would it be possible to implement a feature, where if Doom RL is abruptly ended while still in play, the game will do a quicksave of where you were before the game turned off? Seeing such deep runs just vanish like that is discouraging.
« Last Edit: May 01, 2012, 02:14 by Omega Tyrant »
Logged
0.9.9.8 Badges - [26|26|26|18|6|2] (26/26/26/17/5/0 in 0.9.9.7)
0.9.9.8 Medals - 44/50 (35/43 in 0.9.9.7)

Kornel Kisielewicz

  • God Hand
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 4578
    • View Profile
    • http://chaosforge.org/
Re: Quicksave protection?
« Reply #1 on: May 01, 2012, 08:15 »

Problem is that DoomRL would have no way to detect whether your power went off or you did a force close on it.
Logged
at your service,
Kornel Kisielewicz

Game Hunter

  • Programmer
  • Local Inquisitor
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1044
  • Looks like game to me.
    • View Profile
    • Channel, the Roguelike
Re: Quicksave protection?
« Reply #2 on: May 01, 2012, 10:07 »

Problem is that DoomRL would have no way to detect whether your power went off or you did a force close on it.
I don't know if we need to make that distinction. Obviously if it's an unexpected shutdown (i.e., power outrage without backup) then nothing can be done, but if it's a "this computer's out of power, let's start shutting down" automatic process then it should be able to do an autosave all the same. I also doubt there are enough people who use force-close to restart the game to consider the negative side-effects.

So I guess I don't see any problems with adding it. It'll be more useful once "save anywhere" is implemented, at least.
Logged
I'm just a dude playing a dude disguised as another dude.

Latest LPs: Angband, Delver

Kornel Kisielewicz

  • God Hand
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 4578
    • View Profile
    • http://chaosforge.org/
Re: Quicksave protection?
« Reply #3 on: May 01, 2012, 10:11 »

Game Hunter, you didn't get the point :) -- you're about to die? Do a force close and replay the level from the save point. Unless we had save anytime, and the game would save on every move, this would be an exploit to save your character.
Logged
at your service,
Kornel Kisielewicz

Game Hunter

  • Programmer
  • Local Inquisitor
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1044
  • Looks like game to me.
    • View Profile
    • Channel, the Roguelike
Re: Quicksave protection?
« Reply #4 on: May 01, 2012, 11:18 »

Do a force close and replay the level from the save point.
Oh right, derp. Change that "more useful" to "only workable" from the previous post, then!
Logged
I'm just a dude playing a dude disguised as another dude.

Latest LPs: Angband, Delver

thelaptop

  • Chaos Fanatic!
  • Grand Inquisitor
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 2530
    • View Profile
Re: Quicksave protection?
« Reply #5 on: May 01, 2012, 11:25 »

How about storing the save file (for the previous level) plus some transaction-log-like thing that stores the current seed and a transaction record of moves taken to replay?  In short, we use save points as a "committed" transaction, and then use redo-logging to recover the lost state for the current level.

Maybe incorporate a query to the OS on how long it has been up compared to some checkpoint in the move transaction log.  =P
Logged
I computed, therefore I was.
Pages: [1]