skell wrote:
1. The picross scripts' speed can be trivially improved by adding the following check at the start of "check" label:
If ...
Wait until var "puzzleSolved" = 0
Wait 1
Go to check
If End
I was thinking about this today, and had a bit of time to investigate tonight. This is a good optimization (and I think skell might possibly be underestimating its impact, but he has better access to diagnostic tools than I do....), but there's a couple of further tweaks that can/should be done.
First, all Picr Col/Row characters need the following code deleted:
If ...
Wait until var "picr_MySize" = 0
Imperative No ghost display
If End
Instead, this code should be reserved for the Picr Col/Row 0-7 values, only check whether _MyO is 0, and be placed immediately before the "
check:"
label. (Otherwise, the Wait until var "
puzzleSolved"
= 0 will cause the '0' hints at the start of each row/col to remain visible.)
Secondly, in Picr Changer, the "
Set var puzzleSolved = 1"
should be set after Build Bridge and Build Grass seperately instead of immediately before all 3 Build options. There is no need for puzzleSolved to be set to 1 after a change from Grass to Floor, so avoiding that would cut down on some unnecessary runtime.
These optimizations help a lot of random running around in a room, and thus help a lot with undo. Might be enough to avoid having to completely rescript the rooms, though some testing would of course be advised (I did a random test of LCS:5N with a completely unoptimized ~2500 solution, and undo was still working very well... though I'm good enough at Picross that I don't end up toggling the squares much more than I needed to).
[Last edited by TFMurphy at 10-15-2020 07:20 PM]