Arcade-like respawning on death instead of loading a save
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
-
- Global Moderator
- Posts: 1110
- Joined: Mon Jul 21, 2008 4:08 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia (Modern GZDoom)
Arcade-like respawning on death instead of loading a save
I wonder if there's a way to build the gameplay about the main character dying and respawning at a 'respawn point' with certain consequences (like they get experience points or something else), instead of letting the player load a save. I know that it's probably impossible to block save/loading completely (would be neat, though), but I'd like this respawning mechanic to take place instead of automatically loading a save by pressing 'action'. Is it possible to implement?
-
- Posts: 21706
- Joined: Tue Jul 15, 2003 7:33 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): A lot of them
- Graphics Processor: Not Listed
Re: Arcade-like respawning on death instead of loading a sav
I've seen a handful of mods implement it in various ways; the one I can think of is Vaecrius' Never Breaking Orbit: http://forum.zdoom.org/viewtopic.php?f=43&t=53548
-
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Re: Arcade-like respawning on death instead of loading a sav
tl;dr give player a buttload of health (20k should be more than anything that one can expect the player to be able to take in vanilla short of a telefrag) or make them buddha, then in the player's pain state, once certain conditions are met (health below X, etc.) reset their health and give them an insta-use Chaos Device.
(NBO doesn't use the chaos device but instead records the player's position at start and warps them accordingly - makes for a smoother transition with less spaghetti up front to deal with the teleport fog, but does make it potentially buggier on some maps with elaborate transitions)
(NBO doesn't use the chaos device but instead records the player's position at start and warps them accordingly - makes for a smoother transition with less spaghetti up front to deal with the teleport fog, but does make it potentially buggier on some maps with elaborate transitions)
-
-
- Posts: 26574
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: Arcade-like respawning on death instead of loading a sav
I don't remember the details but I'm sure I've seen it done by essentially getting the player to start a single player game in multiplayer mode and then somehow activating checkpoints. I think some of Cutmanmike's stuff from years ago did it that way.
-
- Posts: 89
- Joined: Fri Jul 29, 2016 12:36 pm
- Location: Spain
Re: Arcade-like respawning on death instead of loading a sav
The Wolf3D TC should have what you want, as it has a life system and when you die the map is restarted after pressing the spacebar. Unfortunately, only the compiled script is in the data as far as I know, so no idea how they managed to do it.
-
-
- Posts: 17465
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: Arcade-like respawning on death instead of loading a sav
MAPINFO AllowRespawn property won't do? You can easily script what happens after death and respawn, in combination with this map property.
-
- Posts: 772
- Joined: Mon May 17, 2010 9:45 am
Re: Arcade-like respawning on death instead of loading a sav
Soft permadeath mod by Snarboo. The source is on Github.
-
- Posts: 2274
- Joined: Tue Jun 30, 2009 1:31 pm
Re: Arcade-like respawning on death instead of loading a sav
Would be ideal, but wouldn't work for gameplay mods unless you redefine every MAPINFO entry for every level. For some reason it doesn't work on DefaultMap (I wonder why...?). It would make my Dark Souls mod much simpler if I could apply it for every mapNash wrote:MAPINFO AllowRespawn property won't do? You can easily script what happens after death and respawn, in combination with this map property.
-
- Posts: 1337
- Joined: Tue Jul 15, 2003 4:18 pm
Re: Arcade-like respawning on death instead of loading a sav
The ACS source for the Wolf3D TC is available here, but won't help much in this case... The life system is buried in there, but there aren't checkpoints, it just restarts you at the beginning of the level (and restarts the level from scratch, unless you're in multiplayer).TechnoDoomed1 wrote:The Wolf3D TC should have what you want, as it has a life system and when you die the map is restarted after pressing the spacebar. Unfortunately, only the compiled script is in the data as far as I know, so no idea how they managed to do it.
-
- Posts: 1235
- Joined: Thu Nov 06, 2014 1:53 pm
Re: Arcade-like respawning on death instead of loading a sav
It does, it's just that DefaultMap only affects map definitions created after it.Mikk- wrote:For some reason it doesn't work on DefaultMap (I wonder why...?).
-
- Posts: 2274
- Joined: Tue Jun 30, 2009 1:31 pm
Re: Arcade-like respawning on death instead of loading a sav
Oh right. My mistake. How could I make that work for say, a gameplay mod?
-
- Posts: 8196
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: Arcade-like respawning on death instead of loading a sav
sv_singleplayerrespawn. It's been in for a while yet... no one's documented it. Fixed.
-
- Posts: 598
- Joined: Sun Feb 24, 2013 4:07 pm
- Location: United Kingdom
Re: Arcade-like respawning on death instead of loading a sav
The problem with that is that gameplay mods can't control that... the player has to set it themselves, which isn't the ideal solution.Major Cooke wrote:sv_singleplayerrespawn. It's been in for a while yet... no one's documented it. Fixed.
-
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Re: Arcade-like respawning on death instead of loading a sav
Right now the way player death is handled is so deeply hard-coded that the only reasonable way you can do this without modifying the executable is to set up the illusion of death without actually killing the player.
On that note, ZScript makes it much easier to replicate the view-fall-to-the-floor effect, though I haven't tried getting the player to face whatever last hurt them.
On that note, ZScript makes it much easier to replicate the view-fall-to-the-floor effect, though I haven't tried getting the player to face whatever last hurt them.
-
- Global Moderator
- Posts: 1110
- Joined: Mon Jul 21, 2008 4:08 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia (Modern GZDoom)
Re: Arcade-like respawning on death instead of loading a sav
I'm thinking of using it for a mapset, not a gameplay mod. Think Dark Souls, in essense.
Creating an illusion via Pain state or something sounds really good.
However, there is no way to truly block saving, is there?
Creating an illusion via Pain state or something sounds really good.
However, there is no way to truly block saving, is there?