-
Notifications
You must be signed in to change notification settings - Fork 819
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
AHIT: Fix massive lag spikes in extremely large multiworlds, add extra security to prevent loading the wrong save file for a seed #3718
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NewSoupVi
approved these changes
Sep 21, 2024
AustinSumigray
pushed a commit
to AustinSumigray/Archipelago
that referenced
this pull request
Jan 4, 2025
…a security to prevent loading the wrong save file for a seed (ArchipelagoMW#3718) * duh * Fuck it * Major fixes * a * b * Even more fixes * New option - NoFreeRoamFinale * a * Hat Logic Fix * Just to be safe * multiworld.random to world.random * KeyError fix * Update .gitignore * Update __init__.py * Zoinks Scoob * ffs * Ruh Roh Raggy, more r-r-r-random bugs! * 0.9b - cleanup + expanded logic difficulty * Update Rules.py * Update Regions.py * AttributeError fix * 0.10b - New Options * 1.0 Preparations * Docs * Docs 2 * Fixes * Update __init__.py * Fixes * variable capture my beloathed * Fixes * a * 10 Seconds logic fix * 1.1 * 1.2 * a * New client * More client changes * 1.3 * Final touch-ups for 1.3 * 1.3.1 * 1.3.3 * Zero Jumps gen error fix * more fixes * Formatting improvements * typo * Update __init__.py * Revert "Update __init__.py" This reverts commit e178a7c. * init * Update to new options API * Missed some * Snatcher Coins fix * Missed some more * some slight touch ups * rewind * a * fix things * Revert "Merge branch 'main' of https://github.com/CookieCat45/Archipelago-ahit" This reverts commit a2360fe, reversing changes made to b8948bc. * Update .gitignore * 1.3.6 * Final touch-ups * Fix client and leftover old options api * Delete setup-ahitclient.py * Update .gitignore * old python version fix * proper warnings for invalid act plandos * Update worlds/ahit/docs/en_A Hat in Time.md Co-authored-by: Danaël V. <[email protected]> * Update worlds/ahit/docs/setup_en.md Co-authored-by: Danaël V. <[email protected]> * 120 char per line * "settings" to "options" * Update DeathWishRules.py * Update worlds/ahit/docs/en_A Hat in Time.md Co-authored-by: Nicholas Saylor <[email protected]> * No more loading the data package * cleanup + act plando fixes * almost forgot * Update Rules.py * a * Update worlds/ahit/Options.py Co-authored-by: Ixrec <[email protected]> * Options stuff * oop * no unnecessary type hints * warn about depot download length in setup guide * Update worlds/ahit/Options.py Co-authored-by: Ixrec <[email protected]> * typo Co-authored-by: Ixrec <[email protected]> * Update worlds/ahit/Rules.py Co-authored-by: Ixrec <[email protected]> * review stuff * More stuff from review * comment * 1.5 Update * link fix? * link fix 2 * Update setup_en.md * Update setup_en.md * Update setup_en.md * Evil * Good fucking lord * Review stuff again + Logic fixes * More review stuff * Even more review stuff - we're almost done * DW review stuff * Finish up review stuff * remove leftover stuff * a * assert item * add A Hat in Time to readme/codeowners files * Fix range options not being corrected properly * 120 chars per line in docs * Update worlds/ahit/Regions.py Co-authored-by: Aaron Wagener <[email protected]> * Update worlds/ahit/DeathWishLocations.py Co-authored-by: Aaron Wagener <[email protected]> * Remove some unnecessary option.class.value * Remove data_version and more option.class.value * Update worlds/ahit/Items.py Co-authored-by: Aaron Wagener <[email protected]> * Remove the rest of option.class.value * Update worlds/ahit/DeathWishLocations.py Co-authored-by: Aaron Wagener <[email protected]> * review stuff * Replace connect_regions with Region.connect * review stuff * Remove unnecessary Optional from LocData * Remove HatType.NONE * Update worlds/ahit/test/TestActs.py Co-authored-by: Aaron Wagener <[email protected]> * fix so default tests actually don't run * Improve performance for death wish rules * rename test file * change test imports * 1000 is probably unnecessary * a * change state.count to state.has * stuff * starting inventory hats fix * shouldn't have done this lol * make ship shape task goal equal to number of tasksanity checks if set to 0 * a * change act shuffle starting acts + logic updates * dumb * option groups + lambda capture cringe + typo * a * b * missing option in groups * c * Fix Your Contract Has Expired being placed on first level when it shouldn't * yche fix * formatting * major logic bug fix for death wish * Update Regions.py * Add missing indirect connections * Fix generation error from chapter 2 start with act shuffle off * a * Revert "a" This reverts commit df58bbc. * Revert "Fix generation error from chapter 2 start with act shuffle off" This reverts commit 0f4d441. * fix async lag * Update Client.py * shop item names need this now * fix indentation --------- Co-authored-by: Danaël V. <[email protected]> Co-authored-by: Nicholas Saylor <[email protected]> Co-authored-by: Ixrec <[email protected]> Co-authored-by: Aaron Wagener <[email protected]> Co-authored-by: Fabian Dill <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
is: bug/fix
Issues that are reporting bugs or pull requests that are fixing bugs.
waiting-on: peer-review
Issue/PR has not been reviewed by enough people yet.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this fixing or adding?
This fixes an issue that arised in the current big async where on level load or when a player used the !alias command, there would be an extremely large lag spike. The was due to the large list of players being sent to the game, causing an in game freeze lasting several seconds to a minute in length because of the sheer size of the message that the game had to process.
The mod does not actually need this data in the first place, so I've fixed this by preventing the client from sending large lists of players to the game, greatly reducing the size of the messages sent and thereby fixing the lag issue.
The only thing that player data was needed for was shop item names, which I've removed the need for by simply adding the player's name to the item name in the shop itself.
This also adds some extra security against loading the wrong save file for a seed with multiple AHIT slots in the same multiworld by using the slot name to verify whether the correct save file was loaded or not.
How was this tested?
I tested the lag spike fix by giving this version of the client to players who had a slot claimed in the big async. They have told me that the lag issue was gone completely.
The incorrect save file security was tested by me by generating a multiworld with two AHIT slots and trying to connect with the incorrect save file.
If this makes graphical changes, please attach screenshots.