Openrct2: Add a 'retry'/'reconnect' console command

Created on 12 Mar 2016  路  9Comments  路  Source: OpenRCT2/OpenRCT2

Desyncs are annoying and sometimes you have to reconnect to a server. But it would be handy to support typing 'retry' or 'reconnect' in the console to quickly reconnect.

Source engine games have support for 'retry'.

enhancement

Most helpful comment

There should be an undertaking to find the root source of the desyncs and fix that. I think I found about five of them but it is really hard and it would be good to have more people to search. I will describe some of the things that I have found can cause them:

  1. The game logic can be affected by variables or memory outside of the game save state. Look at _guestGenerationProbability for an example that had to be added to scenario_save_network/game_load_network.
  2. There could also be asynchronous data affecting the game, such as the playback position of ride music which was causing a desync, since that runs in a different thread and might be different for each client. Another example was in climate.c, a flag was being set based on if the thunder sound was playing. This was not only being affected by asynchronicity but also whether the player had sound on or off in their config. The flag was determining if scenario_rand would be called. Anytime scenario_rand is called it will affect the rest of the game state, so util_rand needed to be used instead.

There are also issues with game command ghosts affecting peep behavior on client only, like placing paths, that will cause desync. The desyncs that happen from just running the game in the background described in #1968 should be highest priority. You can test for them faster by uncommenting part of toolbar code to enable high speed game in multiplayer, because they sometimes will not appear for hundreds of game years.

All 9 comments

I believe this was raised before. It is not really feasible for the quite large map re-download with the amount of desyncs we still have.

Even if there weren't desyncs, there could be tons of reasons to simply want to reconnect. Especially if server plugins/scripts are ever going to be supported. Makes testing mods/scripts easier. etc.

I haven't done much multiplayer, so could you verify this: do we currently have a button to reconnect? If so, adding a console option would be easy and not intrusive.

We don't have such button yet. Client has to restart/drop from MP game and connect again.

I also agree it shouldn't be hard to add it, but I fear adding it before a lot more desync causes get solved will cause an unnecessary burden on servers hosting parks, degrading the experience for others.

I'm all for having such button, as I see value in it, but only once we have addressed more glaring issues with MP, like sending custom objects every time we sync map and desyncs.

There should be an undertaking to find the root source of the desyncs and fix that. I think I found about five of them but it is really hard and it would be good to have more people to search. I will describe some of the things that I have found can cause them:

  1. The game logic can be affected by variables or memory outside of the game save state. Look at _guestGenerationProbability for an example that had to be added to scenario_save_network/game_load_network.
  2. There could also be asynchronous data affecting the game, such as the playback position of ride music which was causing a desync, since that runs in a different thread and might be different for each client. Another example was in climate.c, a flag was being set based on if the thunder sound was playing. This was not only being affected by asynchronicity but also whether the player had sound on or off in their config. The flag was determining if scenario_rand would be called. Anytime scenario_rand is called it will affect the rest of the game state, so util_rand needed to be used instead.

There are also issues with game command ghosts affecting peep behavior on client only, like placing paths, that will cause desync. The desyncs that happen from just running the game in the background described in #1968 should be highest priority. You can test for them faster by uncommenting part of toolbar code to enable high speed game in multiplayer, because they sometimes will not appear for hundreds of game years.

@zsilencer

You can test for them faster by uncommenting part of toolbar code to enable high speed game in multiplayer, because they sometimes will not appear for hundreds of game years.

This is because we only check desync using srand. The more things that are on the map that use srand, the more likely / quicker the desync shows up. So its good to use highly populated maps to test this.

@janisozaur

I also agree it shouldn't be hard to add it, but I fear adding it before a lot more desync causes get solved will cause an unnecessary burden on servers hosting parks, degrading the experience for others.

How would that really affect the server performance or player experience? The player can decide for their own if they want to redownload the save state by reconnecting or not. And the amount of traffic involved with that shouldn't be a problem for anyone hosting gameservers.

Personally I only play OpenRCT2 over LAN and the reconnect button/console command would be highly appreciated.

@JarnoVgr there is no point reconnecting on every desync because you would just be reconnecting every single minute and more often on servers with many players. Every time a player connects, the server has upload the map to the player which reduces the bandwidth available for other players.

I think it would be good to add a reconnect button to the disconnected window though, providing you weren't kicked.

@IntelOrca I didn't say automatic reconnecting would be a good solution. Just a button in the UI or a reconnect command would be sufficient. This way the friend of mine can reconnect at certain times (which he does now as well by disconnecting and then going back to the serverlist) once we notice something messed up. It just makes our lives a little bit easier. ;)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

qwertychouskie picture qwertychouskie  路  3Comments

Xaroth picture Xaroth  路  3Comments

deurklink picture deurklink  路  3Comments

wildgoosespeeder picture wildgoosespeeder  路  3Comments

Ionaru picture Ionaru  路  3Comments