StrataSource / Engine

Issue tracker for Strata Source
46 stars 2 forks source link

Multiplayer Saving #706

Open MyGamepedia opened 1 year ago

MyGamepedia commented 1 year ago

Which component should be improved?

Gameplay

Describe your feature suggestion in more detail

(I made this request thanks OzxyBox request) Do you remember Half Life: Decay ? It's coop game for Half Life on PS2. The main problem - no saves during level, if someone from players die or you lost important NPC for mission - you must fully replay level. It's horrible. Would be cool to add saves during level in multiplayer for Decay remake, or for game that made in this format. In original Source Engine multiplayer players get revival - we can add console command for toggle it, for example sv_player_revival_in_mp 0/1 (1 by default). player_loadsaved entity also just unwork in default Source Engine multiplayer, it can be made working in multiplayer or make analog of this entity, for exemple player_mp_loadsaved.

vrad-exe commented 1 year ago

I think the reason Valve never did multiplayer saving is because it's unclear how to handle it exactly - what happens if you save the game, then load it back with a completely different group of players connected? What about a different number of players? You could try and have the "new" players take the place of the players who are no longer present, but then what if the original person joins back? Do you save the state of players who disconnect and restore it when they reconnect? What about after a map change? There are lots of problems you'd have to solve and questions you'd have to answer, so since Valve never needed saving in multiplayer, they avoided the issue entirely by just disabling the ability entirely at the engine level.

That being said, I do think it would be neat for us to support multiplayer saving, but we'd need to expose options to modders to configure it since there are different ways you'd want it to behave depending on exactly what you're doing. For example Portal 2 style coop should allow any two players to load a save together and allow clients to initiate saves, but in other cases you might want saving to be entirely controlled by the server and have players "locked", not allowing someone to load into another player's place.

It's possible that we might just leave this as something for people to implement with the scripting system, doing only the bare minimum at the engine level (mainly just removing the hardcoded multiplayer checks in the save code).

MyGamepedia commented 1 year ago

I think that mp save loading always must control player which is host server, or first player which come to server (if it's dedicated server), and if the first player will never come and will come other any player - map will be restarted. Load mp save can only host or first player which come to server, if he will share mp save to other player and the other player will try to load it - nothing will be hapen, because he is initially not the mp save owner. New players can't replace old players, but thay still can be spawned as new players if on save moment there was an empty seat, we also should save state of players who disconnect. After a map change without player which disconnected and the player will come again - he will spawn as new player.

MyGamepedia commented 1 year ago

I also think what all this questions should be discussed by team, because I can't keep in mind all questions and problems which can caused with solution to add mp saves.