Dying in hub maps

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
User avatar
Nash
 
 
Posts: 17282
Joined: Mon Oct 27, 2003 12:07 am
Twitch ID: nashmuhandes
Github ID: nashmuhandes
Location: Kuala Lumpur, Malaysia

Dying in hub maps

Post by Nash »

Earlier I was playing Hexen - Death Kings of the Dark Citadel.

Anyway, I reached the Catacombs. It's that map where you start in an ice cave-thingy.

Anyway I got a bit further then I died.

What surprised me is that when I press "Use", I am brought back to the start of the map without all my items and weapons! Is this supposed to happen?

For user-made wads, there's the "autosave" feature but I really think it should work like this:

When the player dies...

A) Autosave exists? Load autosave.

B) Autosave doesn't exist? Load a previously saved game.

C) Autosave and normal saves don't exist? Restore player to the state when he entered the map.

So what I propose is that when the player dies in that map with no saves, the game would store in memory (or at least a temporary file on the hard disk) of the player's items, health, inventory, etc...
User avatar
HobbsTiger1
Posts: 1235
Joined: Fri Jan 07, 2005 7:29 pm
Location: #DMClub

Post by HobbsTiger1 »

Here is the way ZDooms handling of reloading your game after death works.

If Savegame is present (whether it be autosave or not): Loads most recent savegame.
If no savegames present: Starts you back at beginning of level, with no items.
User avatar
Nash
 
 
Posts: 17282
Joined: Mon Oct 27, 2003 12:07 am
Twitch ID: nashmuhandes
Github ID: nashmuhandes
Location: Kuala Lumpur, Malaysia

Post by Nash »

HobbsTiger1 wrote:If no savegames present: Starts you back at beginning of level, with no items.


AKA "Pistol starts" would be okay for regular maps, but NOT for hub maps.

Although there's a meaning to the advise "SAVE OFTEN" there are times where one would simply forget to save or something.

So much important information needs to be restored when the player dies in hub maps - global/world variables, inventory items, weapons and ammo, actor states and positions, etc. I'm not even sure what will happen if the player dies, brought back to life with a pistol start, and attempts to backtrack to an earlier map (since it is a hub after all).
User avatar
HobbsTiger1
Posts: 1235
Joined: Fri Jan 07, 2005 7:29 pm
Location: #DMClub

Post by HobbsTiger1 »

Seeing as I've never died in Hexen, I don't know exactly what happens in that instance (what is kept, such as global variables), but I assume its handled like Doom.
User avatar
Belial
Posts: 1616
Joined: Wed Feb 09, 2005 3:09 pm

Post by Belial »

Setup option: Quake style map restarts/Doom style map restarts.

Feature suggestion?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47962
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Nash wrote:
HobbsTiger1 wrote:If no savegames present: Starts you back at beginning of level, with no items.


AKA "Pistol starts" would be okay for regular maps, but NOT for hub maps.



Guess why there's autosaves. Since it always reloads the last save and each time the levels change an autosave is being done this should work as you want.

Without autosave the game doesn't have the information to completely restore the game to a meaningful state, hence you get a 'pistol start'.
User avatar
Nash
 
 
Posts: 17282
Joined: Mon Oct 27, 2003 12:07 am
Twitch ID: nashmuhandes
Github ID: nashmuhandes
Location: Kuala Lumpur, Malaysia

Post by Nash »

But autosaves can be turned off by the user so there's a chance that info isn't saved when a level changes...

What I propose is a temporary save-file just like autosave, that ignores the autosave cvar, and it only works for that particular session. This file will always be overwritten. This file will be deleted when ZDoom quits.

Or better yet, store the information in memory.
User avatar
Enjay
 
 
Posts: 26402
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Post by Enjay »

Nash wrote:What I propose is a temporary save-file just like autosave, that ignores the autosave cvar, and it only works for that particular session.


So I essentially get an autosave even if I don't want one?
User avatar
Belial
Posts: 1616
Joined: Wed Feb 09, 2005 3:09 pm

Post by Belial »

The funny thing is, autosaves tend to not work when using different iwads often (I think that's the reason, I might be wrong of course). I developed a habit for checking the console for 'game saved' messages, just in case the game didn't notice a level transition. .63a to be exact.

Happened a lot of times.
User avatar
Nash
 
 
Posts: 17282
Joined: Mon Oct 27, 2003 12:07 am
Twitch ID: nashmuhandes
Github ID: nashmuhandes
Location: Kuala Lumpur, Malaysia

Post by Nash »

Enjay wrote:So I essentially get an autosave even if I don't want one?


Unlike regular autosaves, this temporary file is hidden, meaning it won't appear in your save games list in ZDoom, and will not create multiple copies like regular ZDoom autosaves, so it will be overwritten all the time. It will also be deleted when ZDoom quits.

Another solution, as I said before, is to just store all this into memory.
User avatar
HobbsTiger1
Posts: 1235
Joined: Fri Jan 07, 2005 7:29 pm
Location: #DMClub

Post by HobbsTiger1 »

The best way I know of to fix your problem Nash, is to go into your .ini file and change this

Code: Select all

disableautosave=1

to this:

Code: Select all

disableautosave=0


IIRC we also have configurable amounts of autosaves so you might want to set that too. Or, you can manually save often. But I don't think your suggestion, however good it may be, will be implemented.

Return to “General”