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: 2834

Author: andrewbroad

Date: 08/05/2002

Subject: Re: Guardian-Class 0

 

soa1000 wrote:

>
> Have you put a guardian in 00 in the guardian table? If you don't
> leave that slot blank the guardian table becomes fatal to use due to
> the workings of the game. I don't really know why you can edit that
> slot in fact

Guardian-Class 0 may be used just as well as Guardian-Classes 1-126 -
provided the data in Guardian-Class 127 are [255,0,0,0,0,0,0,i] (where
256-i is the number of items, since i = PEEK 41983).

The guardian-instance list of each room is usually padded out with
[255,0,0,0, ...] after the last guardian-instance in the room, but if
you edit Guardian-Class 127 to, say, [0,0,0,0,0,0,0,i], then 255 fails
to terminate the guardian-instance lists and if the guardian-instance
list is padded out with [255,0,0,0, ...] then it thinks the room
contain instances of Guardian-Class 0 !!!

I encountered this bug in Goodnite Luddite when I unwittingly cleared
the Guardian-Class Table using FOR n = 40960 to 41982: POKE n,0: NEXT
n. After an agonising struggle to track down a seemingly inexplicable
bug, I fixed the first byte of Guardian-Class 127 using POKE 41976,255.

Of course the situation is more complicated in JSW128, which allows
multiple guardian-class tables (each room specifies the address of the
guardian-class table it uses in Offsets 223 and 224, if I remember
rightly). But it's worth checking that each guardian-class table has
255 as the first byte of Guardian-Class 127.

Other, less elegant solutions to the problem would be to pad out each
room's guardian-instance list with [255,0,255,0,...], or even uglier,
to clear Guardian-Class 0 to [0,0,0,0,0,0,0,0].

--
Andrew Broad
http://www.cs.man.ac.uk/~broada/
http://www.cs.man.ac.uk/~broada/spectrum/
http://www.cs.man.ac.uk/~broada/spectrum/willy/
http://www.cs.man.ac.uk/~broada/spectrum/willy/bugs.html
http://www.cs.man.ac.uk/~broada/spectrum/willy/bugs.html#guardian_class_table

 

 

arrowleft
arrowright