Resource centre for ZX Spectrum games
using Manic Miner and Jet Set Willy game engines
Archive of the
Manic Miner & Jet Set Willy Yahoo! Group
messages
|
|
||
|
|
Message: 7211
Author: ian.rushforth
Date: 09/11/2018
Subject: Re: Guardian corruption / weird rope bug in Ultimate Manic Miner
I've just noticed another earlier typo on my part:
> I did a bit more experimentation by transposing the positions of the invisible vertical and multicolour
> horizontal guardians in the room's guardian instance list, That had the effect that the horizontal guardian's
> last two definition bytes were corrupted, as before, except that the effect of this was no longer harmless - it
> moved faster as a result of Bit 7 of Byte 7 being set, which you would expect in JSW64, and it carried on
> moving rightwards until it crashed into something (killing Willy, even though he was out of reach, hanging on > the weird rope by that point), as a result of the horizontal's rightmost bound (Bits 0-4 of Byte 0) being set to > 0. However, the fact that it was moving right and not left means that it must have turned round prior to the
> corruption. (The guardian starts off at the leftmost extent of its bound; it doesn't start moving until a
> 'Movement Stopper' has been turned off by another Trigger! So I would suggest that the corruption, if it is
> arising from the Droplet-Skylabs, is caused by the first attempt to draw the Droplet-Skylabs, not the first
> attempt to move the Droplet-Skylabs - since the Droplet-Skylabs precede the two corrupted guardians, and
> the 'Move the guardians' routine is enacted before the 'Draw the guardians' routine during each pass through > the Main Loop.)
The reference to Bits 0-4 in Byte 0 of the horizontal guardian in the above should of course have said Bits 0-4 of Byte 7 (the rightmost extend of its range).
***
Anyway, the observations above provide another piece of the puzzle... My thinking has moved on since I wrote that - I now believe that it is the action of a Trigger that is the most likely culprit that causes the corruption in 'Eugene Lair'. It is clear from the behaviour of the horizontal guardian (transposed with the invisible vertical guardian in my experimentation) that it gets turned around before the corruption takes place.
Recall that (1) the first of the two guardians to be corrupted only has its last two bytes written over, with hex values 'D3 80' respectively. (2) The horizontal guardian starts off 'set to move leftwards', although because the x-coordinate where it begins (05) matches its leftmost bound, it is turned around to proceed rightwards when the first iteration of its movement is activated. (3) A HG starting off outside its bounds proceeds to move without changing direction until it is back within its normal range.
Now, if the corruption of (the last two bytes of) this guardian occurred before it was moved, then its x-coordinate (#05) would not have matched its leftmost bount (Bits 0-4 of Byte 6 = #13), so it would have carried on moving leftwards. As it happened, the guardian moves rightwards (in the file where the two corrupted guardians are transposed in the guardian list for the cavern) until it crashes into Earth blocks that lie beyond its intended range.
Therefore we can narrow down which of the cavern's two Triggers causes the corruption (if indeed it is caused by a Trigger). The first Trigger precedes a Movement Stopper (which it turns OFF at the appropriate time), and both are earlier in the guardian list than the two corrupted guardians. (It is this Trigger/Stopper combo which delays the movement of the colourful worm HG that gets transmogrified into a rope by the corruption.) Triggers are only moved, not drawn, so it can't be that first Trigger which is involved - otherwise the resultant corruption would occur before the 'Move the guardians' routine gets the chance to move the HG (and thus reverse its direction of travel, as seen in my experiment).
The second Trigger comes later in the guardian list - it precedes a Drawing and Movement Stopper (which it turns ON at the appropriate time - it is this Trigger/Combo which causes the 'DIE MORTAL' lettering to disappear after a short delay upon entering the cavern). This Trigger (along with every other guardian listed after the first 'Movement' Stopper described earlier) is not enacted by 'Move the guardians' until that Movement Stopper has been switched off by the first Trigger. So by the time the second (Drawing & Movement) Trigger has been, er, triggered, the guardians in the list that lie between the two Triggers have been subject to one interation of movement (which is sufficient to turn the HG around given that it started at the extent of its range, facing 'outwards').
In summary: if a Trigger is responsible for the corruption which I discovered in 'Eugene Lair' (which causes Willy to be teleported to Room 0: 'Living Quarters'), then it is the second Trigger that must be responsible, not the first!
(And a similar consideration would presumably apply to the corruption in 'Cold Storage', as reported by soa1000.)
