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: 7040
Author: rushforthian
Date: 04/02/2017
Subject: Re: Auto-jump after passing through a Portal in JSW64
I wrote:
> Another thought - one of the other 'Willy' variables which is written into the cavern data in MM, but which
> isn't specified in the room data in JSW64, is the Airborne Status Indicator. So if Willy jumps into a Portal in > one room (in JSW64), why doesn't his jump carry on into the next? I suspect that there is a command to
> initialise the Airborne value to zero that is hard-wired into the JSW64 portal code. If that is the case, then it > wouldn't be possible to have Willy automatically jump upon entry to a room in JSW64 (something
> which can be done in MM, as discussed in message 7003).
It turns out that the Airborne Status Indicator is reset to zero upon entry to a portal by the default Portal Patch Vector. So if you wanted Willy to enter a cavern via a Portal in a JSW64 game with a jump, then this could be achieved by using a non-standard Portal PV that sets #85D1 to a value of #01. (It would probably best to also reset the Jump Animation Counter at #85D5, otherwise if he enters mid-jump then his jump might become cell-row-misaligned.)
Andrew wrote:
> But JSW64 doesn't specify a portal-destination /start-frame/, and is not, therefore, fully faithful to the original > 48K MM
Again, you could set Willy's start-frame via a bespoke Portal PV.
And I wrote:
> The same consideration also applies to Willy's Direction and Movement Flags.
Furthermore, you could assign a fixed initial value to #85D0 in a Portal PV; possible values are 00 or 01 (to determine Willy's initial facing direction) or 02 or 03 (to allow Willy to set off straight away against the flow of a conveyor, such as in 'On Her Majesty's Secret Service' - but only if the player has the 'upstream' button pressed upn entry). One of the latter two values, if applied in conjunction with setting the Airborne Indicator (#85D1) to 01, would make Willy perform a sideways jump upon entry to the cavern that follows.
**
To facilitate all of the above in the most code-efficient manner, it might be a good idea to slightly rearrange the default Portal PV, so that the elements which set the destination room number and Willy's coordinates come after the command that sets AIRBORNE to zero. (That command currently sits last in the default Portal PV.) So that once you've specified your chosen values for Willy's initial facing/walking/jumping statuses, you then could jump into the default PV at the point where his next starting position is set.
