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 client connection retries, lobby resizing, and lobby joining delays #109

Merged
merged 6 commits into from
May 28, 2024

Commits on May 27, 2024

  1. Deobfuscate start-up code in AApplet

    Mostly code in AdCanvas, IPanel and LoadingPanel to understand what
    AApplet is doing.
    StenAL committed May 27, 2024
    Configuration menu
    Copy the full SHA
    4cc50ed View commit details
    Browse the repository at this point in the history
  2. Deobfuscate lobby selection and chat code

    These were helpful in tracking down the layout shift bug fixed in
    LobbyPanel in the next commit.
    StenAL committed May 27, 2024
    Configuration menu
    Copy the full SHA
    b530afa View commit details
    Browse the repository at this point in the history
  3. Fix layout shift when resizing the game while in a lobby

    Resizing the applet caused the lobby screen to do a new layout and
    since it was using the default LayoutManager (FlowLayout), the panels
    were being placed in unintended places. Most other classes explicitly
    set the layout manager to null to avoid this, however, looks like this
    was overlooked in LobbyPanel.
    StenAL committed May 27, 2024
    Configuration menu
    Copy the full SHA
    36ae773 View commit details
    Browse the repository at this point in the history
  4. Fix client connection retry behaviour

    Previously, this tried to open a new page in the browser, however,
    in our environment, appletContext was null and was throwing an
    exception.
    
    This was fixed by destroying the game applet and reinitializing it when
    the retry button is clicked.
    
    Reinitalizing the applet caused its size to get re-measured which was
    leading to layout bugs after retries, this was fixed by hardcoding the
    applet width and height in AApplet. Since the whole game is hardcoded
    for this size, this does not result in any problems elsewhere.
    StenAL committed May 27, 2024
    Configuration menu
    Copy the full SHA
    8bd754d View commit details
    Browse the repository at this point in the history
  5. Deobfuscate lobby joining code

    This revealed artificial delays in joining lobbies, probably as a means
    of flood protection. This can be verified by going into a single player
    lobby and clicking "Multiplayer", then "Single player" again rapidly and
    seeing a blank screen stuck on the sleep timer.
    StenAL committed May 27, 2024
    Configuration menu
    Copy the full SHA
    b87ac4d View commit details
    Browse the repository at this point in the history
  6. Set lobby join delay to 1 second

    Previously the delay was a ladder of 3 -> 7 -> 15 seconds and switching
    between lobbies was annoying. Now it's faster and the change does not
    seem to cause any issues. I still opted to keep a one second delay in
    case removing the delay would break something.
    StenAL committed May 27, 2024
    Configuration menu
    Copy the full SHA
    6759ad7 View commit details
    Browse the repository at this point in the history