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

Author: ian.rushforth

Date: 16/05/2017

Subject: Forcefields

 

I've seen 'Forcefields' discussed in several posts, but I can't see anywhere that actually defines them?  It's a notable omission from Dr Andrew Broad's otherwise excellent (although unfinished) 'Nomen Clature' webpage.


As I understand it, Forcefields are guardians for which seven of their eight sprite-frames are Inkless, with Inked-in pixels for the eight sprite-frame (which is usually entirely Inked-in).  The guardian is usually defined as vertical, but with a y-increment of zero, and set to update its sprite-frame every other time-frame.  This then allows the player to walk through them from one side to the other, without being killed, but they must get the timing right to avoid a pixel-collision.


The player's sprite is coloured in by the 'shadow' of the Forcefield as is passes through it (in the same colour as the Forcefield's Inked-in pixels when they appear), creating a sense of 'foreboding'.


A suggestion: in rooms which contain more than one Forcefield, it could be aesthetically pleasing to have them all 'out of phase' with each other.  This can be achieved, whilst still taking the graphics from the same sprite page in the memory, by setting different initial values for the 'animation frame index' at Bits 5-7 of Byte 0 of the guardian definitions for each Forcefield.


However, if you're using the same Guardian Class [in JSW48/JSW128] for more than one Forcefield, then you would have to set the initial animation frame indices differently via a Room Setup Patch Vector.  (Because unlike the x-coordinates stored in Byte 2 - which are defined on a Guardian Instance basis - the values of Byte 0 are set on a Guardian Class basis.)

 

 

arrowleft
arrowright