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

Multi-player game with 4 players causes multiple players to be playing the same card at the same time, then hangs. #373

Open
rainerschoe opened this issue Feb 25, 2021 · 9 comments
Labels

Comments

@rainerschoe
Copy link

rainerschoe commented Feb 25, 2021

Background info:
Yesterday I was trying to host an online game
Version 5.5.0 downloaded as App-image from https://jcloisterzone.com
OS: Linux (all players)
Java openjdk v.11.
Network: SSH tunnel (ssh -R style tunnel) forwarding connection of my public v-server to my local machine on port 37447
(I am not 100% sure if and how the release versions on https://jcloisterzone.com relate to the git tags in GitHub, as latest tagged version on GitHub seems to be 5.3.2)

What worked:
The multi player game worked fine when playing with 2 players (host + one client).

What did not work:
But when I played with 4 online players weird things started to happen:

  • Two players somehow see their own color as the color of another player respectively.
  • Two player's turn is at the same time for the same drawn card. Whoever then places the tile first gets the move.
  • After running into this situation (in first round) game does not continue.

Consistency of the error:
This was consistently reproducible twice in a row, each time observing a slightly different combination of the issues listed above.

Workaround:
I then switched to version 4.6 (legacy) which worked fine.

@farin
Copy link
Owner

farin commented Feb 25, 2021

hi

proper tags are in separate client repo https://github.com/farin/JCloisterZone-Client
(there are mandatory for building it)
in this repo. tags may be sometimes accidentally missing

anyway I going to investigate it

@farin farin added the bug label Feb 25, 2021
@farin
Copy link
Owner

farin commented Feb 25, 2021

just one question? did everybody used own "app instance" (I mean app run under different machine or user account -> with unique client id in configuration) (still even with copied config it should be working at least up to first reconnect)

@rainerschoe
Copy link
Author

rainerschoe commented Feb 26, 2021

Hi,
Everybody played on his/her own instance of the game.
Al players used Linux (2x Fedora33, 1x Redhat, 1x ArchLinux).

I was using ssh tunnelling in the following scheme to circumvent NAT:

Fedora33 JCloisterzone client acting as host <-- ssh -R 4000:127.0.0.1:37447 publicServerIp --> Debian server in public internet with ssh server <---- Jcloisterzone clients connecting to publicServerIp:4000

This has the effect that all Connections to publicServerIp port 4000 get forwarded to localhost of the Fedora33 game host port 37447 through the tunnel by opening TCP sockets there.
From a network point of view, the JCloisterzone host sees all clients as if they were connecting from localhost/127.0.0.1 (but with different TCP ports each).

So if you are using "IP address only" somewhere to distinguish players, it might explain the observed behavior.

Might need some more experiments.

@farin
Copy link
Owner

farin commented Feb 26, 2021

ip address is not used, it just about unique id

i think that key informations is "Two players somehow see their own color as the color of another player respectively."
I look like there is wromg mapping between client and "slot" (particula color).

One more question. did you set up game with radomized player order?

@rainerschoe
Copy link
Author

rainerschoe commented Feb 26, 2021

No, used fixed player order (did not change any default settings except adding 2 extensions)

@bamx23
Copy link

bamx23 commented Apr 28, 2021

This happened to me when several players had the same preferred colour in settings

@rainerschoe
Copy link
Author

Hi, just to report back and maybe give some more information:
We played v4.6 as a workaround for some time now, which works mostly well.
However after some multiplayer sessions using v4.6, we found out that if you save a multiplayer game and restore it, it basically shows the same problem, as described here: Player colors are all mixed up and game is unplayable.
In v4.6 It seems to be related to the order in which people connect to the saved/restored game. We have the feeling that if people connect in same order as they connected in initial game it works.

Not sure if this helps, but maybe the bug was kind of hidden in v4.6 and now appears hard in new versions.

@farin
Copy link
Owner

farin commented Apr 29, 2021

This happened to me when several players had the same preferred colour in settings|

@bamx23 that's interesting observation, thx for it. i am going to investigate it
@rainerschoe that may helps too

@farin
Copy link
Owner

farin commented Apr 29, 2021

Not observed on localhost, even with multiple players.
I guess it will be related to network delay. Keeping my eyes on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants