• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Joining a game while it is running

Status
Not open for further replies.
Level 25
Joined
Feb 2, 2006
Messages
1,686
Hey,
I've been thinking about a way to allow players to join a game which has already started.
Actually the game would have to be saved then and rehosted. The joining player would need the save game, too.

The problem is that if he wants to join, another slot must be open in the save game which has not been used before or has been used by a computer player.

Do you think this is possible somehow? It would be really annoying to reload the game everytime this happens and you could not exceed the limit of players.
I am thinking about a situation where you started a map with 3 of 6 players and the remaining two are computer controlled.
Suddenly someone wants to join for a computer player.

The game would need a recognition event, maybe something like SharpCraft or any network API would do this if they work in multiplayer.
For example a hostbot hosts a dummy game. Whenever someone joins this game the event is triggered in the running game. The game master or team then may accept or reject the join.
If it is accepted the game is saved for all players, modified for a new free slot and hosted but how could you give it to another player?


The whole purpose would be that one can join in the late game instead of waiting for a restart.

edit:
Level changes would be possible too using this method. For level changes you would not need a modification of player slots but the host bot must somehow get all the savegames and events, so again some communication between the hostbot and the running game is required.
 
Level 25
Joined
Feb 2, 2006
Messages
1,686
Do you have a link for the timer bug? For example the campaign has timers in some of its levels and I cannot imagine that the timers won't work anymore after loading.

If I would roll back to the last save I could not play the current state of the game with the joining player so what is the purpose? For example if someone drops and the computer control is taken over or the other players control him and play the game and after 10 min or 2 h someone joins I want to play the current state of the game with the new player replacing the slot.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,190
You restart the session for the dropped client with the same key as was used originally. You then stream him the replay instructions and order the game to be set to unlimited speed. When they catch up (run out of replay instructions) you then synchronize them with everyone else.

This is how Heroes of the Storm does it using the SC2 3.0 engine. The same approach should work for WC3. If the map is performance efficient or sessions short catch up should take no time at all.

Well that is if game speed does not alter the determinism of game results (which it should not if programmed well).
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,190
Yes that was another thought but how could you instruct Warcraft to do this.
The server does. You just need to host a private dummy lobby for the person to join and starts (a "you have been dropped, join X to attempt to re-join). Everything he sees from that point is an illusion (no one but him is in the lobby although the names of the in-game players are there). Since WC3 is deterministic for replays you basically turn a live server session into a replay until the player catches up.

The only problem the idea could have is if WC3 is not deterministic across game speeds (which it should be, but WC3 is kind of a mess so who knows). In which case catching up is impossible.
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
Does not allow one player to re-join/join a session that is currently running.

Often times, the user asking the question has an ulterior end-goal than what they are actually asking. This method could be what he's looking for as it's something which actually works. Essentially, all players could leave the game and then resume with the other guy involved.
 

Zwiebelchen

Hosted Project GR
Level 35
Joined
Sep 17, 2009
Messages
7,236
Often times, the user asking the question has an ulterior end-goal than what they are actually asking. This method could be what he's looking for as it's something which actually works. Essentially, all players could leave the game and then resume with the other guy involved.
This, so much. Coming from Barade, I expect this question to be about the RPG he is working on.

It's just much easier to build a social platform for your RPG and allow players to save/load via code and then just remake the game when a new player wants to join than implementing such horrible workarounds to the WC3 engine.
 
Level 25
Joined
Feb 2, 2006
Messages
1,686
This, so much. Coming from Barade, I expect this question to be about the RPG he is working on.

It's just much easier to build a social platform for your RPG and allow players to save/load via code and then just remake the game when a new player wants to join than implementing such horrible workarounds to the WC3 engine.

It might work for most of the RPGs but using a save/load system involves that you start stronger in the beginning than you should.
Besides save/load systems can be hacked (obviously) if the map is unprotected and I prefer unprotected map.

In my mod starting stronger and than doing the main quests together again with much stronger players is not what I want to do.

Besides my approach involved live joining and rehosting but you might be right that it won't work anyways since it requires some hacks to communicate with the running game/engine of wc3.

My approach would also allow you to do map changes like in the Bonus Campaign which really would be great. The map change could also be done with a save load system but depending on the code lengths might be ... annoying. Besides you would still have to host the next map manually.
 

Zwiebelchen

Hosted Project GR
Level 35
Joined
Sep 17, 2009
Messages
7,236
It might work for most of the RPGs but using a save/load system involves that you start stronger in the beginning than you should.
Start stronger? What do you mean with that? I don't see how a save/load system would in any way affect game balance.

Besides save/load systems can be hacked (obviously) if the map is unprotected and I prefer unprotected map.
Nobody has ever hacked a save/load system with encryption. Don't get me wrong: it is possible, but why bother? Everyone with the intention of hacking will just inject a cheat tool into your map or just remove the singleplayer check and use solo game cheats. Besides, if you leave your map unprotected, everyone can just open the map and cheat whatever item they want in anyway.

In my mod starting stronger and than doing the main quests together again with much stronger players is not what I want to do.
I still don't get why a save/load system in place would make you stronger?

My approach would also allow you to do map changes like in the Bonus Campaign which really would be great. The map change could also be done with a save load system but depending on the code lengths might be ... annoying. Besides you would still have to host the next map manually.
Not without additional user input... so in the end the effort by the user will practically remain the same.
Also, code length doesn't matter since the discovery of the preload bug. Users can just copy & paste their savecodes directly from a preload-created .txt file.
 
Level 25
Joined
Feb 2, 2006
Messages
1,686
Hm if you load the character in the beginning it has the level it had when saving it for example level 20. Other characters will start with level 1. Or do you want to save the whole state of the game?


I didn't know about the preload bug. It is still something else if you can just play the map in single player with cheats to level 25 and then save your character. This does not require much modifications and then you got a save code for a strong character.
If somebody modifies the map others will have to download it and see that it is a different version than the official.
 

Zwiebelchen

Hosted Project GR
Level 35
Joined
Sep 17, 2009
Messages
7,236
Hm if you load the character in the beginning it has the level it had when saving it for example level 20. Other characters will start with level 1. Or do you want to save the whole state of the game?
Both is possible. You can freely define what to save and what not into a code, after all. If you don't want players to carry their level over to a new game, just don't save it?

I didn't know about the preload bug. It is still something else if you can just play the map in single player with cheats to level 25 and then save your character. This does not require much modifications and then you got a save code for a strong character.
You will always be able to cheat, no matter what. Making your map "cheat proof" in WC3 is a fallacy.

If somebody modifies the map others will have to download it and see that it is a different version than the official.
They'll also download when using a regular save/load system. I don't see the advantage of the game save system here...
 
Status
Not open for further replies.
Top