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

Black window on startup of client #69

Closed
mikumikudice opened this issue Aug 25, 2021 · 7 comments
Closed

Black window on startup of client #69

mikumikudice opened this issue Aug 25, 2021 · 7 comments

Comments

@mikumikudice
Copy link

OS: 5.13.11-1-MANJARO
rust version used to build: 1.47.0
Device data: AMD Ryzen 3 2200G with Radeon Vega Graphics | Memory Size: 6 GB + 512 MB (total is 8gb but radeon card uses the rest of memory)
The terminal output keeps printing [INFO][westiny_client::systems::client_connect] Network event: Disconnect(1.2.3.4:5745) but nothing happens.

@DomonkosSuranyi
Copy link
Collaborator

At the current state of the game the client keeps black until successful server connection.
Is your server running?
Could you show the server and client logs?

@mikumikudice
Copy link
Author

mikumikudice commented Aug 27, 2021

@DomonkosSuranyi where do I find these logs? I couldn't find any of them. Also I tried again to run both server and client, adding the same export arg to the server, but the problem keeps unsolved.

@DomonkosSuranyi
Copy link
Collaborator

I think the issue here is that the client tries to connect to the server on a different address/port than the one where the server is listening on.

If you don't define a WESTINY_SERVER_ADDRESS it will try to find the server on address 0.0.0.0:5745. The server's default is this one too.

So how to solve the problem:

  1. Start the server (cargo run --release --bin westiny_server)
  2. Open another console
  3. In the second console run the client without defining a WESTINY_SERVER_ADDRESS. (cargo run --release --bin westiny_client)

It should be able to connect now and your player should be shown instead of the black screen.

If the above solution did not work:

  1. Start the server (cargo run --release --bin westiny_server)
  2. Check the first console-log-line which tells the address where the server is listening on.
  3. Open another console
  4. In the second console run the client with defining server address. (e.g. WESTINY_SERVER_ADDRESS="0.0.0.0:5745"cargo run --release --bin westiny_client)

Please let me know if none helped.

@DomonkosSuranyi
Copy link
Collaborator

Additional notes:

  • The server does not care this env var. It's address can be configured at resources/server_network.ron.
  • By default westiny does not logs to a file. You can command it to do so setting the env var AMETHYST_LOG_FILE_PATH

@DomonkosSuranyi
Copy link
Collaborator

DomonkosSuranyi commented Sep 2, 2021

I've updated the README to make it clear to everyone and additionally added a section to it to explain how to change player name and how to run multiple clients on the same computer.
Have fun ;)

@mikumikudice
Copy link
Author

mikumikudice commented Sep 5, 2021

I received this error after shutting down:

[ERROR][westiny_server::systems::network_messenger] Error during disconnect_client: Could not find address 127.0.0.1:53658 in registry

But the game worked as it should (I guess) running both client and server without export flags! I think it's ok to close the issue for now, right?

@DomonkosSuranyi
Copy link
Collaborator

DomonkosSuranyi commented Sep 6, 2021

I'm glad to hear that!
The error message occurred because the server tried to send a 'Disconnect' message to the client while the client was offline already. For now it's okay.

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

No branches or pull requests

2 participants