Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network desync immediately after connecting #5579

Closed
davewthompson opened this issue Jun 10, 2017 · 20 comments
Closed

Network desync immediately after connecting #5579

davewthompson opened this issue Jun 10, 2017 · 20 comments
Labels
multiplayer Related to the multiplayer functionality of OpenRCT2.

Comments

@davewthompson
Copy link

davewthompson commented Jun 10, 2017

Windows 10 x64 / Windows 10 x64
v0.0.8-develop
5c5389a

When playing a multiplayer game with a PC on the same LAN the client will show the network desync detected dialog immediately and the game gradually goes out of sync.

Can you point me in the direction of the log files so I can check myself?

[ N ] Reproducible in RCT2 (vanilla)?
[ Y ] Multiplayer?

Steps to reproduce:

Start a network game on the LAN.
Start a new park.
Client connects and desync almost immediately.
Wait.

@Gymnasiast Gymnasiast added the invalid/incomplete Not applicable or missing information. label Jun 10, 2017
@Gymnasiast
Copy link
Member

We know there are desyncs. But this is so unspecific that we can't do anything with it. "Network desync happens constantly making network games unplayable" describes quite a lot of issues.

If can reliably produce it with a particular save, then it's different.

@davewthompson
Copy link
Author

How can I find more information? Can I run in debug mode? Send you a log?

I've tried to compile the code on my own machine but the latest version doesn't seem to compile using msbuild.

@Gymnasiast
Copy link
Member

Finding desyncs is hard. If you have a save that will always cause a desyncs, or a set of actions that will always cause one, and we can reproduce it, then we can look into it.

Do you always try with the same park? Is it a mostly empty park or a used save?

@Gymnasiast Gymnasiast reopened this Jun 10, 2017
@Gymnasiast Gymnasiast added help multiplayer Related to the multiplayer functionality of OpenRCT2. and removed invalid/incomplete Not applicable or missing information. labels Jun 10, 2017
@davewthompson
Copy link
Author

Crazy Castle P&D.zip

This file will always cause a desync when the second player connects.

@Juli199696
Copy link
Contributor

Well i have checked the File aswell on Windows 10 64 Bit
Got no desync in 5 minutes. Just the normal "lag". I even build a coaster to test. Everything was synced.
Maybe its a slow network on your side @davewthompson?

@janisozaur
Copy link
Member

Network conditions can only affect ping and connection state, not staying in sync.

@Juli199696
Copy link
Contributor

@janisozaur I just rememberd what happend to me in OpenTTD some years ago when i got a bad connection i just got disconnected cus to much desync.

@ZehMatt
Copy link
Member

ZehMatt commented Jun 10, 2017

It is possible that I've fixed this, see: #5578

@janisozaur
Copy link
Member

@davewthompson how's the experience for you now that we've merged #5578?

@davewthompson
Copy link
Author

It doesn't desync immediately so it's an improvement but unfortunately there's a desync about 10 minutes into play...

We are using a wireless network though, so it could easily be that! We'll try again on a wired connection.

Thank you very much to you all for looking.

@IntelOrca
Copy link
Contributor

We are using a wireless network though, so it could easily be that! We'll try again on a wired connection.

It won't be. All desyncs will be caused by bugs in the code.

@Juli199696
Copy link
Contributor

Well desyncs are common in ORCT. Just check the "Disable disconnect on dsync" so you can play without getting disconnected. But i recommend you to play the parks just without money like the most of the Multiplayer Servers do.

@ZehMatt
Copy link
Member

ZehMatt commented Jun 16, 2017

I'm currently working on improving the multiplayer aspect when it comes to desyncs, I've already submited a few new PR's so perhaps your experience will improve with the latest changes soon.

@runfalk
Copy link

runfalk commented Oct 25, 2017

I recently started playing with a friend. I host in-game on x86_64 Linux and he plays on x86_64 Windows. The desync will happen within the first few minutes of staying connected. We have to play with Disable disconnect on dsync to play at all.

This happens in all scenarios we have tested (5 first scenarios in challenging category of RCT2). I haven't yet found anything in particular to reproduce it.

We currently play on 0.1.2 build ce4899c

EDIT: I've confirmed that at least hiring staff and lifting guests causes desync. This happens regardless of the autoplace staff setting.

@thecannons
Copy link

Here's a method I came up with recently that seems to reduce desync's to almost nil:
https://openrct2.org/forums/topic/2710-consistent-server-stability-found-less-desyncs-dev-builds-012/

@IntelOrca
Copy link
Contributor

IntelOrca commented Nov 7, 2017

@Daimyo21 thanks for investigating. I see two potential issues here:

  1. headless servers are not behaving correctly with actions, client to client.
  2. server actions are not executing in the same way as client actions.

This might be related to our game action changes that have gone in since 0.1.1 release. The next thing would be to compare your findings with 0.1.1 or earlier builds of 0.1.2 to see if this is a recent regression.

@thecannons
Copy link

I did some brief tests in stable and this is what I found:

-Desync still seems to happen in headless mode when the client builds, rejoins etc.. maybe not as common as in dev but pretty immediate.
-When server is running without headless and is idle, it seemed pretty stable as far as I can tell
-When server is running without headless and is building/hiring, there was some instances of desync but did not seem as bad and immediate. I did notice however that with ~7,000 guests, it started to lock up and lag a bit as server running in 1280x1024 resolution and software mode. Mind you this is a virtual machine but didnt seem to happen before though I wouldnt really chalk it up as good test results, but it was consistently happening.

@duncanspumpkin
Copy link
Contributor

The main actions you want to test are ride destruct, park entrance placement, park entrance set price, ride open/close/test, ride create, name ride/guest/staff. Those are the ones that have moved to our new code and may be causing new desyncs.

@Gymnasiast Gymnasiast changed the title Network desync happens constantly making network games unplayable Network desync immediately after connecting Mar 12, 2019
@ZehMatt
Copy link
Member

ZehMatt commented Mar 17, 2019

I think this has been resolved with #8895

@ZehMatt ZehMatt closed this as completed Mar 17, 2019
@shuhaowu
Copy link

I'm still seeing this on the latest build. Not all the time, but some of the time. Uncertain how to debug tho.

AaronVanGeffen added a commit that referenced this issue Jul 10, 2019
- Feature: [#485] Rides can now be simulated with ghost trains during construction.
- Feature: [#1260] Option for making giant screenshots have a transparent background.
- Feature: [#2339] Find local servers automatically when fetching servers.
- Feature: [#7296] Allow assigning a keyboard shortcut for the scenery picker.
- Feature: [#8029] Add the Hungarian Forint (HUF) to the list of available currencies.
- Feature: [#8481] Multi-threaded rendering.
- Feature: [#8558] Guest debugging tab.
- Feature: [#8659] Banner and sign texts are now shown in tooltips.
- Feature: [#8687] New multiplayer toolbar icon showing network status with reconnect option.
- Feature: [#8791] Improved tile element flag manipulation in Tile Inspector.
- Feature: [#8919] Allow setting ride price from console.
- Feature: [#8963] Add missing Czech letters to sprite font, use sprite font for Czech.
- Feature: [#9154] Change map toolbar icon with current viewport rotation.
- Change: [#7877] Files are now sorted in logical rather than dictionary order.
- Change: [#8427] Ghost elements now show up as white on the mini-map.
- Change: [#8688] Move common actions from debug menu into cheats menu.
- Change: [#9428] Increase maximum height of the Hypercoaster to RCT1 limits.
- Fix: [#2294] Clients crashing the server with invalid object selection.
- Fix: [#4568, #5896] Incorrect fences removed when building a tracked ride through
- Fix: [#5103] OpenGL: ride track preview not rendered.
- Fix: [#5889] Giant screenshot does not work while using OpenGL renderer.
- Fix: [#5579] Network desync immediately after connecting.
- Fix: [#5893] Looking at guest window tabs other than the main tab eventually causes assertion.
- Fix: [#5905] Urban Park merry-go-round has entrance and exit swapped (original bug).
- Fix: [#6006] Objects higher than 6 metres are considered trees (original bug).
- Fix: [#7039] Map window not rendering properly when using OpenGL.
- Fix: [#7045] Theme window's colour pickers not drawn properly on OpenGL.
- Fix: [#7323] Tunnel entrances not rendering in 'highlight path issues' mode if they have benches inside.
- Fix: [#7729] Money Input Prompt breaks on certain values.
- Fix: [#7884] Unfinished preserved rides can be demolished with quick demolish.
- Fix: [#7913] RCT1/RCT2 title sequence timing is off.
- Fix: [#7700, #8079, #8969] Crash when unloading buggy custom rides.
- Fix: [#7829] Rotated information kiosk can cause 'unreachable' messages.
- Fix: [#7878] Scroll shortcut keys ignore SHIFT/CTRL/ALT modifiers.
- Fix: [#8219] Faulty folder recreation in "save" folder.
- Fix: [#8480, #8535] Crash when mirroring track design.
- Fix: [#8507] Incorrect change in vehicle rolling direction.
- Fix: [#8537] Imported RCT1 rides/shops are all numbered 1.
- Fix: [#8553] Scenery removal tool removes fences and paths while paused.
- Fix: [#8598] Taking screenshots fails with some park names.
- Fix: [#8602] Wall piece collision detection deviates from vanilla
- Fix: [#8649] Setting date does not work in multiplayer.
- Fix: [#8873] Potential crash when placing footpaths.
- Fix: [#8882] Submarine Ride does not count as indoors (original bug).
- Fix: [#8900] Peep tracking is not synchronized.
- Fix: [#8909] Potential crash when invoking game actions as server.
- Fix: [#8947] Detection of AVX2 support.
- Fix: [#8988] Character sprite lookup noticeably slows down drawing.
- Fix: [#9000] Show correct error message if not enough money available.
- Fix: [#9067] Land/water tools show prices when money is disabled.
- Fix: [#9124] Disconnected clients can crash the server.
- Fix: [#9132] System file browser cannot open SV4 files.
- Fix: [#9152] Spectators can modify ride colours.
- Fix: [#9202] Artefacts show when changing ride type as client or using in-game console.
- Fix: [#9240] Crash when passing directory instead of save file.
- Fix: [#9245] Headless servers apply Discord Rich Presence.
- Fix: [#9293] Issue with the native load/save dialog.
- Fix: [#9322] Peep crashing the game trying to find a ride to look at.
- Fix: [#9324] Crash trying to remove invalid footpath scenery.
- Fix: [#9402] Ad campaigns disappear when you save and load the game.
- Fix: [#9411] Ad campaigns end too soon.
- Fix: [#9476] Running `simulate` command on park yields `Completed: (null)`.
- Fix: [#9520] Time Twister object artdec29 conversion problem.
- Fix: Guests eating popcorn are drawn as if they're eating pizza.
- Fix: The arbitrary ride type and vehicle dropdown lists are ordered case-sensitively.
- Improved: [#6116] Expose colour scheme for track elements in the tile inspector.
- Improved: Allow the use of numpad enter key for console and chat.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multiplayer Related to the multiplayer functionality of OpenRCT2.
Projects
None yet
Development

No branches or pull requests

10 participants