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

Potential cleanup issue after double-randomizer #61

Open
MarugawaDK opened this issue Apr 29, 2022 · 2 comments
Open

Potential cleanup issue after double-randomizer #61

MarugawaDK opened this issue Apr 29, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@MarugawaDK
Copy link

I doubt this is an big issue that's going to affect a lot of people, but I just spotted it during a live-stream. And I thought it might be worth looking into if it could be easily fixed.

I don't know the first seed, and I have been unable to recreate the issue myself. (possibly since I'm not on Windows)
So I'll just run through the chain of events as I saw them.

  • Started a new game
  • Initiated an Expert double-randomizer
  • Got to the first puzzle, gave up before solving it
  • Started a new game from the main menu (game crashed)
  • Restarted the game (the first panel was the normal/un-randomized panel, but it was purple/blue from the last randomizer)
  • Initiated an Expert randomizer (this time the seed was: 2238741)

If I use the final seed on a double-randomizer I get a different first panel as the one he had. But on a standard-randomizer, I get the same subsequent panels as the he did (even the one below, but it renders correctly for me). So I am pretty sure that he managed to do this with 2 different seeds, which the randomizer is not letting me.

In any case, the streamer got this monstrosity:

witness-randomizer-errrrhhh

It is completely solvable, but it was like maybe the colors (maybe also the line width etc?) from the double-randomizer, got stuck for the second randomization. And if that is the case, then maybe a check for prior randomization or a cleanup before randomizing, could fix it...? I dunno.

This was his first panel with the double-randomizer: (I get a different one with that seed)

witness-randomizer-errrhhh2

@sigma144
Copy link
Owner

This is a known issue. For some reason, certain panel properties persist after this game is closed. I'm not sure how fixable this will be, but I'll keep this open to remind myself to look into it later.

@sigma144 sigma144 added the bug Something isn't working label May 16, 2022
@NewSoupVi
Copy link

NewSoupVi commented Jun 20, 2022

Hey. The Archipelago Team actually struggled with this issue a lot, and we found a solution (by complete accident)

Sigma rando currently changes the property PATH_WIDTH_SCALE, which gets saved to the savegame and then messes up panels on reload. Even restoring the line width to what it's supposed to be doesn't quite work, because on load, the game does some panel resizing based on the dimensions of the contents that I've never worked out how to impact.

However, there is another property called PATTERN_SCALE. This one also directly affects line width, but crucially, it does not get saved to the savegame!
The effective line width just seems to be PATH_WIDTH_SCALE * PATTERN_SCALE. You can do some basic math to get the exact effect you want. How exactly the two differ visually, I'm not sure.

In AP, we've switched every write to PATH_WIDTH_SCALE to be a write to PATTERN_SCALE instead, and we no longer get any issues on reload.

Offset:
https://github.com/JarnoWesthof/The-Witness-Randomizer-for-Archipelago/blob/master/Source/Randomizer.h#L92

Example use:
https://github.com/JarnoWesthof/The-Witness-Randomizer-for-Archipelago/blob/master/Source/Archipelago/PanelLocker.cpp#L62

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants