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

Fix multiplayer quick start, adjust cut off text, and other minor fixes #121

Merged
merged 10 commits into from
Nov 4, 2024

Conversation

StenAL
Copy link

@StenAL StenAL commented Sep 19, 2024

This set of commits fixes many minor things:

  • Multiplayer quick start no longer deadlocks the client. Now it just joins the lobby.
Before After
old_quickjoin.webm
new_quickjoin.webm
  • The "Create a new game" multiplayer text is no longer cut off
Before After
old-mp-lobby new-mp-lobby
  • Right clicking players in lobbies now opens a pop-up menu with some actions.

    • right-click
  • The server now handles error-debug, end, and lobby command packets

    • error-debug is sent by the client when it crashes and includes an error message and the last commands sent/received. This is useful for debugging. It also necessitated increasing the maximum client package size to 2000 bytes since errors can be long.
    • end and lobby command are no-ops
  • Verbose server logging can be enabled with a flag to see outgoing packets. This is useful for debugging.

  • The username regex no longer prevents empty strings as usernames. These are handled by the server and users are assigned a name like "~anonym1111"

  • Some networking classes are renamed for better clarity

  • Some unused classes and meaningless JavaDocs have been removed

Previously, this used the e.isMetaDown() check which was failing as
modern Windows keyboards do not have a meta key. Changing this to check
the mouse button fixes right clicking players in a lobby's player list
which now opens a context menu.
When the client encounters a fatal error, it sends a `error-debug`
packet including the last received and sent packages. This can contain
whole maps and easily exceed the current maximum of 250 bytes.
These are sent by clients when they encounter fatal errors and contain
useful information for debugging. Clients also sent an `end` packet
afterwards and that was also unhandled. This is now handled as a no-op.
This logs all outgoing packets.
@StenAL
Copy link
Author

StenAL commented Nov 3, 2024

Hey @PhilippvK, pinging you in case you haven't seen this PR. I have some other changes ready to publish but would like to get this PR in first.

@PhilippvK
Copy link
Owner

@StenAL When the PR was posted I was traveling and could not try out the changes myself. Sorry for the delay! In the meantime I was able to check the changes and think we can get this merged soon.

Copy link
Owner

@PhilippvK PhilippvK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comments in the (original) codebase are hilarious… Thanks for cleaning things up.

I also think that the deobfuscation process is looking very good thanks to your efforts.

These are used by admins/sheriffs to do things like mute or ban people.
This currently just joins the multiplayer lobby which is an improvement
over the previous behavior of deadlocking the client and forcing a
restart.
These are handled server-side and assigned initialized as an anonymous
user with names like "anon-xxxx".
Having two classes named `Conn` and `Connection` was a bit confusing.
Now it's more clear that one is the app-agnostic socket-based connection
while the other handles all networking for the golf game.

Also, rename thriftLogs to metadataLogs as that's what they're used for.
@PhilippvK PhilippvK merged commit c3716af into PhilippvK:master Nov 4, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants