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

Author: rushforthian

Date: 26/12/2016

Subject: Re: Mirror MM/JSW / MM - JSW Conversions

 

Andrew wrote:

>  Yes, I decided against having the mirroring-algorithms patch the  games, as this would lose the property of reversibility (Mirror(Mirror(x)) = x)
and:
> Horizontal (and diagonal) guardians cannot be perfectly inverted,  because in JSW, they always start on their leftmost sprite-frame,  regardless of whether they go left or right initially   It should be possible to have a simple reversible algorithm that could be applied to perfectly invert horizontal/diagonal guardians.
I presume that your current Mirror algorithm includes the application of an XOR #80 to Byte 0 of each guardian's definition, in order to flip Bit 7 which determines the initial direction of travel?
If that were to be changed to an XOR #E0 gate, it would flip all of Bits 5, 6 and 7, thus inverting the starting frame of animation as well.
N.B. The above consideration applies to eight-frame bidirectional guardians.  Things might get more complicated for four-frame guardians, as you would need to alter the Animation Frame Mask and/or the Base Sprite Index (the latter of which is determined on a guardian-instance basis) to ensure that the guardian still displays using the correct set of sprites from within the same page of sprite-frames.  However, that requires additional consideration in any case; simply inverting the initial direction of travel and all the sprite pixel-patterns will yield the 'wrong' guardians in some cases (e.g. the Swiss Army Knife becomes a Rolling Egg).

 

 

arrowleft
arrowright