HarbourMasters / Shipwright

3.3k stars 494 forks source link

Mitigate playthrough sphere jank and remove sphere enforcement in logic when not needed. #4361

Closed Pepper0ni closed 1 month ago

Pepper0ni commented 2 months ago

The jank in particular is explained here https://discord.com/channels/808039310850130000/1019824570938699798/1197901294728388759 but the short version is that because the logic loops through the map in a fixed order, it will take many spheres to backtrack through areas in a different direction at a different age/time. This fixes the problem by force-processing each region we spread ToDAccess to. This itself does hurt performance but by a reasonable amount as it also reduces the number of full loops made.

This is not a 100% fix as some event access stuff can also cause sphere skipping if it appears in the wrong order.

To compensate for the extra generation time, I have removed sphere enforcement when not generating a playthrough, reducing the looping time needed. This seems to make things up to 33% faster than develop-rando, but also seems very sensitive to placement failures, likely as the costs of the fix are frontloaded in generation.

Fixes:

Cleanups:

Build Artifacts